Jelajahi Sumber

Always log to STDERR

Zachary Kotlarek 14 tahun lalu
induk
melakukan
39f25529e7
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  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}"