Added install script

This commit is contained in:
Nicolas A. Tonne
2015-04-16 00:42:13 +02:00
parent 7f8841ce4a
commit 4e592545c2
2 changed files with 13 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
cd /var/www
git stash
git pull
./setperms.sh
forever restartall

11
install.sh Executable file
View File

@@ -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