Source

iredmail / iRedMail / functions / iredapd.sh

Diff from to

iRedMail/functions/iredapd.sh

     endscript
 }
 EOF
-    elif [ X"${KERNEL_NAME}" == X'FREEBSD' -o X"${KERNEL_NAME}" == X'OPENBSD' ]; then
+    elif [ X"${KERNEL_NAME}" == X'FREEBSD' ]; then
         if ! grep 'iredapd.log' /etc/newsyslog.conf &>/dev/null; then
+            # Define path of PID file to restart iRedAPD service after rotated
+            cat >> /etc/newsyslog.conf <<EOF
+${IREDAPD_LOG_FILE}    ${SYS_ROOT_USER}:${SYS_ROOT_GROUP}   640  7     *    24    Z ${IREDAPD_PID_FILE}
+EOF
+
+    elif [ X"${KERNEL_NAME}" == X'OPENBSD' ]; then
+        if ! grep 'iredapd.log' /etc/newsyslog.conf &>/dev/null; then
+            # Define command used to restart iRedAPD service after rotated
             cat >> /etc/newsyslog.conf <<EOF
 ${IREDAPD_LOG_FILE}    ${SYS_ROOT_USER}:${SYS_ROOT_GROUP}   640  7     *    24    Z "${DIR_RC_SCRIPTS}/iredapd restart"
 EOF