#!/bin/sh inetd=`grep "^inetd=" /etc/webmin/miniserv.conf 2>/dev/null | sed -e 's/inetd=//g'` if [ "$1" = "upgrade" -a "$1" != "abort-upgrade" ]; then # Upgrading the package, so stop the old webmin properly if [ "$inetd" != "1" ]; then /etc/webmin/stop >/dev/null 2>&1 /webmin-setup.out 2>&1 if [ "webmin" = "webmin" ]; then grep sudo= /etc/webmin/miniserv.conf >/dev/null 2>&1 if [ "$?" = 1 ]; then # Allow sudo-based logins for Ubuntu echo sudo=1 >>/etc/webmin/miniserv.conf fi fi rm -f /var/lock/subsys/webmin if [ "" != "1" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d webmin start >/dev/null 2>&1 /dev/null 2>&1 /dev/null 2>&1 fi cat >/etc/webmin/uninstall.sh </dev/null 2>/dev/null if [ "$?" = "0" ]; then sslmode=1 fi fi if [ "$sslmode" = "1" ]; then echo "Webmin install complete. You can now login to https://$host:$port/" else echo "Webmin install complete. You can now login to http://$host:$port/" fi if [ "webmin" = "webmin" ]; then echo "as root with your root password, or as any user who can use sudo" echo "to run commands as root." else echo "as any user on the system." fi