"dev": "scripty",
"start": "node server",
"check": "scripty",
+ "upgrade": "scripty",
"test": "scripty",
"help": "scripty",
"postinstall": "cd client && npm install"
printf " dev -> Watch, run the livereload and run the server so that you can develop the application\n"
printf " start -> Run the server\n"
printf " check -> Check the server (according to NODE_ENV)\n"
+printf " upgrade -- [branch] -> Upgrade the application according to the [branch] parameter\n"
printf " test -> Run the tests\n"
printf " help -> Print this help\n"
--- /dev/null
+#!/usr/bin/env sh
+
+
+git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1
+
+if [[ `pgrep peertube` > /dev/null ]]; then
+ echo 'PeerTube is running!'
+ exit 0
+fi
+
+npm install
+npm update
+cd client && npm update && cd ../
+npm run build
+
+echo "\n\nUpgrade finished! You can restart PeerTube that may run the migration scripts."
const TrackerServer = require('bittorrent-tracker').Server
const WebSocketServer = require('ws').Server
+process.title = 'peertube'
+
// Create our main app
const app = express()