From 5c133c750682d8d15c7fdcf5a57fc02aedc9303d Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Fri, 30 Nov 2018 10:44:17 +0100 Subject: :construction: Realizing runuser runs in a seperate session each time --- bin/luxcena-neo-cli.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'bin') 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" -- cgit v1.2.3