diff --git a/getnew.sh b/getnew.sh index df53bfa1..8ca3ec52 100755 --- a/getnew.sh +++ b/getnew.sh @@ -1,6 +1,6 @@ +#!/bin/bash cd /var/www git stash git pull ./setperms.sh - - +forever restartall diff --git a/install.sh b/install.sh new file mode 100755 index 00000000..bd147dcf --- /dev/null +++ b/install.sh @@ -0,0 +1,11 @@ +#!/bin/bash +apt-get update +apt-get install npm +apt-get install nodejs +npm install -g forever +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/server +forever stopall +CMD="forever start -l /var/log/zoff.log -a --workingDir $DIR $DIR/server.js" +crontab -l | { cat; echo "@reboot" $CMD; } | crontab - +$CMD +echo $CMD