-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·29 lines (21 loc) · 838 Bytes
/
install.sh
File metadata and controls
executable file
·29 lines (21 loc) · 838 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
#!/bin/bash
set -x
# Copy the python scripts to the bin dir so that they
# are in a place where the init scripts can find them
cp ./power.py /usr/local/bin
cp ./volume.py /usr/local/bin
# enable execute on scripts
chmod +x /usr/local/bin/power.py
chmod +x /usr/local/bin/volume.py
# Install the init scripts
cp ./init_scripts/listen-for-shutdown.sh /etc/init.d
cp ./init_scripts/listen-for-volume.sh /etc/init.d
# enable execute on init scripts
chmod +x /etc/init.d/listen-for-shutdown.sh
chmod +x /etc/init.d/listen-for-volume.sh
# activate the init scripts so you don't have to reboot to have them working
/etc/init.d/listen-for-shutdown.sh start
/etc/init.d/listen-for-volume.sh start
# Enable the init scripts so that they run on startup
update-rc.d listen-for-shutdown.sh defaults
update-rc.d listen-for-volume.sh defaults