-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathspaceapi
More file actions
executable file
·41 lines (38 loc) · 856 Bytes
/
spaceapi
File metadata and controls
executable file
·41 lines (38 loc) · 856 Bytes
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
#!/bin/sh
### BEGIN INIT INFO
# Provides: spaceapi
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: starts the spaceapiclient
# Description: starts the spaceapiclient
### END INIT INFO
case "$1" in
start)
echo "Starting SpaceApiClient "
# init
cd /opt/SpaceApiClient/
nohup ./spaceapiclient.php >> /var/log/spaceapi.log 2>&1 &
;;
stop)
echo "Stopping SpaceApiClient "
/opt/SpaceApiClient/stop.php
killall spaceapiclient.php
;;
restart)
echo "Restarting SpaceApiClient"
/etc/init.d/spaceapi stop
sleep 1
/etc/init.d/spaceapi start
;;
status)
iptables -L
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0