diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2012-02-28 13:12:48 -0700 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2012-02-28 14:45:15 -0700 |
commit | feef287ead62815b1a67bac15ebaa2d36226d4e2 (patch) | |
tree | 9e566f1c458a43128d649125af54596ae7a8ef19 /etc/phpshellsessions | |
parent | 6c046206508d5a36a7a52b6cd9c52936c388cb62 (diff) | |
download | pfsense-feef287ead62815b1a67bac15ebaa2d36226d4e2.zip pfsense-feef287ead62815b1a67bac15ebaa2d36226d4e2.tar.gz |
Remove obsolete files after gitsync
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r-- | etc/phpshellsessions/gitsync | 6 |
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(); |