diff options
author | doktornotor <notordoktor@gmail.com> | 2015-10-14 10:47:29 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-10-14 10:47:29 +0200 |
commit | b78cdd190df597857c61a85ee2e3f03c2ad4b16f (patch) | |
tree | ed23504f41b7dd485212cd5e56cc78a31785b84f /config | |
parent | 633a702b9ff9e427ccdb5a9017066c56454ed90d (diff) | |
download | pfsense-packages-b78cdd190df597857c61a85ee2e3f03c2ad4b16f.tar.gz pfsense-packages-b78cdd190df597857c61a85ee2e3f03c2ad4b16f.tar.bz2 pfsense-packages-b78cdd190df597857c61a85ee2e3f03c2ad4b16f.zip |
Some package install/deinstall tweaks
- Nuke one more state broken cronjob people happen to have on their systems from previous versions
- Kill the right processes on uninstall
Diffstat (limited to 'config')
-rwxr-xr-x | config/squid3/34/squid.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index a2b6dc56..cde74ebc 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -502,8 +502,9 @@ function squid_install_command() { // remove unwanted PBI rc script unlink_if_exists("/usr/local/etc/rc.d/squid"); - // remove broken cronjob possibly left over after 'Clear Cache on Log Rotate' misfeature + // remove broken cronjobs possibly left over after 'Clear Cache on Log Rotate' misfeature install_cron_job("/usr/local/pkg/swapstate_check.php clean;", false); + install_cron_job("/bin/rm /var/squid/cache/swap.state;", false); } @@ -516,12 +517,14 @@ function squid_deinstall_command() { /* kill all running services */ update_output_window("Stopping and removing services..."); mwexec('/usr/local/etc/rc.d/sqp_monitor.sh stop'); - mwexec("/bin/ps awux | /usr/bin/grep '[s]quid' | /usr/bin/awk '{ print $2 }' | /usr/bin/xargs kill"); + mwexec("/bin/ps awux | /usr/bin/egrep -i '[s]quid -f|\([s]quid\)' | /usr/bin/awk '{ print $2 }' | /usr/bin/xargs kill"); + mwexec("/bin/ps awux | /usr/bin/grep '[d]iskd' | /usr/bin/awk '{ print $2 }' | /usr/bin/xargs kill"); mwexec("/bin/ps awux | /usr/bin/grep '[d]nsserver' | /usr/bin/awk '{ print $2 }' | /usr/bin/xargs kill"); mwexec("/bin/ps awux | /usr/bin/grep '[u]nlinkd' | /usr/bin/awk '{ print $2 }' | /usr/bin/xargs kill"); /* delete rc scripts */ unlink_if_exists('/usr/local/etc/rc.d/sqp_monitor.sh'); + unlink_if_exists('/usr/local/etc/rc.d/squid.sh'); /* clean up created directories if 'Keep Settings/Data' is disabled */ if (is_array($config['installedpackages']['squidcache'])) { |