aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2018-11-29 23:14:58 +0100
committerJakob Stendahl <jakob.stendahl@outlook.com>2018-11-29 23:14:58 +0100
commit101745c6a4a2c6a186be48182d48814177840c65 (patch)
treeee7c7420291473033cf7cd9f921fe21958bf571f /bin
parent2147880e40ee39ae07c8df9d3500080da467475d (diff)
downloadLuxcena-Neo-101745c6a4a2c6a186be48182d48814177840c65.tar.gz
Luxcena-Neo-101745c6a4a2c6a186be48182d48814177840c65.zip
:construction: Chenged things, and written some docs
Diffstat (limited to 'bin')
-rwxr-xr-xbin/install.sh20
-rwxr-xr-xbin/luxcena-neo-cli.sh6
-rw-r--r--bin/post-update.sh1
3 files changed, 15 insertions, 12 deletions
diff --git a/bin/install.sh b/bin/install.sh
index 005f073..cd4f07b 100755
--- a/bin/install.sh
+++ b/bin/install.sh
@@ -111,19 +111,19 @@ tput setaf 8
printf '%s\n' " - Making app-dir (/bin/luxcena-neo)..."
tput sgr0
userDir=$(eval echo "~$username")
-mkdir -p "$userDir/install" &>> $LOG || die
-chown $username:$username "$userDir/install" &>> $LOG || die
-mkdir -p "$userDir/install/src" &>> $LOG || die
-chown $username:$username "$userDir/install/src" &>> $LOG || die
-mkdir -p "$userDir/install/userdata" &>> $LOG || die
-chown $username:$username "$userDir/install/userdata" &>> $LOG || die
+#mkdir -p "$userDir/install" &>> $LOG || die
+#chown $username:$username "$userDir/install" &>> $LOG || die
+mkdir -p "$userDir/src" &>> $LOG || die
+chown $username:$username "$userDir/src" &>> $LOG || die
+mkdir -p "$userDir/userdata" &>> $LOG || die
+chown $username:$username "$userDir/userdata" &>> $LOG || die
# Third we copy the source into the correct swap-folder
tput setaf 8
printf '%s\n' " - Copying sourceCode to app-dir..."
tput sgr0
-cp -r . "$userDir/install/src" &>> $LOG || die
-chown -R $username:$username "$userDir/install/src" &>> $LOG || die
+cp -r . "$userDir/src" &>> $LOG || die
+chown -R $username:$username "$userDir/src" &>> $LOG || die
# fourth we run npm i
tput setaf 8
@@ -131,7 +131,7 @@ printf '%s\n' " - Running npm i..."
tput sgr0
tput sc
export NODE_ENV=production &>> $LOG || die
-runuser -l $username -c 'npm --prefix ~/install/src install ~/install/src --only=production' &>> $LOG || die # This is probably a bit overkill to have --only=... but better safe than sorry?
+runuser -l $username -c 'npm --prefix ~/src install ~/src --only=production' &>> $LOG || die # This is probably a bit overkill to have --only=... but better safe than sorry?
tput rc; tput ed
# fourth we copy the cli to our bin folder
@@ -139,7 +139,7 @@ tput setaf 8
printf '%s\n' " - Adding cli-script..."
tput sgr0
cp bin/luxcena-neo-cli.sh /usr/bin/luxcena-neo-cli.sh &>> $LOG || die
-ln -sf /usr/bin/luxcena-neo-cli.sh /usr/bin/luxcena-neo &>> $LOG || die
+ln -sf /usr/bin/luxcena-neo-cli.sh /usr/bin/lux-neo &>> $LOG || die
tput rc; tput ed
# Fifth we add the service files
diff --git a/bin/luxcena-neo-cli.sh b/bin/luxcena-neo-cli.sh
index 761459e..5d960c0 100755
--- a/bin/luxcena-neo-cli.sh
+++ b/bin/luxcena-neo-cli.sh
@@ -71,7 +71,7 @@ if [ "$action" == "update" ]; then
runuser -l 'lux-neo' -c 'npm i --only=production'
cd $oldDir
printf "Update complete, run these commands to finish it completly:\n"
- printf "sudo /home/lux-neo/luxcena-neo-install/bin/post-update.sh\n"
+ printf "sudo /home/lux-neo/install/src/bin/post-update.sh\n"
printf "sudo systemctl luxcena-neo start\n"
systemctl start luxcena-neo
@@ -100,8 +100,12 @@ elif [ "$action" == "uninstall" ]; then
printf "Well, some dependencies still exists. Those are:\n"
printf " - rpi_ws281x-library\n"
printf " - packages (nodejs scons python-dev swig)\n"
+ tput sgr0
fi
+elif [ "$action" == "conf" ]; then
+ nano /home/lux-neo/luxcena-neo-install/userdata/config/strip.json
+
elif [ "$action" == "start" ]; then
systemctl start luxcena-neo
elif [ "$action" == "stop" ]; then
diff --git a/bin/post-update.sh b/bin/post-update.sh
index e0e8bc1..59b1fe9 100644
--- a/bin/post-update.sh
+++ b/bin/post-update.sh
@@ -1,5 +1,4 @@
-cd /home/lux-neo/luxcena-neo-install
cp bin/luxcena-neo-cli.sh /usr/bin/luxcena-neo-cli.sh
echo "Post-update done..."