Init

/*
 * init
 *
 * Initialize the server by setting up a suitable project structure.
 */
plan.remote('init', function(remote) {
    var root = plan.runtime.options.root;
    var targets = plan.runtime.options.targets;
    var user = plan.runtime.options.user;

    targets.forEach(function(target) {
        var dir = root + '/' + target;

        remote.sudo('mkdir -p ' + dir + '/releases', { user: user });
        remote.sudo('mkdir -p ' + dir + '/shared', { user: user });
    });
});