From f0ce6758e81a036a6eee144549cbe9e4c72bbe8e Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Wed, 10 Nov 2010 03:03:00 -0700 Subject: Add option to System: Firmware: Settings for running gitsync after installing an update, hidden/disabled if git has not been installed yet. --- tmp/post_upgrade_command.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tmp') diff --git a/tmp/post_upgrade_command.php b/tmp/post_upgrade_command.php index 907e3ab..dfe9342 100755 --- a/tmp/post_upgrade_command.php +++ b/tmp/post_upgrade_command.php @@ -6,6 +6,13 @@ require_once("config.inc"); require_once("functions.inc"); + if(file_exists("/usr/local/bin/git") && isset($config['system']['gitsync']['synconupgrade'])) { + if(isset($config['system']['gitsync']['repositoryurl'])) + exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git config remote.origin.url " . escapeshellarg($config['system']['gitsync']['repositoryurl'])); + if(isset($config['system']['gitsync']['branch'])) + system("pfSsh.php playback gitsync " . escapeshellarg($config['system']['gitsync']['branch']) . " --upgrading"); + } + if($g['platform'] == "embedded") { $config['system']['enableserial'] = true; write_config(); -- cgit v1.1