summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <makefu@syntax-fehler.de>2011-06-29 23:19:33 +0200
committermakefu <makefu@syntax-fehler.de>2011-06-29 23:19:33 +0200
commit8efab77bc711f12db0ea8fabed469680acaac472 (patch)
treedb18ab40840eb4533d822ad2262e8675564ec7a4
parent312a8cba493d25beab6ff6210ca29a9f2b1bbc04 (diff)
parent68f240ac326dc551ceb17f3349911310cdfae1f2 (diff)
Merge branch 'master' of github.com:krebscode/painload
-rw-r--r--evan/Makefile8
-rwxr-xr-xevan/evan27
-rwxr-xr-xevan/evan-startup73
-rw-r--r--evan/satz-liste9
4 files changed, 117 insertions, 0 deletions
diff --git a/evan/Makefile b/evan/Makefile
new file mode 100644
index 00000000..366e86ee
--- /dev/null
+++ b/evan/Makefile
@@ -0,0 +1,8 @@
+.PHONY: infect
+INSTALL_DIR = /root/bin
+infect:
+ mkdir -p ${INSTALL_DIR}
+ cp evan ${INSTALL_DIR}
+ cp evan-startup /etc/init.d/evan
+ update-rc.d evan start
+
diff --git a/evan/evan b/evan/evan
new file mode 100755
index 00000000..83443fe2
--- /dev/null
+++ b/evan/evan
@@ -0,0 +1,27 @@
+#!/bin/bash
+SATZ_LISTE=/root/evan/satz-liste
+p="${noise_pitch-10}"
+v="${noise_lang-de}"
+k="${noise_capital-0}"
+a="${noise_amplitude-100}"
+g="${noise_gap-1}"
+RND_DELAY=10000
+#set -x
+function helpme ()
+{
+ cat << EOF
+ $0 [-d]
+ -d -- daemonize
+ -h -- this help file
+EOF
+ exit 0
+}
+
+[ "${1:-}" = "-h" ] && helpme
+
+while true
+do
+ espeak -v $v -p $p -k $k -a $a -g $g "`shuf \"$SATZ_LISTE\" | tail -1`"
+ [ ! "${1:-}" = "-d" ] && exit 0 # break if not daemonized
+ sleep $((${RANDOM}%${RND_DELAY}))
+done
diff --git a/evan/evan-startup b/evan/evan-startup
new file mode 100755
index 00000000..a3370bd1
--- /dev/null
+++ b/evan/evan-startup
@@ -0,0 +1,73 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides: evan
+# Required-Start: $remote_fs $network
+# Required-Stop: $remote_fs $network
+# Should-Start: $syslog $named
+# Should-Stop: $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start evan daemons
+# Description:
+
+### END INIT INFO
+#
+# Based on Lubomir Bulej's Redhat init script.
+
+DAEMON="/root/bin/evan"
+PIDFILE="/var/lock/evan"
+NAME="evan"
+DESC="evan daemons"
+TCONF="/etc/evan"
+
+test -f $DAEMON || exit 0
+
+[ -r /etc/default/evan ] && . /etc/default/evan
+
+
+start() {
+ [ -e $PIDFILE ] && echo "$PIDFILE already exists" && return
+ $DAEMON $EXTRA -d "$@" &
+ echo $(($$+1)) > $PIDFILE #TODO fix this ugly hack!
+}
+stop() {
+ [ ! -e $PIDFILE ] && echo "$PIDFILE does not exist" && return
+ kill `cat $PIDFILE`
+ rm $PIDFILE
+}
+
+reload() {
+ echo "do nothing"
+ # do nothing
+}
+
+restart() {
+ stop "$@"
+ start "$@"
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC:"
+ start
+ ;;
+ stop)
+ echo -n "Stopping $DESC:"
+ stop
+ ;;
+ reload|force-reload)
+ echo -n "Reloading $DESC configuration:"
+ reload
+ ;;
+ restart)
+ echo -n "Restarting $DESC:"
+ restart
+ ;;
+ *)
+ echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}"
+ exit 1
+ ;;
+esac
+echo "done"
+exit 0
diff --git a/evan/satz-liste b/evan/satz-liste
new file mode 100644
index 00000000..3c28f38f
--- /dev/null
+++ b/evan/satz-liste
@@ -0,0 +1,9 @@
+wenn ich meinen erzeugten abfall vor dem nach hause gehen beseitige steigt mein soziales ansehen
+bringe eine pflanze mit
+ein sauberer scheck ist ein guter scheck
+auch du weißt wie man den geschirrspüler einräumt
+wer die toilette putzt kommt in den himmel
+der große bruder sieht es gerne wenn die genossen die vereinsräume in stand halten
+henry der staubsauger saugt für dich
+muelltrennung bringt gutes karma
+saubere mitglieder sind glückliche mitglieder