From 9ffb62808c6b0dddcce57f66777c3d7236287ab5 Mon Sep 17 00:00:00 2001 From: Daniel Stefan Haischt Date: Sat, 5 Aug 2006 03:12:29 +0000 Subject: - delete files that were copied in place by pkg_add --- packages/p3scan-pf/p3scan-pf.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/p3scan-pf/p3scan-pf.inc b/packages/p3scan-pf/p3scan-pf.inc index 03773f47..49906f6f 100644 --- a/packages/p3scan-pf/p3scan-pf.inc +++ b/packages/p3scan-pf/p3scan-pf.inc @@ -250,6 +250,9 @@ EOD; ) ); } + + /* finally get rid of files that were instaled by the package */ + removePackageLeftovers(); conf_mount_ro(); config_unlock(); @@ -326,9 +329,19 @@ function custom_php_deinstall_command() { unlink_if_exists("/usr/local/etc/p3scan/p3scan.mail"); unlink_if_exists("/usr/local/etc/rc.d/030.p3scan.sh"); rmdir("/usr/local/etc/p3scan"); + mwexec("rm -rf /var/spool/p3scan"); + mwexec("rm -rf /var/run/p3scan"); + mwexec("rm -rf /var/run/p3scan"); conf_mount_ro(); } +function removePackageLeftovers() { + unlink_if_exists("/usr/local/etc/rc.d/p3scan.sh"); + unlink_if_exists("/usr/local/etc/p3scan.conf.sample"); + unlink_if_exists("/usr/local/etc/p3scan.mail.sample"); + +} + function add_trans_table(){ global $config; -- cgit v1.2.3