Handle hostnames with upper-case letters
[webmin.git] / setup.sh
index 0b6b434..57b55dd 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -173,11 +173,12 @@ if [ "$upgrading" = 1 ]; then
        $perl "$wadir/newmods.pl" $config_dir $allmods
 
        # Update miniserv.conf with new root directory and mime types file
-       grep -v "^root=" $config_dir/miniserv.conf | grep -v "^mimetypes=" >$tempdir/$$.miniserv.conf
+       grep -v "^root=" $config_dir/miniserv.conf | grep -v "^mimetypes=" | grep -v "^server=" >$tempdir/$$.miniserv.conf
        if [ $? != "0" ]; then exit 1; fi
        mv $tempdir/$$.miniserv.conf $config_dir/miniserv.conf
        echo "root=$wadir" >> $config_dir/miniserv.conf
        echo "mimetypes=$wadir/mime.types" >> $config_dir/miniserv.conf
+       echo "server=MiniServ/$ver" >> $config_dir/miniserv.conf
        grep logout= $config_dir/miniserv.conf >/dev/null
        if [ $? != "0" ]; then
                echo "logout=$config_dir/logout-flag" >> $config_dir/miniserv.conf
@@ -452,7 +453,6 @@ else
                        echo "Webmin does not support being started at boot time on your system."
                fi
        fi
-       makeboot=$atboot
 
        # Copy files to target directory
        echo "***********************************************************************"
@@ -505,6 +505,7 @@ else
                echo "pam=$pam" >> $cfile
        fi
        echo premodules=WebminCore >> $cfile
+       echo "server=MiniServ/$ver" >> $cfile
 
        # Append package-specific info to config file
        if [ -r "$wadir/miniserv-conf" ]; then
@@ -808,6 +809,14 @@ if [ "$nopostinstall" = "" ]; then
        echo ""
 fi
 
+# Enable background collection
+if [ "$upgrading" != 1 -a -r $config_dir/system-status/enable-collection.pl ]; then
+       echo "Enabling background status collection .."
+       $config_dir/system-status/enable-collection.pl 5
+       echo "..done"
+       echo ""
+fi
+
 # Run package-defined post-install script
 if [ -r "$srcdir/setup-post.sh" ]; then
        . "$srcdir/setup-post.sh"