| 1 |
#!/sbin/runscript
|
| 2 |
# Copyright 1999-2004 Gentoo Foundation
|
| 3 |
# Distributed under the terms of the GNU General Public License v2
|
| 4 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/webmin/files/init.d.webmin,v 1.2 2004/07/14 21:22:03 agriffis Exp $
|
| 5 |
|
| 6 |
depend() {
|
| 7 |
use net logger
|
| 8 |
}
|
| 9 |
|
| 10 |
|
| 11 |
checkconfig() {
|
| 12 |
if [ -f /etc/webmin/config ]; then
|
| 13 |
return 0;
|
| 14 |
else
|
| 15 |
eerror "Error starting usermin. /etc/webmin/config is not present."
|
| 16 |
eerror "Please report this on http://bugs.gentoo.org."
|
| 17 |
return 1;
|
| 18 |
fi
|
| 19 |
}
|
| 20 |
|
| 21 |
start() { # copied from /etc/usermin/start
|
| 22 |
checkconfig || return 1
|
| 23 |
ebegin "Starting Webmin"
|
| 24 |
|
| 25 |
LANG=
|
| 26 |
export LANG
|
| 27 |
|
| 28 |
unset PERLIO
|
| 29 |
export PERLIO
|
| 30 |
start-stop-daemon --start --quiet \
|
| 31 |
--exec /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
|
| 32 |
eend $?
|
| 33 |
}
|
| 34 |
|
| 35 |
stop() {
|
| 36 |
ebegin "Stopping Webmin"
|
| 37 |
start-stop-daemon --stop --pidfile /var/run/webmin.pid --quiet
|
| 38 |
eend $?
|
| 39 |
}
|