aboutsummaryrefslogtreecommitdiff
path: root/misc/xfeast
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-13 15:37:49 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-13 15:37:49 -0200
commit454c6e3c77b3db507ee81875219089047fc2d5a3 (patch)
tree34ea351902ddd6094bc0a96a65b4bc07e9ee83d8 /misc/xfeast
downloadscripts-454c6e3c77b3db507ee81875219089047fc2d5a3.tar.gz
scripts-454c6e3c77b3db507ee81875219089047fc2d5a3.tar.bz2
Initial import
Diffstat (limited to 'misc/xfeast')
-rwxr-xr-xmisc/xfeast15
1 files changed, 15 insertions, 0 deletions
diff --git a/misc/xfeast b/misc/xfeast
new file mode 100755
index 0000000..8a8504a
--- /dev/null
+++ b/misc/xfeast
@@ -0,0 +1,15 @@
+#!/bin/bash
+#
+# xfeast: execute silc gateway
+#
+
+pid="$HOME/tmp/silc.pid"
+if [[ -f "$pid" ]]; then
+ if `ps $pid | grep -q $pid`; then
+ kill `cat $pid`
+ fi
+ rm $pid
+fi
+netcat -l -p 1706 -e "/usr/bin/feast .feast.conf" &
+echo "$!" > $pid
+trap "kill `cat $pid`" 2 15