Guest User

Untitled

a guest
Apr 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: notify-iphone
  4. # Default-Start: 2 3 4 5
  5. # Default-Stop: 0 1 6
  6. # Short-Description: Sends prowl notifcation
  7. ### END INIT INFO
  8.  
  9. # Author: James Hannah <jiphex@gmail.com>
  10.  
  11. # Do NOT "set -e"
  12.  
  13. # Read configuration variable file if it is present
  14. [ -r /etc/default/$NAME ] && . /etc/default/$NAME
  15.  
  16. # Load the VERBOSE setting and other rcS variables
  17. . /lib/init/vars.sh
  18.  
  19. # Define LSB log_* functions.
  20. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
  21. . /lib/lsb/init-functions
  22.  
  23. WHATHAPPENED=$1
  24.  
  25. #
  26. # Function that starts the daemon/service
  27. #
  28. do_notify()
  29. {
  30. /usr/local/bin/notify.sh `hostname -s` was ${WHATHAPPENED}ed.
  31. }
  32.  
  33. case "$1" in
  34. *)
  35. [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
  36. do_notify
  37. ;;
  38. esac
  39.  
  40. :
Add Comment
Please, Sign In to add comment