#!/bin/sh inetd=`grep "^inetd=" /etc/usermin/miniserv.conf 2>/dev/null | sed -e 's/inetd=//g'` if [ "$1" = "upgrade" ]; then # Upgrading the package, so stop the old webmin properly if [ "$inetd" != "1" ]; then /etc/usermin/stop >/dev/null 2>&1 /usermin-setup.out 2>&1 if [ "usermin" = "webmin" ]; then grep sudo= /etc/usermin/miniserv.conf >/dev/null 2>&1 if [ "$?" = 1 ]; then # Allow sudo-based logins for Ubuntu echo sudo=1 >>/etc/usermin/miniserv.conf fi fi rm -f /var/lock/subsys/usermin if [ "" != "1" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d usermin start >/dev/null 2>&1 /dev/null 2>&1 /dev/null 2>&1 fi cat >/etc/usermin/uninstall.sh </dev/null 2>/dev/null if [ "$?" = "0" ]; then sslmode=1 fi fi if [ "$sslmode" = "1" ]; then echo "Usermin install complete. You can now login to https://$host:$port/" else echo "Usermin install complete. You can now login to http://$host:$port/" fi if [ "usermin" = "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