summaryrefslogtreecommitdiff
blob: c9eb7b0811fb8a87f925db415397dc3e5a967460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/webmin/files/webmin-gentoo-init,v 1.5 2005/08/17 20:53:57 eradicator Exp $

depend() {
	need net logger
}

checkconfig() {
	if [ -f /etc/webmin/config ]; then
		return 0;
	else
		eerror "Error starting webmin.  Have you run '/usr/libexec/webmin/setup.sh'?"
		return 1;
	fi
}

start() { # copied from /etc/webmin/start
	checkconfig || return 1
	ebegin "Starting Webmin"

	LANG=
	export LANG

	unset PERLIO
	export PERLIO
	start-stop-daemon --start --pidfile /var/run/webmin.pid --make-pidfile --quiet \
		--exec /usr/libexec/webmin/miniserv.pl -- /etc/webmin/miniserv.conf
	eend $?
}

stop() {
	ebegin "Stopping Webmin"
	start-stop-daemon --stop --pidfile /var/run/webmin.pid --quiet
	eend $?
}