summaryrefslogtreecommitdiff
path: root/app-admin/usermin/files/usermin-1.540-r1.init
blob: 90389764e6988c735add99f1ee8b726285ff20be (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
38
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

depend() {
	use net logger
}


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

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

	LANG=
	export LANG

	unset PERLIO
	export PERLIO
	start-stop-daemon --start --quiet --user usermin \
		--exec /usr/libexec/usermin/miniserv.pl -- /etc/usermin/miniserv.conf
	eend $?
}

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