summaryrefslogtreecommitdiffstats
path: root/tmp
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-11-10 03:03:00 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2010-11-10 03:03:00 -0700
commitf0ce6758e81a036a6eee144549cbe9e4c72bbe8e (patch)
treee3dcaee5a70d0e1db879d20dbe26826d01f44121 /tmp
parent2545af0461093b7805bd467fcf9ae4d51a400fc3 (diff)
downloadpfsense-f0ce6758e81a036a6eee144549cbe9e4c72bbe8e.zip
pfsense-f0ce6758e81a036a6eee144549cbe9e4c72bbe8e.tar.gz
Add option to System: Firmware: Settings for running gitsync after installing an update, hidden/disabled if git has not been installed yet.
Diffstat (limited to 'tmp')
-rwxr-xr-xtmp/post_upgrade_command.php7
1 files changed, 7 insertions, 0 deletions
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();
OpenPOWER on IntegriCloud