aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/install.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/bin/install.sh b/bin/install.sh
index 62077a7..e9c79cd 100755
--- a/bin/install.sh
+++ b/bin/install.sh
@@ -7,7 +7,7 @@ printf '\e[93m%s\e[0m\n\n' "---------------------"
LOG="/tmp/luxcena-neo.install.log"
touch $LOG
-echo "Starting Luxcena-neo installer..." >> LOG
+echo "Starting Luxcena-neo installer..." &>> $LOG
if [ "$EUID" -ne 0 ]; then
echo "You need to run this script as root."
@@ -51,8 +51,8 @@ function dlgYN() {
dlgYN ". Update your system" res
if [ $res -eq 1 ]; then
tput sc
- apt-get -y -qq update >> LOG || die
- apt-get -y -qq upgrade >> LOG || die
+ apt-get -y -qq update &>> $LOG || die
+ apt-get -y -qq upgrade &>> $LOG || die
tput rc; tput ed
fi
@@ -60,7 +60,7 @@ fi
dlgYN ". Install required packages" res
if [ $res -eq 1 ]; then
tput sc
- apt-get -y -qq install nodejs scons python-dev swig >> LOG || die
+ apt-get -y -qq install nodejs scons python-dev swig &>> $LOG || die
if [ $? -eq 0 ]; then
tput rc; tput ed
printf "✓"
@@ -104,7 +104,7 @@ if [ $? -eq 0 ]; then
echo "User already exists, continuing..."
else
#pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
- useradd -m $username >> LOG || die
+ useradd -m $username &>> $LOG || die
fi
# First we make our directories
@@ -112,35 +112,35 @@ 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/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
# 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/install/src" &>> $LOG || die
+chown -R $username:$username "$userDir/install/src" &>> $LOG || die
# fourth we run npm i
tput setaf 8
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?
+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?
tput rc; tput ed
# Fifth we add the service files
tput setaf 8
printf '%s\n' " - Adding service-file to systemd..."
tput sgr0
-cp bin/luxcena-neo.service /etc/systemd/system/luxcena-neo.service >> LOG || die
-systemctl daemon-reload >> LOG || die
+cp bin/luxcena-neo.service /etc/systemd/system/luxcena-neo.service &>> $LOG || die
+systemctl daemon-reload &>> $LOG || die
# Installation is done!
printf '\n\e[5m%s\e[0m\n' "🎉Luxcena-Neo is now installed🎉"