forked from gingemarsson/sacn-scene-recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_post.sh
executable file
·30 lines (25 loc) · 990 Bytes
/
install_post.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
#!/bin/bash
# Stop any existing services
echo "Stopping old service..."
systemctl stop rn.sacn-scene-recorder.service
# Remove old files
echo "Removing old files..."
rm -v /usr/local/bin/sacn-scene-recorder
rm -r /usr/local/share/sacn-scene-recorder
echo "removed '/usr/local/share/sacn-scene-recorder/'"
rm -v /lib/systemd/system/rn.sacn-scene-recorder.service
# Copy files
echo "Copying files..."
cp -v systemd/sacn-scene-recorder.sh /usr/local/bin/sacn-scene-recorder
mkdir -p /usr/local/share/sacn-scene-recorder
echo "'.' -> '/usr/local/share/sacn-scene-recorder'"
cp -a . /usr/local/share/sacn-scene-recorder/
cp -v systemd/rn.sacn-scene-recorder.service /lib/systemd/system/
# Reload SystemD files
echo "Reloading daemon definitions..."
systemctl daemon-reload
# Enable, restart and print status of services
echo "Starting service..."
systemctl enable rn.sacn-scene-recorder.service
systemctl start rn.sacn-scene-recorder.service
systemctl status rn.sacn-scene-recorder.service