-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·32 lines (25 loc) · 936 Bytes
/
install.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
#!/bin/sh
set -x
set -e
# Install application
#--------------------
# Install binary
mkdir -p $HOME/.local/bin
cp -f ./build/audio-keepawake $HOME/.local/bin
# Install sounds
mkdir -p $HOME/.local/share/audio-keepawake/
cp -r -f ./sound $HOME/.local/share/audio-keepawake/
# Install service
#----------------
mkdir -p $HOME/.local/share/systemd/user
cp service/audio-keepawake.service $HOME/.local/share/systemd/user/
systemctl --user daemon-reload
systemctl --user enable audio-keepawake.service
# Created symlink /home/foo/.config/systemd/user/default.target.wants/audio-keepawake.service → /home/foo/.local/share/systemd/user/audio-keepawake.service
systemctl --user start audio-keepawake.service
# Debugging only
#---------------
#systemctl --user status audio-keepawake.service
#systemctl --user stop audio-keepawake.service
#systemctl --user start audio-keepawake.service
#journalctl --user -u audio-keepawake.service -b