-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtweet.init
More file actions
29 lines (28 loc) · 702 Bytes
/
Copy pathtweet.init
File metadata and controls
29 lines (28 loc) · 702 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
#! /bin/sh
### BEGIN INIT INFO
# Provides: vending_tweet
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts python tweeter
### END INIT INFO
case "$1" in
start)
echo "Starting python tweet script"
/home/pi/startTweet.sh &
;;
restart|reload|force-reload)
echo "Stopping python tweet script"
kill -9 $(pidof python) 2> /dev/null
echo "Starting python tweet script"
/home/pi/startTweet.sh &
;;
stop)
echo "Stopping python tweet script"
kill -9 $(pidof python) 2> /dev/null
;;
*)
echo "Usage: $0 start|stop"
;;
esac