fixbug when reset shadowsock password

This commit is contained in:
jysperm
2014-08-31 10:43:30 +08:00
parent f6636f36a3
commit c3d768cb43
2 changed files with 6 additions and 1 deletions

View File

@@ -21,7 +21,8 @@ exports.post '/reset_password', (req, res) ->
req.account.attribute.plugin.shadowsocks.password = password
service.restart req.account, ->
res.json {}
service.restartAccount req.account, ->
res.json {}
wiki_router = express.Router()

View File

@@ -121,6 +121,10 @@ module.exports =
child_process.exec 'sudo supervisorctl update', ->
callback()
restartAccount: (account, callback) ->
child_process.exec "sudo supervisorctl restart shadowsocks-#{account.username}", ->
callback()
monitoring: ->
queryIptablesInfo (iptables_info) ->
async.map _.values(iptables_info), (item, callback) ->