-
Notifications
You must be signed in to change notification settings - Fork 1
/
luas_boot
41 lines (35 loc) · 1 KB
/
luas_boot
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
# /etc/init.d/luas_boot
### BEGIN INIT INFO
# Provides: luas_times
# Required-Start: $all
# Required-Stop: $al
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Shows luas times
# Description: This service is used to parse luas times and show them on display
### END INIT INFO
# The following part always gets executed.
# echo "This part always gets executed"
# The following part carries out specific functions depending on arguments.
case "$1" in
start)
/home/pi/scripts/luas_run_all.sh
;;
stop)
echo "Stopping luas_boot"
killall luas_boot
killall luas_run_all.sh
killall luas
echo "luas is dead"
;;
*)
echo "Usage: /etc/init.d/luas_boot {start|stop}"
exit 1
;;
esac
exit 0
# $ sudo chmod 755 /etc/init.d/luas_boot
# $ sudo update-rc.d luas_boot defaults
# Later if you decide to remove the init.d script from start-up service list, you can simply run the following.
# $ sudo update-rc.d -f luas_boot remove