Guest User

Untitled

a guest
Mar 4th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: rc.local
  4. # Required-Start: $all
  5. # Required-Stop:
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop:
  8. # Short-Description: Run /etc/rc.local if it exist
  9. ### END INIT INFO
  10.  
  11.  
  12. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  13.  
  14. . /lib/init/vars.sh
  15. . /lib/lsb/init-functions
  16.  
  17. do_start() {
  18. if [ -x /etc/rc.local ]; then
  19. [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
  20. /etc/rc.local
  21. ES=$?
  22. [ "$VERBOSE" != no ] && log_end_msg $ES
  23. return $ES
  24. fi
  25. }
  26.  
  27. case "$1" in
  28. start)
  29. do_start
  30. ;;
  31. restart|reload|force-reload)
  32. echo "Error: argument '$1' not supported" >&2
  33. exit 3
  34. ;;
  35. stop|status)
  36. # No-op
  37. exit 0
  38. ;;
  39. *)
  40. echo "Usage: $0 start|stop" >&2
  41. exit 3
  42. ;;
  43. esac
Add Comment
Please, Sign In to add comment