Skip to content
Snippets Groups Projects
Commit a86893e2 authored by Stefan Laudemann's avatar Stefan Laudemann
Browse files

Adds check for A.L.F.R.E.D major version > 2013 and sends

ffpb-debug-report on crash.

As it is only assumed that the bug, which causes A.L.F.R.E.D. 2013.4 to
crash, got fixed in 2014.1, it is important to know whether or not this
really is the case. Hence, an additional check got implemented that
tests for the A.L.F.R.E.D. daemon's major version. If the major version
is greater than 2013 an additional ffpb-debug-report gets issued
automatically, so that the dev-team gets informed about the crash.
parent 5759e2aa
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
LOCK_FILE="/tmp/.alfred_watchdog_lock"
ALFRED_MAJOR_VERSION=`/usr/sbin/alfred --version | awk 'NR==1{print substr($0,18,4)};'`
[[ -e ${LOCK_FILE} ]] && exit 0;
......@@ -8,13 +9,13 @@ LOCK_FILE="/tmp/.alfred_watchdog_lock"
rand=`tr -cd 0-9 </dev/urandom | head -c 32`
delay=`expr ${rand} % 55`
sleep ${delay}m
#sleep ${delay}m
/usr/sbin/alfred -b bat0 -r 158 > /dev/null 2&>1
if [[ "$?" == 255 ]] ; then
if [[ "$?" == 255 ]] ; then
logger -s -t ffpb-alfred-watchdog -p local0.info "A.L.F.R.E.D. appears to be dead. Triggering a restart now."
/etc/init.d/alfred restart > /dev/null 2&>1
[[ "$ALFRED_MAJOR_VERSION" -gt 2013 ]] && /bin/ffpb-debug > /dev/null 2&>1
fi
[[ -e ${LOCK_FILE} ]] && /bin/rm ${LOCK_FILE}
[[ -e ${LOCK_FILE} ]] && /bin/rm ${LOCK_FILE}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment