-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·41 lines (32 loc) · 1.05 KB
/
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
33
34
35
36
37
38
39
40
41
#!/bin/bash
#----------------------------------------------------------------------------------------
# elgato-pi-deck
# Version: 0.9.2
#
# WebSite:
# https://www.mfwlab.com
#
# Copyright © 2020 - Pablo Meniño <[email protected]>
#----------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
# Install elgato-pi-deck
if [ "$EUID" -ne 0 ]; then
echo "This script must be run as root!!!"
exit 1
fi
# copy udev rules
cp 20-elgato-pi-deck.rules /etc/udev/rules.d/
# Reload udev rules
udevadm control --reload-rules
udevadm trigger
# copy systemd service
cp elgato-pi-deck.service /etc/systemd/system/
# reload systemd daemon
systemctl daemon-reload
# Start service
systemctl enable elgato-pi-deck.service
systemctl start elgato-pi-deck.service
#----------------------------------------------------------------------------------------
# Exit
exit 0
#----------------------------------------------------------------------------------------