added noreply sender address to start/stop scripts

This commit is contained in:
Axel Uhl committed 2025-05-15 11:22:20 +02:00
1 parent 06067908a0
commit 1e321cd335
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -131,7 +131,7 @@ if [[ $PARAM == "" ]] || [[ $PARAM == "no-update" ]]; then
if [[ $SERVER_PORT == "" ]] || [[ $SERVER_ACTIVE == "" ]]; then
echo "Something went wrong with startup. Please check the logs..."
if [[ ${SERVER_STARTUP_NOTIFY} != "" ]]; then
echo "Startup of java server ${SERVER_NAME} on ${INSTANCE_ID} failed - check the logs ($SERVER_ACTIVE)\n\n$NETSTAT\n$PROCESS_INFO" | mail -s "Server $INSTANCE_ID startup failed!" ${SERVER_STARTUP_NOTIFY}
echo "Startup of java server ${SERVER_NAME} on ${INSTANCE_ID} failed - check the logs ($SERVER_ACTIVE)\n\n$NETSTAT\n$PROCESS_INFO" | mail -r noreply@sapsailing.com -s "Server $INSTANCE_ID startup failed!" ${SERVER_STARTUP_NOTIFY}
fi
exit
fi
@@ -139,9 +139,9 @@ if [[ $PARAM == "" ]] || [[ $PARAM == "no-update" ]]; then
echo "Started $SERVER_NAME - use telnet localhost $TELNET_PORT to connect to the OSGi console. Logs should be found in logs/sailing0.log.0"
if [[ ${SERVER_STARTUP_NOTIFY} != "" ]]; then
if [[ ! -z "$ON_AMAZON" ]]; then
echo "Go to http://$INSTANCE_DNS:$SERVER_PORT to reach your instance!" | mail -s "Server $SERVER_NAME on $INSTANCE_ID started up!" $MAIL_ATTACH_OPTION env.sh $SERVER_STARTUP_NOTIFY
echo "Go to http://$INSTANCE_DNS:$SERVER_PORT to reach your instance!" | mail -r noreply@sapsailing.com -s "Server $SERVER_NAME on $INSTANCE_ID started up!" $MAIL_ATTACH_OPTION env.sh $SERVER_STARTUP_NOTIFY
else
echo "OK" | mail -s "Server $SERVER_NAME on $INSTANCE_ID started up!" $MAIL_ATTACH_OPTION env.sh ${SERVER_STARTUP_NOTIFY}
echo "OK" | mail -r noreply@sapsailing.com -s "Server $SERVER_NAME on $INSTANCE_ID started up!" $MAIL_ATTACH_OPTION env.sh ${SERVER_STARTUP_NOTIFY}
fi
fi
elif [[ $PARAM == "debug" ]]; then