forked from webmin/webmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebmin-caldera-init
executable file
·48 lines (38 loc) · 990 Bytes
/
webmin-caldera-init
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
39
40
41
42
43
44
45
46
47
#!/bin/sh
# webmin This shell script takes care of starting and stopping
# webmin
#
# Source function library.
. /etc/rc.d/init.d/functions
NAME=miniserv
DAEMON=/usr/libexec/webmin/miniserv.pl
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# check if the webmin conf file is present
[ -f /etc/webmin/miniserv.conf ] || exit 0
case "$1" in
start)
[ ! -e $SVIlock ] || exit 1
if [ -f /etc/webmin/miniserv.conf ]; then
echo -n "Starting $IDENT: "
ssd -S -n $NAME -x $DAEMON -- /etc/webmin/miniserv.conf 2>&1 >/dev/null
touch $SVIlock
echo "."
else
echo "$NAME not configured (in /etc/webmin/miniserv.conf): Skipped!"
fi
;;
stop)
[ -e $SVIlock ] || exit 0
echo -n "Stopping $IDENT: "
ssd -K -p /var/run/miniserv.pid >/dev/null 2>&1 && echo -n "miniserv"
rm -f $SVIlock
echo "."
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0