add auto start option

This commit is contained in:
Max Lv
2012-12-17 11:51:22 +08:00
parent 17ae465395
commit 45fc2b4540
7 changed files with 124 additions and 77 deletions
+5 -5
View File
@@ -164,6 +164,11 @@
console.log = function() {};
var pid = ""+process.pid; // need to turn into a string
fs.writeFile('/data/data/com.github.shadowsocks/shadowsocks.pid', pid, function (err) {
// Ignore
});
console.log("calculating ciphers");
tables = getTable(KEY);
@@ -332,11 +337,6 @@
});
});
var pid = ""+process.pid; // need to turn into a string
fs.writeFile('/data/data/com.github.shadowsocks/shadowsocks.pid', pid, function (err) {
// Ignore
});
server.listen(PORT, function() {
return console.log("server listening at port " + PORT);
});