Permalink
Browse files

* Back to hostname (now from env).

  • Loading branch information...
1 parent 22dbd6d commit d1fb6af7ad579bb698c3321ffabba835d45ad52b @perusio committed Dec 7, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 php-relaunch
View
@@ -121,11 +121,10 @@ for i in $(seq 1 $INTERVAL); do
relaunch_php $PHP_CGI_NAME # php-cgi
fi
## Log the restart and send an alert.
- FQDN_HOSTNAME=$(hostname -f)
- LOG_LINE="$FQDN_HOSTNAME $STATUS_CODE PHP restarted."
+ LOG_LINE="$HOSTNAME $STATUS_CODE PHP restarted."
echo $LOG_LINE | $TS >> $LOG_FILE
## Send an email only if the address is a non null string.
- [ -n "$3" ] && (echo $LOG_LINE | $TS | $MAILX -s "$FQDN_HOSTNAME PHP restart" "$3")
+ [ -n "$3" ] && (echo $LOG_LINE | $TS | $MAILX -s "$HOSTNAME PHP restart" "$3")
sleep $(max $RESPONSE_TIMEOUT 10) # give some time to normalize things
;;
200)

0 comments on commit d1fb6af

Please sign in to comment.