summaryrefslogtreecommitdiff
path: root/contrib/etc
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-09-21 00:48:24 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-09-21 00:48:24 +0200
commit8a679892b9e6e96b10dfeb16d1caacb096bc116f (patch)
treedd76a6cc2ccf9558d13b9c3242df7235a2ec34aa /contrib/etc
parentfixed 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/autostart2
-rw-r--r--contrib/etc/dropnroll/sample/config31
-rwxr-xr-xcontrib/etc/dropnroll/sample/newfile.sh15
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