Files
RootPanel/plugin/ssh/service.coffee
2014-05-14 14:59:11 +08:00

15 lines
426 B
CoffeeScript

child_process = require 'child_process'
module.exports =
enable: (account, callback) ->
child_process.exec "sudo useradd -m -s /bin/bash #{account.username}", (err, stdout, stderr) ->
throw err if err
callback()
pause: (account, callback) ->
delete: (account, callback) ->
child_process.exec "sudo userdel -rf #{account.username}", (err, stdout, stderr) ->
throw err if err
callback()