Skip to content

Commit

Permalink
Remote script configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
uzyn committed Apr 4, 2013
1 parent bc79bd9 commit 936f2a8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 16 additions & 2 deletions config.php.default
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @link http://zynesis.com
* @license MIT License
*/

define('BASE_DIR', dirname(__FILE__).'/');

/**
Expand All @@ -20,7 +20,21 @@ $APP_CONF = array(
'data_dir' => BASE_DIR . 'data/',
'lsyncd_conf_template' => BASE_DIR . 'lsyncd.conf.lua.template',
'path_to_lsyncd' => 'lsyncd',
//'dry_run' => true
//'dry_run' => true,

/**
* Run script (located locally) on slaves
* @param boolean enabled Whether script should be run on slaves
* @param string local_path Local path to the script
* @param boolean run_script_on_all_slaves
* true: run remote_script on all slaves whenever there are changes in slaves
* false: run remote_script only on newly discovered slaves
*/
'remote_script' => array(
'enabled' => false,
'local_path' => BASE_DIR . 'data/remote-script.sh',
'run_script_on_all_slaves' => false,
)
);

/**
Expand Down
4 changes: 4 additions & 0 deletions data/remote-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
echo "This is an example remote script";
whoami;
ls;

0 comments on commit 936f2a8

Please sign in to comment.