aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2018-12-05 23:25:15 +0100
committerJakob Stendahl <jakob.stendahl@outlook.com>2018-12-05 23:25:15 +0100
commitddfa2c672e0a6d8e10720d55a42c3ba453acdd85 (patch)
treef1ac7c9787b5ee34d65cf7fe3eea8ca91304371c /bin
parenta02968d77a3933311d8f6869967b75dad301705a (diff)
downloadLuxcena-Neo-ddfa2c672e0a6d8e10720d55a42c3ba453acdd85.tar.gz
Luxcena-Neo-ddfa2c672e0a6d8e10720d55a42c3ba453acdd85.zip
:hammer: Add skipNode on update, and typo
Diffstat (limited to 'bin')
-rwxr-xr-xbin/luxcena-neo-cli.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/luxcena-neo-cli.sh b/bin/luxcena-neo-cli.sh
index a2b2336..65f2d6d 100755
--- a/bin/luxcena-neo-cli.sh
+++ b/bin/luxcena-neo-cli.sh
@@ -65,10 +65,15 @@ if [ "$action" == "update" ]; then
systemctl stop luxcena-neo
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'
+
+ if [ "$2" != "skipNode" ]; then
+ runuser -l 'lux-neo' -c 'export NODE_ENV=production; npm --prefix ~/src install ~/src --only=production'
+ fi
+
cp /home/lux-neo/src/bin/luxcena-neo-cli.sh /usr/bin/luxcena-neo-cli.sh
printf "Update complete.\n"
systemctl start luxcena-neo
+ exit 0
elif [ "$action" == "uninstall" ]; then
tput setab 1
@@ -120,11 +125,11 @@ elif [ "$action" == "stop" ]; then
elif [ "$action" == "status" ]; then
printf "╭─────────────────────╮\n"
printf "│ Service active: "
- [[ "$(systemctl is-active lucxena-neo)" == *"active"* ]] && printf '\e[32m%s\e[0m │\n' "yes" || printf '\e[31m%s\e[0m │\n' "no"
+ [[ "$(systemctl is-active luxcena-neo)" == *"active"* ]] && printf '\e[32m%s\e[0m │\n' "yes" || printf '\e[31m%s\e[0m │\n' "no"
printf "│ Starts on boot: "
- [[ "$(systemctl is-enabled lucxena-neo)" == *"enabled"* ]] && printf '\e[32m%s\e[0m │\n' "yes" || printf '\e[31m%s\e[0m │\n' "no"
+ [[ "$(systemctl is-enabled luxcena-neo)" == *"enabled"* ]] && printf '\e[32m%s\e[0m │\n' "yes" || printf '\e[31m%s\e[0m │\n' "no"
printf "│ Has failed: "
- [[ "$(systemctl is-failed lucxena-neo)" == *"failed"* ]] && printf '\e[32m%s\e[0m │\n' "yes" || printf '\e[31m%s\e[0m │\n' "no"
+ [[ "$(systemctl is-failed luxcena-neo)" == *"failed"* ]] && printf '\e[32m%s\e[0m │\n' "yes" || printf '\e[31m%s\e[0m │\n' "no"
printf "╰─────────────────────╯\n\n"
printf '\e[93m%s\e[0m\n' "━━━Service status━━━━━━━━━━━━━━━━━━"