From b36978bbbece91c1d3719362b6d3b689934afdaf Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Tue, 31 May 2022 10:46:56 -0300 Subject: [PATCH] Updated startup script to run postfix in foreground --- conf/postfix-service.sh | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/conf/postfix-service.sh b/conf/postfix-service.sh index f805f71..17572f7 100755 --- a/conf/postfix-service.sh +++ b/conf/postfix-service.sh @@ -38,19 +38,7 @@ function serviceStart { serviceConf # Actually run Postfix log "[ Starting Postfix... ]" - nohup /usr/sbin/postfix start-fg & - echo $! > /var/run/postfix.pid -} - -function serviceStop { - log "[ Stopping Postfix... ]" - kill `cat /var/run/postfix.pid` -} - -function serviceRestart { - log "[ Restarting Postfix... ]" - serviceStop - serviceStart + /usr/sbin/postfix start-fg } export DOMAIN=${DOMAIN:-"localhost"} @@ -59,16 +47,4 @@ export MESSAGE_SIZE_LIMIT=${MESSAGE_SIZE_LIMIT:-"50000000"} export RELAYNETS=${RELAYNETS:-""} export RELAYHOST=${RELAYHOST:-""} -case "$1" in - "start") - serviceStart &>> /proc/1/fd/1 - ;; - "stop") - serviceStop &>> /proc/1/fd/1 - ;; - "restart") - serviceRestart &>> /proc/1/fd/1 - ;; - *) echo "Usage: $0 restart|start|stop" - ;; -esac \ No newline at end of file +serviceStart &>> /proc/1/fd/1