diff --git a/src/opnsense/scripts/firmware/sync.sh b/src/opnsense/scripts/firmware/sync.sh index a8e34509a..e7562b431 100755 --- a/src/opnsense/scripts/firmware/sync.sh +++ b/src/opnsense/scripts/firmware/sync.sh @@ -30,5 +30,5 @@ LOCKFILE=/tmp/pkg_upgrade.progress : > ${LOCKFILE} echo "***GOT REQUEST TO SYNC***" >> ${LOCKFILE} -. /usr/local/opnsense/scripts/firmware/sync.subr.sh +. /usr/local/opnsense/scripts/firmware/sync.subr.sh > /dev/null echo '***DONE***' >> ${LOCKFILE} diff --git a/src/opnsense/scripts/firmware/sync.subr.sh b/src/opnsense/scripts/firmware/sync.subr.sh index b9992cd48..3871de4fd 100755 --- a/src/opnsense/scripts/firmware/sync.subr.sh +++ b/src/opnsense/scripts/firmware/sync.subr.sh @@ -37,18 +37,18 @@ for PACKAGE in $(/usr/local/sbin/pluginctl -g system.firmware.plugins | \ # plugins must pass a version check on up-to-date core package if [ "$(pkg version -t ${COREVER} ${REPOVER})" = "<" ]; then - echo "Installation out of date. The update to ${COREPKG}-${REPOVER} is required." >> ${LOCKFILE} 2>&1 + echo "Installation out of date. The update to ${COREPKG}-${REPOVER} is required." | ${TEE} ${LOCKFILE} break fi MUSTCHECK= fi - pkg install -y ${PACKAGE} >> ${LOCKFILE} 2>&1 - /usr/local/opnsense/scripts/firmware/register.php install ${PACKAGE} >> ${LOCKFILE} 2>&1 + (pkg install -y ${PACKAGE} 2>&1) | ${TEE} ${LOCKFILE} + (/usr/local/opnsense/scripts/firmware/register.php install ${PACKAGE} 2>&1) | ${TEE} ${LOCKFILE} fi done if [ -z "${MUSTCHECK}" ]; then - pkg autoremove -y >> ${LOCKFILE} 2>&1 + (pkg autoremove -y 2>&1) | ${TEE} ${LOCKFILE} fi