-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsiriproxy_init.d.sh
38 lines (34 loc) · 1.01 KB
/
siriproxy_init.d.sh
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
#! /bin/sh
# /etc/init.d/siriproxy
### BEGIN INIT INFO
# Provides: siriproxy
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to start a program at boot
# Description: A simple script which will start / stop siriproxy
### END INIT INFO
# If you want a command to always run, put it here
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting siriproxy"
# run application you want to start
echo "" >> /var/log/siriproxy.log
echo "" >> /var/log/siriproxy.log
echo "------------- Server started ---------------" >> /var/log/siriproxy.log
date >> /var/log/siriproxy.log
/root/siriproxy/start_siriproxy.sh >> /var/log/siriproxy.log 2>&1 &
;;
stop)
echo "Stopping siriproxy"
# kill application you want to stop
killall ruby
;;
*)
echo "Usage: /etc/init.d/siriproxy {start|stop}"
exit 1
;;
esac
exit 0