From 42b8a8990fbe87532f15ea76463d8f2878ef5211 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 6 May 2015 08:49:05 -0300 Subject: Replace some exec() calls by proper functions --- config/squid3/34/squid.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'config/squid3') diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index 63db45b8..4a1080ab 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -309,15 +309,17 @@ function squid_install_command() { /* make sure pinger is executable */ if (file_exists(SQUID_LOCALBASE. "/libexec/squid/pinger")) - exec("/bin/chmod a+x ". SQUID_LOCALBASE. "/libexec/squid/pinger"); + @chmod(SQUID_LOCALBASE. "/libexec/squid/pinger", "a+x"); + // XXX: Is it really necessary? if (file_exists("/usr/local/etc/rc.d/squid")) - exec("/bin/rm /usr/local/etc/rc.d/squid"); + unlink_if_exists("/usr/local/etc/rc.d/squid"); squid_write_rcfile(); + // XXX: Is it really necessary? mode is set to 0755 in squid.xml if (file_exists("/usr/local/pkg/swapstate_check.php")) - exec("/bin/chmod a+x /usr/local/pkg/swapstate_check.php"); + @chmod("/usr/local/pkg/swapstate_check.php", "a+x"); write_rcfile(array( "file" => "sqp_monitor.sh", -- cgit v1.2.3