mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-05-17 16:43:28 +08:00
15 lines
426 B
CoffeeScript
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()
|