Explorar o código

Always log to STDERR

Zachary Kotlarek %!s(int64=14) %!d(string=hai) anos
pai
achega
39f25529e7
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      pms/PMSCheck.sh

+ 2 - 1
pms/PMSCheck.sh

@@ -35,9 +35,10 @@ while [ $LOOP -ne 0 ]; do
 	# If Plex has failed kill it
 	if [ -n "${FAILED}" ]; then
 		ERR_MSG="PMS is non-responsive (${FAILED}). Killing..."
+		echo "${ERR_MSG}" 1>&2
+
 		killall 'Plex Media Server'
 		if [ $LOOP -lt 1 ]; then
-			echo "${ERR_MSG}" 1>&2
 			exit 1
 		elif [ -n "${ADMIN_EMAIL}" ]; then
 			echo "${ERR_MSG}" | sendmail "${ADMIN_EMAIL}"