Fix modifying of rOCCI server config file.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 7 Mar 2014 17:27:21 +0000 (18:27 +0100)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 7 Mar 2014 17:27:21 +0000 (18:27 +0100)
rocci-server/debian/postinst

index c474216..aa148a9 100644 (file)
@@ -30,8 +30,8 @@ chown -R nobody:nogroup /usr/lib/rocci-server/log
 # hostname in configuration
 if [ -n "$hname" ]; then
        sed -i \
-               -e "s,^\(\s*SetEnv\s*ServerName\s*\),\1$hname," \
-               -e "s,^\(\s*SetEnv\s*ROCCI_SERVER_HOSTNAME\s*\),\1$hname," \
+               -e "s,^\(\s*ServerName\s*\).*,\1$hname," \
+               -e "s,^\(\s*SetEnv\s*ROCCI_SERVER_HOSTNAME\s*\).*,\1$hname," \
                $conf
 else
        echo "Hostname could not be determined! Please update 'ServerName' and 'ROCCI_SERVER_HOSTNAME' in $conf."