-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·29 lines (21 loc) · 891 Bytes
/
update.sh
File metadata and controls
executable file
·29 lines (21 loc) · 891 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
#!/bin/bash
# Wechsel in das Git-Verzeichnis
cd /home/photo/PhotoBox/
git config --global --add safe.directory /home/photo/PhotoBox
sudo git config --global --add safe.directory /home/photo/PhotoBox
# Git aktualisieren
sudo git -C /home/photo/PhotoBox pull
FILE=/etc/systemd/system/PhotoBoxMaster.service
if test -f "$FILE"; then
rm /etc/systemd/system/PhotoBoxMaster.service
cp /home/photo/PhotoBox/master/PhotoBoxMaster.service /etc/systemd/system/PhotoBoxMaster.service
systemctl daemon-reload
systemctl enable PhotoBoxMaster.service || /bin/true
fi
FILE=/etc/systemd/system/PhotoBoxCamera.service
if test -f "$FILE"; then
rm /etc/systemd/system/PhotoBoxCamera.service
cp /home/photo/PhotoBox/camera/PhotoBoxCamera.service /etc/systemd/system/PhotoBoxCamera.service
systemctl daemon-reload
systemctl enable PhotoBoxCamera.service || /bin/true
fi