41 lines
721 B
Plaintext
41 lines
721 B
Plaintext
|
#!/bin/sh
|
||
|
### BEGIN INIT INFO
|
||
|
# Provides: longkeyword
|
||
|
# Required-Start: $remote_fs
|
||
|
# Required-Stop: $remote_fs
|
||
|
# Default-Start: 5
|
||
|
# Default-Stop: 0 1 2 3 4 6
|
||
|
# X-Start-Before: untorify
|
||
|
# Short-Description: Check for the long keyword in
|
||
|
### END INIT INFO
|
||
|
#
|
||
|
# Author: czesiek
|
||
|
#
|
||
|
|
||
|
set -e
|
||
|
|
||
|
NAME=longkeyword
|
||
|
DESC=longkeyword
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
echo -n "Starting $DESC: "
|
||
|
if grep -q iwillnotbuythisrecorditisscratched /proc/cmdline
|
||
|
then
|
||
|
echo "Direct connection keyword found, doing nothing."
|
||
|
else
|
||
|
echo "No keyword for direct connection found, restarting..."
|
||
|
sleep 2
|
||
|
shutdown -h now
|
||
|
fi
|
||
|
echo "Done"
|
||
|
;;
|
||
|
*)
|
||
|
N=/etc/init.d/$NAME
|
||
|
echo "Usage: $N {start}" >&2
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
exit 0
|