-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathscriptform.init.d_redhat
More file actions
executable file
·68 lines (61 loc) · 1.1 KB
/
Copy pathscriptform.init.d_redhat
File metadata and controls
executable file
·68 lines (61 loc) · 1.1 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
#
# scriptform Scriptform server
#
# chkconfig: 345 70 30
# description: Standalone web form front-end to scripts.
# processname: scriptform
# Source function library.
. /etc/init.d/functions
RETVAL=0
prog="scriptform"
# Settings. Change these, especially FORM_CONFIG
NAME=scriptform
PIDFILE=/var/run/scriptform.pid
LOGFILE=/var/log/scriptform.log
DAEMON=/usr/bin/scriptform
FORM_CONFIG=
PORT=8081
DAEMON_ARGS="--port $PORT --pid-file $PIDFILE --log-file $LOGFILE $FORM_CONFIG"
start() {
echo -n "Starting $prog: "
$DAEMON $DAEMON_ARGS
RETVAL=$?
echo $RETVAL
echo
return $RETVAL
}
stop() {
echo -n "Shutting down $prog: "
$DAEMON --stop $DAEMON_ARGS && success || failure
RETVAL=$?
echo $RETVAL
echo
return $RETVAL
}
status() {
echo -n "Checking $prog status: "
[ \! -e $PIDFILE ]
RETVAL=$?
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
stop
start
;;
*)
echo "Usage: $prog {start|stop|status|restart}"
exit 1
;;
esac
exit $RETVAL