module.exports = function(app, logger, argv, router) {
    logger.info('module linux');
    require('shelljs/global');

    if (!which('git')) {
        echo('Sorry, this script requires git');
        //exit(1);
    }


    ls('*.js').forEach(function(file) {
        console.log(file)
    });

    router.get('/shell/list', function(req, res) {
        var shell = require('shelljs');
        var cmdlist = [];
        for (cmd in shell) {
            cmdlist.push(cmd);
        }
        res.json(cmdlist);
    });

    router.post('/shell/cmd', function(req, res) {
        var cmd = req.body.cmd;
        var opt = req.body.opt;
        var shell = require('shelljs');
        shell[cmd](opt);
        res.json({
            message: 'call linux shell command!'
        });
    });


    router.post('/call', function(req, res) {
        var ffi = require('ffi');

        var libm = ffi.Library('libm', {
            'ceil': ['double', ['double']]
        });
        console.log(libm.ceil(1.5)); // 2

        // You can also access just functions in the current process by passing a null
        var current = ffi.Library(null, {
            'atoi': ['int', ['string']]
        });
        console.log(current.atoi('1234')); // 1234

        res.json({
            message: 'call linux lib!'
        });
    });


    router.get('/reboot', function(req, res) {
        p.exec('sudo reboot',
            function(error, stdout, stderr) {
                console.log("reboot");
                debuginf(stdout);
            });
        res.json("System rebooting");
    });

    app.use('/linux', router);
}
@@ -38,22 +38,23 @@
 , argv, 
-router
+express
 ) %7B%0A    
@@ -109,24 +109,58 @@
 s/global');%0A
+    var router = express.Router();
 %0A    if (!wh

fix bug