From ca670f24bdb0ec7488fbeeeaed14fc82f8e50a5e Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Tue, 30 Sep 2014 19:54:54 +0200 Subject: spamd, replace the shell calls by unlink_if_exists() and symlink() --- config/spamd/spamd.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/spamd') diff --git a/config/spamd/spamd.inc b/config/spamd/spamd.inc index d55dc132..e09b2b7f 100644 --- a/config/spamd/spamd.inc +++ b/config/spamd/spamd.inc @@ -160,8 +160,8 @@ function sync_package_spamd() { log_error("Restart cron"); mwexec("killall -HUP cron"); log_error("Setting up spamd.conf symlink"); - mwexec("rm -f $localpath/etc/spamd/spamd.conf"); - mwexec("ln -s /etc/spamd.conf $localpath/etc/spamd/spamd.conf"); + unlink_if_exists("$localpath/etc/spamd/spamd.conf"); + symlink("/etc/spamd.conf", "$localpath/etc/spamd/spamd.conf"); log_error("Stopping spamd"); mwexec("/usr/local/etc/rc.d/spamd.sh stop"); -- cgit v1.2.3