summaryrefslogtreecommitdiffstats
path: root/etc/phpshellsessions/gitsync
diff options
context:
space:
mode:
Diffstat (limited to 'etc/phpshellsessions/gitsync')
-rw-r--r--etc/phpshellsessions/gitsync6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync
index b91eed2..f66f541 100644
--- a/etc/phpshellsessions/gitsync
+++ b/etc/phpshellsessions/gitsync
@@ -293,6 +293,12 @@ exec("mv $CODIR/pfSenseGITREPO/gitsync_temp.git $CODIR/pfSenseGITREPO/pfSenseGIT
// Reset the repository to restore the deleted files
exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && git reset --hard >/dev/null 2>/dev/null");
+// Remove obsolete files
+$files_to_remove = file("/etc/pfSense.obsoletedfiles");
+foreach($files_to_remove as $file_to_remove)
+ if(file_exists($file_to_remove))
+ exec("/bin/rm -f $file_to_remove");
+
if(!$upgrading)
post_cvssync_commands();
OpenPOWER on IntegriCloud