aboutsummaryrefslogtreecommitdiff
path: root/bin/luxcena-neo-cli.sh
diff options
context:
space:
mode:
authorjakobst1n <jakob.stendahl@outlook.com>2021-10-03 19:15:58 +0200
committerjakobst1n <jakob.stendahl@outlook.com>2021-10-03 19:15:58 +0200
commitc6b6713e4ca50ecfaf847db1b874f2aec456fbb4 (patch)
treedcc61078e2556ced919ddc847730f7bce59bf5b9 /bin/luxcena-neo-cli.sh
parent8fe3b246a12d409b0819b574a050b64ca96ce251 (diff)
downloadLuxcena-Neo-c6b6713e4ca50ecfaf847db1b874f2aec456fbb4.tar.gz
Luxcena-Neo-c6b6713e4ca50ecfaf847db1b874f2aec456fbb4.zip
:wrench: Fix some paths
Diffstat (limited to 'bin/luxcena-neo-cli.sh')
-rwxr-xr-xbin/luxcena-neo-cli.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/luxcena-neo-cli.sh b/bin/luxcena-neo-cli.sh
index b3c6553..872b819 100755
--- a/bin/luxcena-neo-cli.sh
+++ b/bin/luxcena-neo-cli.sh
@@ -79,7 +79,7 @@ if [ "$action" == "update" ]; then
curl -fsSL https://deb.nodesource.com/setup_14.x | bash - || die
# Make sure nodejs and prerequisites is installed
- apt install nodejs python-pip || die
+ apt -qy install nodejs python-pip || die
# Make sure we have python virtualenv installed
pip3 install virtualenv || die
@@ -110,6 +110,7 @@ if [ "$action" == "update" ]; then
printf "Update complete.\n"
systemctl start luxcena-neo
+ systemctl enable luxcena-neo
exit 0
elif [ "$action" == "uninstall" ]; then
@@ -118,13 +119,14 @@ elif [ "$action" == "uninstall" ]; then
tput sgr0
printf '\e[93m%s\e[0m\n' "--------------------------"
tput setaf 8
- printf "By uninstalling Luxcena-Neo you will loose all you data, including your scripts.\n\n"
+ printf "By uninstalling Luxcena-Neo you might loose all data, including your scripts.\n\n"
dlgYN "Are you sure you want to uninstall?" res
if [ $res -eq 1 ]; then
systemctl stop luxcena-neo
deluser lux-neo
rm -rf /home/lux-neo
+ rm -rf /opt/luxcena-neo
rm /etc/systemd/system/luxcena-neo.service
rm /usr/bin/luxcena-neo.sh
rm /usr/bin/lux-neo
@@ -132,6 +134,7 @@ elif [ "$action" == "uninstall" ]; then
tput setaf 2
printf "\nEverything should now be gone.\n"
+ printf "/etc/luxcena-neo and /var/log/luxcena-neo is not removed.\n"
tput sgr0
tput setaf 8
printf "Well, some dependencies still exists. Those are:\n"
@@ -140,9 +143,6 @@ elif [ "$action" == "uninstall" ]; then
tput sgr0
fi
-elif [ "$action" == "conf" ]; then
- nano /home/lux-neo/userdata/config/strip.json
-
elif [ "$action" == "start" ]; then
systemctl start luxcena-neo
if [ "$2" == "boot" ]; then
@@ -176,23 +176,23 @@ elif [ "$action" == "status" ]; then
elif [ "$action" == "log" ]; then
if [ "$2" == "service" ]; then
printf '\e[93m%s\e[0m\n' "━━━Service log (press ctrl+c to exit)━━━━━━━━━━━━━━━━━━"
- tail -F -n 20 /home/lux-neo/logs/service.log
+ tail -F -n 20 /var/log/luxcena-neo/service.log
fi
if [ "$2" == "app" ]; then
printf '\e[93m%s\e[0m\n' "━━━App log (press ctrl+c to exit)━━━━━━━━━━━━━━━━━━"
- tail -F -n 20 /home/lux-neo/logs/logger.log
+ tail -F -n 20 /var/log/luxcena-neo/logger.log
fi
elif [ "$action" == "version" ] || [ "$action" == "v" ]; then
printf "╭─────────────────────╮\n"
printf "│ Version: Unknown │\n"
- printf "│ branch : $(git -C /home/lux-neo/src branch | grep \* | cut -d ' ' -f2) │\n"
+ printf "│ branch : $(git -C /opt/luxcena-neo branch | grep \* | cut -d ' ' -f2) │\n"
printf "╰─────────────────────╯\n\n"
elif [ "$action" == "selectBranch" ]; then
- printf "Current $(git -C /home/lux-neo/src branch | grep \* | cut -d ' ' -f2)Branch \n"
- runuser -l 'lux-neo' -c "git -C ~/src stash"
- runuser -l 'lux-neo' -c "git -C ~/src checkout $2" || printf "\e[91mYou should now run \e[90m'sudo lux-neo update'\e[91m!\n"
+ printf "Current $(git -C /opt/luxcena-neo branch | grep \* | cut -d ' ' -f2)Branch \n"
+ runuser -l 'lux-neo' -c "git -C /opt/luxcena-neo stash"
+ runuser -l 'lux-neo' -c "git -C /opt/luxcena-neo checkout $2" || printf "\e[91mYou should now run \e[90m'sudo lux-neo update'\e[91m!\n"
else
usage