diff options
author | Renato Botelho <renato@netgate.com> | 2015-11-23 12:19:07 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-11-23 12:20:37 -0200 |
commit | de73f5e9bb0b832ca11b7abf2f50a4d91d0db442 (patch) | |
tree | ca8151b83c795743c60cffdce5028e669660c864 /src | |
parent | 1fcfea394f1310492c127226cdd89d6d4002bafe (diff) | |
download | pfsense-de73f5e9bb0b832ca11b7abf2f50a4d91d0db442.zip pfsense-de73f5e9bb0b832ca11b7abf2f50a4d91d0db442.tar.gz |
Teach pfSense-upgrade to run gitsync after upgrade
Diffstat (limited to 'src')
-rwxr-xr-x | src/usr/local/sbin/pfSense-upgrade | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade index 31abf86..1a60d65 100755 --- a/src/usr/local/sbin/pfSense-upgrade +++ b/src/usr/local/sbin/pfSense-upgrade @@ -422,6 +422,18 @@ pkg_upgrade() { _exec "pkg ${pkg_chroot} autoremove" "Removing unnecessary packages" mute ignore_result _exec "pkg ${pkg_chroot} clean" "Cleanup pkg cache" mute ignore_result fi + + gitsync=$(/usr/local/sbin/read_xml_tag.sh boolean system/gitsync/synconupgrade) + if [ "${gitsync}" = "true" ]; then + repository_url=$(/usr/local/sbin/read_xml_tag.sh string system/gitsync/repositoryurl) + branch=$(/usr/local/sbin/read_xml_tag.sh string system/gitsync/branch) + + # Repository URL is not mandatory + if [ -n "${branch}" ]; then + /usr/local/sbin/pfSsh.php playback gitsync \ + ${repositoryurl} ${branch} --upgrading + fi + fi } check_upgrade() { |