diff options
author | Christian Pointner <equinox@spreadspace.org> | 2015-09-21 00:48:24 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2015-09-21 00:48:24 +0200 |
commit | 8a679892b9e6e96b10dfeb16d1caacb096bc116f (patch) | |
tree | dd76a6cc2ccf9558d13b9c3242df7235a2ec34aa /contrib/etc | |
parent | fixed path to examples dir (diff) |
improved install routines (added systemd service unit and initscript
Diffstat (limited to 'contrib/etc')
-rw-r--r-- | contrib/etc/dropnroll/autostart | 2 | ||||
-rw-r--r-- | contrib/etc/dropnroll/sample/config | 31 | ||||
-rwxr-xr-x | contrib/etc/dropnroll/sample/newfile.sh | 15 |
3 files changed, 48 insertions, 0 deletions
diff --git a/contrib/etc/dropnroll/autostart b/contrib/etc/dropnroll/autostart new file mode 100644 index 0000000..067d2c0 --- /dev/null +++ b/contrib/etc/dropnroll/autostart @@ -0,0 +1,2 @@ +sample +#disabled diff --git a/contrib/etc/dropnroll/sample/config b/contrib/etc/dropnroll/sample/config new file mode 100644 index 0000000..5c90d94 --- /dev/null +++ b/contrib/etc/dropnroll/sample/config @@ -0,0 +1,31 @@ +############################# +## Main options # +############################# + +## the path to the command socket +command-sock /var/run/dropnroll/sample.sock + +## Maximum Number of children (scripts) to call at once +max-children 8 + +## What to do when new files trigger the children limit +children-policy defer + +## Statically configured directories to watch +#dir /some/path +#dir /yet/another/path + + +############################# +## Expert options # +############################# + +## log to syslog with a level of 3 +log syslog:3,dropnroll-sample,daemon + +## change user and group after init +#username nobody +#groupname nogroup + +## chroot to users home directory +#chroot /var/run/dropnroll diff --git a/contrib/etc/dropnroll/sample/newfile.sh b/contrib/etc/dropnroll/sample/newfile.sh new file mode 100755 index 0000000..600b5f1 --- /dev/null +++ b/contrib/etc/dropnroll/sample/newfile.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +DIR=$1 +FILENAME=$2 +SIZE=$3 + +if [ -z "$FILENAME" ]; then + exit 1; +fi + +echo "new file of size $SIZE detected: $DIR/$FILENAME" >> /tmp/dropnroll-sample.log +sleep 5 +rm -f $DIR/$FILENAME >> /tmp/dropnroll-sample.log 2>&1 + +exit 0 |