Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- ### BEGIN INIT INFO
- # Provides: notify-iphone
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Sends prowl notifcation
- ### END INIT INFO
- # Author: James Hannah <jiphex@gmail.com>
- # Do NOT "set -e"
- # Read configuration variable file if it is present
- [ -r /etc/default/$NAME ] && . /etc/default/$NAME
- # Load the VERBOSE setting and other rcS variables
- . /lib/init/vars.sh
- # Define LSB log_* functions.
- # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
- . /lib/lsb/init-functions
- WHATHAPPENED=$1
- #
- # Function that starts the daemon/service
- #
- do_notify()
- {
- /usr/local/bin/notify.sh `hostname -s` was ${WHATHAPPENED}ed.
- }
- case "$1" in
- *)
- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
- do_notify
- ;;
- esac
- :
Add Comment
Please, Sign In to add comment