summaryrefslogtreecommitdiff
path: root/newfile.sh
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-22 17:34:33 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-22 17:34:33 (GMT)
commit70329443abb6008ed004f3a90b79ba93ea492492 (patch)
treed2616d5893046cd96d48a90958167587f37ae1db /newfile.sh
parente17921ef33bc4eda43d07bafbf63596e6f87e6bd (diff)
script gets called now
added smaple newfile.sh
Diffstat (limited to 'newfile.sh')
-rwxr-xr-xnewfile.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/newfile.sh b/newfile.sh
new file mode 100755
index 0000000..453b3d6
--- /dev/null
+++ b/newfile.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+DIR=$1
+FILENAME=$2
+
+if [ -z "$FILENAME" ]; then
+ exit 1;
+fi
+
+echo "new file detected $DIR/$FILENAME" >> /tmp/newfile.log
+sleep 5
+rm $DIR/$FILENAME >> /tmp/newfile.log 2>&1
+
+exit 0 \ No newline at end of file