aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2021-10-21 12:11:34 +0200
committerJakob Stendahl <jakob.stendahl@outlook.com>2021-10-21 12:25:07 +0200
commita69d9dbc80dfaa0fc3eef3b5ac48e1c2a25fa08b (patch)
tree9b25e6509d5dd25cb0b08c979b2150744532da93
parenta975479fc3eaa0fc89341603bffb0224bed1be3d (diff)
downloadLuxcena-Neo-a69d9dbc80dfaa0fc3eef3b5ac48e1c2a25fa08b.tar.gz
Luxcena-Neo-a69d9dbc80dfaa0fc3eef3b5ac48e1c2a25fa08b.zip
:lipstick: Make cursor show when user input is requested
-rwxr-xr-xbin/install.sh2
-rwxr-xr-xbin/uninstall.sh2
-rw-r--r--src/SelfUpdater/index.js6
3 files changed, 7 insertions, 3 deletions
diff --git a/bin/install.sh b/bin/install.sh
index cabd6bf..f57eff1 100755
--- a/bin/install.sh
+++ b/bin/install.sh
@@ -127,11 +127,13 @@ execCommand "mkdir -p \"/var/log/luxcena-neo\""
execCommand "chown $username:$username \"/var/log/luxcena-neo\""
# Choose branch to install
+TPUT cnorm
printf '\n%s' "Which branch do you want to install (default: master)? "
read BRANCH
if [ -z "$BRANCH" ]; then
BRANCH="master"
fi
+TPUT civis
# Get source code
header "Fetch source code"
diff --git a/bin/uninstall.sh b/bin/uninstall.sh
index 2b3f41e..ee8a5a2 100755
--- a/bin/uninstall.sh
+++ b/bin/uninstall.sh
@@ -102,6 +102,7 @@ function execCommand() {
function dlgYN() {
TPUT sc
TPUT setaf 4
+ TPUT cnorm
printf "$1 (y/n)? "
while :
do
@@ -127,6 +128,7 @@ printf "By uninstalling Luxcena-Neo you might loose all data, including your scr
dlgYN "Are you sure you want to uninstall?" res
if [ $res -eq 1 ]; then
+ TPUT civis
header "Stop systemd service"
execCommand "systemctl stop luxcena-neo"
diff --git a/src/SelfUpdater/index.js b/src/SelfUpdater/index.js
index 441ec6a..19ff4c2 100644
--- a/src/SelfUpdater/index.js
+++ b/src/SelfUpdater/index.js
@@ -154,6 +154,8 @@ class Updater {
// Restart self, systemd service restart policy will start us up again.
this.setStep("Stopping luxcena neo service in the hope that systemd will restart it. (8/8)");
this.setCommand("EXIT");
+ this.updating = false;
+ this.event.emit("end");
process.exit(0);
} catch (e) {
@@ -184,8 +186,6 @@ class Updater {
this.event.emit("error", this.updatelog);
neoModules.neoRuntimeManager.startMode();
}
- this.updating = false;
- this.event.emit("end");
}
/**
@@ -193,7 +193,7 @@ class Updater {
*/
async run(cmd, opts) {
this.setCommand(`${cmd} ` + opts.join(" "));
- await promiseSpawn(cmd, opts);
+ return await promiseSpawn(cmd, opts);
}
/**