jupiter-mail/target/scripts/start-services.sh

28 lines
544 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
set -o pipefail
source /usr/local/bin/helpers/index.sh
start_daemon () {
service="$1"
log "info" "Starting service $service..."
result=$(supervisorctl start "${service}" 2>&1)
if [[ ${?} -ne 0 ]]; then
log "error" "Failed to start $service"
exit 1
fi
}
# start daemons
log "info" "Starting daemons..."
# start_daemon fail2ban
# start_daemon rspamd
# start_daemon rspamd-redis
start_daemon saslauthd
start_daemon postgresql
start_daemon dovecot
start_daemon postfix
exec tail "${LOGFILE}"