updatescript can now restart GUI after update

This commit is contained in:
Lars Berning 2022-02-19 21:33:45 +01:00
parent 80ed66e0d6
commit 05ea1fe65f
No known key found for this signature in database
GPG Key ID: 028E73C9E1D8A0B3
1 changed files with 16 additions and 1 deletions

View File

@ -59,12 +59,20 @@ update_branch() {
sudo git reset --hard origin/$CURRENT_BRANCH
print "Updating Runtime dependencies..."
sudo rm -rf node_modules
sudo rm -rf build
sudo npm ci
sudo npm run build
print "Starting Open Rowing Monitor..."
sudo systemctl start openrowingmonitor
browserservice="webbrowserkiosk.service"
if systemctl --all --type service | grep -q "$browserservice" && systemctl is-active --quiet "$browserservice";then
echo "Restarting Graphical User Interface..."
sudo systemctl restart "$browserservice"
fi
print
print "Update complete, Open Rowing Monitor now has the following exciting new features:"
git log --reverse --pretty=format:"- %s" $LOCAL_VERSION..HEAD
@ -83,12 +91,19 @@ switch_branch() {
print "Updating Runtime dependencies..."
sudo rm -rf node_modules
sudo npm install
sudo rm -rf build
sudo npm ci
sudo npm run build
print "Starting Open Rowing Monitor..."
sudo systemctl start openrowingmonitor
browserservice="webbrowserkiosk.service"
if systemctl --all --type service | grep -q "$browserservice" && systemctl is-active --quiet "$browserservice";then
echo "Restarting Graphical User Interface..."
sudo systemctl restart "$browserservice"
fi
print
print "Switch to branch \"$CURRENT_BRANCH\" complete, Open Rowing Monitor now has the following exciting new features:"
git log --reverse --pretty=format:"- %s" $LOCAL_VERSION..HEAD