Commit e09dd0ae authored by Hermann Mayer's avatar Hermann Mayer

[Dist] Added sample custom hooks and updated the sample configurations. (See #16)

parent 305c92b3
......@@ -22,4 +22,8 @@ package() {
make prefix=/usr sysconfdir=/etc DESTDIR="${pkgdir}" install
install -Dm644 dist/archlinux/avm-motion-triggerd.service "$pkgdir"/usr/lib/systemd/system/avm-motion-triggerd.service
install -Dm644 dist/shell-completion/bash/avmctl "$pkgdir"/usr/share/bash-completion/completions/avmctl
install -Dm777 dist/archlinux/avm-motion-trigger.d/pre-motion.sh "$pkgdir"/etc/avm-motion-trigger.d/pre-motion.sh
install -Dm777 dist/archlinux/avm-motion-trigger.d/post-motion.sh "$pkgdir"/etc/avm-motion-trigger.d/post-motion.sh
install -Dm777 dist/archlinux/avm-motion-trigger.d/pre-turn-off.sh "$pkgdir"/etc/avm-motion-trigger.d/pre-turn-off.sh
install -Dm777 dist/archlinux/avm-motion-trigger.d/post-turn-off.sh "$pkgdir"/etc/avm-motion-trigger.d/post-turn-off.sh
}
#!/bin/bash
#
# avm-motion-trigger - custom hook
#
# Custom hook for the `motion detected` action
#
# Keep in mind that this script is executed in a non-blocking manner. So the
# daemon will not wait for this script to finish.
#!/bin/bash
#
# avm-motion-trigger - custom hook
#
# Custom hook for the `turn off` action
#
# Keep in mind that this script is executed in a non-blocking manner. So the
# daemon will not wait for this script to finish.
#!/bin/bash
#
# avm-motion-trigger - custom hook
#
# Custom hook for the `motion detected` action
#
# Keep in mind that this script is executed in a non-blocking manner. So the
# daemon will not wait for this script to finish.
#!/bin/bash
#
# avm-motion-trigger - custom hook
#
# Custom hook for the `turn off` action
#
# Keep in mind that this script is executed in a non-blocking manner. So the
# daemon will not wait for this script to finish.
......@@ -85,3 +85,26 @@ motion_sensor_gpio = 17;
#
# With this setting you can configure which channel of the chip will be read out.
# light_sensor_channel = 0;
#
# Custom hooks
#
# When a motion is triggered the daemon can kick off a custom user defined
# script. If a motion is detected and all configured tests are passed the
# custom motion hook will be executed before the AVM logic will be performed.
# The custom hook will be executed in a non-blocking manner. If
# the hook is not configured, it won't be executed.
# motion_pre_hook = "/etc/avm-motion-trigger.d/pre-motion.sh";
# This hook is triggered right after all configured tests are passed as the
# previous hook. The difference of this hook is that it is executed after the
# AVM logic was performed. The custom hook will be executed in a non-blocking
# manner. If the hook is not configured, it won't be executed.
# motion_post_hook = "/etc/avm-motion-trigger.d/post-motion.sh";
# This hook is executed right after the turn off timeout was passed (when
# configured), before the AVM logic was performed. If the hook is not configured,
# it won't be executed.
# turn_off_pre_hook = "/etc/avm-motion-trigger.d/pre-turn-off.sh";
# This hook is executed right after the turn off timeout was passed (when
# configured), before the AVM logic was performed. If the hook is not configured,
# it won't be executed.
# turn_off_post_hook = "/etc/avm-motion-trigger.d/post-turn-off.sh";
......@@ -53,3 +53,26 @@ motion_sensor_gpio = 24;
# light_sensor_device = "/dev/spidev0.0";
# With this setting you can configure which channel of the chip will be read out.
# light_sensor_channel = 0;
#
# Custom hooks
#
# When a motion is triggered the daemon can kick off a custom user defined
# script. If a motion is detected and all configured tests are passed the
# custom motion hook will be executed before the AVM logic will be performed.
# The custom hook will be executed in a non-blocking manner. If
# the hook is not configured, it won't be executed.
# motion_pre_hook = "/etc/avm-motion-trigger.d/pre-motion.sh";
# This hook is triggered right after all configured tests are passed as the
# previous hook. The difference of this hook is that it is executed after the
# AVM logic was performed. The custom hook will be executed in a non-blocking
# manner. If the hook is not configured, it won't be executed.
# motion_post_hook = "/etc/avm-motion-trigger.d/post-motion.sh";
# This hook is executed right after the turn off timeout was passed (when
# configured), before the AVM logic was performed. If the hook is not configured,
# it won't be executed.
# turn_off_pre_hook = "/etc/avm-motion-trigger.d/pre-turn-off.sh";
# This hook is executed right after the turn off timeout was passed (when
# configured), before the AVM logic was performed. If the hook is not configured,
# it won't be executed.
# turn_off_post_hook = "/etc/avm-motion-trigger.d/post-turn-off.sh";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment