aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2018-11-30 10:44:17 +0100
committerJakob Stendahl <jakob.stendahl@outlook.com>2018-11-30 10:44:17 +0100
commit5c133c750682d8d15c7fdcf5a57fc02aedc9303d (patch)
treee729ed8b96577b2e1272bcf1a067e13777680d4f /bin
parentc0283fd368f6ee07e1b54552127131f6b398341e (diff)
downloadLuxcena-Neo-5c133c750682d8d15c7fdcf5a57fc02aedc9303d.tar.gz
Luxcena-Neo-5c133c750682d8d15c7fdcf5a57fc02aedc9303d.zip
:construction: Realizing runuser runs in a seperate session each time
Diffstat (limited to 'bin')
-rwxr-xr-xbin/luxcena-neo-cli.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/bin/luxcena-neo-cli.sh b/bin/luxcena-neo-cli.sh
index dddf0cb..a8384db 100755
--- a/bin/luxcena-neo-cli.sh
+++ b/bin/luxcena-neo-cli.sh
@@ -64,12 +64,8 @@ if [ "$action" == "update" ]; then
fi
systemctl stop lxucena-neo
- oldDir=$PWD
- cd /home/lux-neo/src
- runuser -l 'lux-neo' -c 'git pull'
- runuser -l 'lux-neo' -c 'export NODE_ENV=production'
- runuser -l 'lux-neo' -c 'npm i --only=production'
- cd $oldDir
+ runuser -l 'lux-neo' -c 'git -C ~/src pull'
+ runuser -l 'lux-neo' -c 'export NODE_ENV=production; npm --prefix ~/src install ~/src --only=production'
printf "Update complete, run these commands to finish it completly:\n"
printf "sudo /home/lux-neo/src/bin/post-update.sh\n"
printf "sudo systemctl luxcena-neo start\n"