diff options
author | Keine_Ahnung <no@mail.com> | 2013-01-25 23:44:14 +0100 |
---|---|---|
committer | Keine_Ahnung <no@mail.com> | 2013-01-25 23:44:14 +0100 |
commit | ae5b527244847d6477ca31f09b0dac808346d660 (patch) | |
tree | 56e2d4f7b85593195d3da11d68d2a95d8e3a0f05 /script/vdr-uactivity | |
parent | 5727d72f708345a39e1ccda222f7643a25732191 (diff) | |
download | vdr-plugin-uactivity-ae5b527244847d6477ca31f09b0dac808346d660.tar.gz vdr-plugin-uactivity-ae5b527244847d6477ca31f09b0dac808346d660.tar.bz2 |
watchdog/key demos
Diffstat (limited to 'script/vdr-uactivity')
-rw-r--r-- | script/vdr-uactivity | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/script/vdr-uactivity b/script/vdr-uactivity index b1504bf..ee3b3c8 100644 --- a/script/vdr-uactivity +++ b/script/vdr-uactivity @@ -33,12 +33,26 @@ done [ -d "${PARAM_CONFIGDIRECTORY}/${PARAM_REASON}" ] || exit 0 +case "${PARAM_REASON}" in + activity) + commandline="${PARAM_ORGIN} ${PARAM_VALUE}" + ;; + key) + [ "${PARAM_VALUE}" != "_Setup" ] \ + && commandline="${PARAM_ORGIN} ${PARAM_VALUE}" \ + || commandline="${PARAM_ORGIN} ''" + ;; + watchdog) + commandline="${PARAM_ORGIN} ''" + ;; +esac + hooks="$(find "${PARAM_CONFIGDIRECTORY}/${PARAM_REASON}" -maxdepth 1 -xtype f -name '[0-9][0-9]*' | sort)" for hook in ${hooks}; do if [ -x $hook ]; then - $hook $PARAM_ORGIN $PARAM_VALUE "$PARAM_CONFIGDIRECTORY" "$PARAM_CACHEDIRECTORY" "$PARAM_RESOURCEDIRECTORY" + eval $hook $commandline "$PARAM_CONFIGDIRECTORY" "$PARAM_CACHEDIRECTORY" "$PARAM_RESOURCEDIRECTORY" else - /bin/sh $hook $PARAM_ORGIN $PARAM_VALUE "$PARAM_CONFIGDIRECTORY" "$PARAM_CACHEDIRECTORY" "$PARAM_RESOURCEDIRECTORY" + eval /bin/sh $hook $commandline "$PARAM_CONFIGDIRECTORY" "$PARAM_CACHEDIRECTORY" "$PARAM_RESOURCEDIRECTORY" fi [ $? -ne 0 ] && ${LOG} "error when executing ${hook}" done |