From 6c4c7b5a334f9055860b44c69f45f455036b72c2 Mon Sep 17 00:00:00 2001 From: cubedro Date: Sat, 4 Apr 2015 01:46:51 +0300 Subject: [PATCH 1/2] changed tabs to spaces in processes.json --- processes.json | 69 +++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/processes.json b/processes.json index ab1481e..be40f7c 100644 --- a/processes.json +++ b/processes.json @@ -1,36 +1,37 @@ [ - { - "name" : "eth", - "cwd" : "~/bin/www/", - "script" : "bin/eth.sh", - "log_date_format" : "YYYY-MM-DD HH:mm Z", - "log_file" : "~/logs/eth-log.log", - "out_file" : "~/logs/eth-out.log", - "error_file" : "~/logs/eth-err.log", - "merge_logs" : false, - "watch" : false, - "exec_interpreter" : "bash", - "exec_mode" : "fork_mode" - }, - { - "name" : "node-app", - "cwd" : "~/bin/www/", - "script" : "app.js", - "log_file" : "~/logs/node-app-log.log", - "out_file" : "~/logs/node-app-out.log", - "error_file" : "~/logs/node-app-err.log", - "merge_logs" : false, - "watch" : false, - "exec_interpreter" : "node", - "exec_mode" : "fork_mode", - "env": - { - "NODE_ENV" : "production", - "RPC_HOST" : "localhost", - "RPC_PORT" : "8080", - "INSTANCE_NAME" : "", - "WS_SERVER" : "wss://eth-netstats.herokuapp.com", - "WS_SECRET" : "eth-net-stats-has-a-secret", - } - } + { + "name" : "eth", + "cwd" : "~/bin/www/", + "script" : "bin/eth.sh", + "log_date_format" : "YYYY-MM-DD HH:mm Z", + "log_file" : "~/logs/eth-log.log", + "out_file" : "~/logs/eth-out.log", + "error_file" : "~/logs/eth-err.log", + "merge_logs" : false, + "watch" : false, + "exec_interpreter" : "bash", + "exec_mode" : "fork_mode" + }, + { + "name" : "node-app", + "cwd" : "~/bin/www/", + "script" : "app.js", + "log_date_format" : "YYYY-MM-DD HH:mm Z", + "log_file" : "~/logs/node-app-log.log", + "out_file" : "~/logs/node-app-out.log", + "error_file" : "~/logs/node-app-err.log", + "merge_logs" : false, + "watch" : false, + "exec_interpreter" : "node", + "exec_mode" : "fork_mode", + "env": + { + "NODE_ENV" : "production", + "RPC_HOST" : "localhost", + "RPC_PORT" : "8080", + "INSTANCE_NAME" : "", + "WS_SERVER" : "wss://eth-netstats.herokuapp.com", + "WS_SECRET" : "eth-net-stats-has-a-secret", + } + } ] \ No newline at end of file From 8b4c8b8bcdbe93e241c18caa77f814894ae3bda8 Mon Sep 17 00:00:00 2001 From: cubedro Date: Sat, 4 Apr 2015 02:02:39 +0300 Subject: [PATCH 2/2] fixed cron cat --- bin/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index 0d7eed6..a0c2624 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -46,11 +46,11 @@ sudo npm install pm2 -g [[ ! -f ~/bin/processes.json ]] && cp -b ./processes.json ./.. # set up time update cronjob -cat > /etc/cron.hourly/ntpdate << EOF +sudo bash -c "cat > /etc/cron.hourly/ntpdate << EOF #!/bin/sh sudo service ntp stop sudo ntpdate -s ntp.ubuntu.com sudo service ntp start -EOF +EOF" sudo chmod 755 /etc/cron.hourly/ntpdate