Advertisement
Guest User

Untitled

a guest
May 28th, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # Optware setup
  4. # Alternatives Optware Startup und Shutdown Script #/usr/local/etc/rc.d/optware.sh
  5. #
  6. case $1 in
  7. start)
  8. [ ! -h /opt -a ! -d /opt ] && ln -s /volume1/@optware /opt
  9. for i in /opt/etc/init.d/S??* ;do
  10. #
  11. # Ignore dangling symlinks (if any).
  12. [ ! -f "$i" ] && continue
  13. #
  14. case "$i" in
  15. *.sh)
  16. # Source shell script for speed.
  17. (
  18. trap - INT QUIT TSTP
  19. set start
  20. . $i
  21. )
  22. ;;
  23. *)
  24. # No sh extension, so fork subprocess.
  25. $i start
  26. ;;
  27. esac
  28. done
  29. ;;
  30. #
  31. stop)
  32. #
  33. for i in /opt/etc/init.d/S??* ;do
  34. #
  35. # Ignore dangling symlinks (if any).
  36. [ ! -f "$i" ] && continue
  37. #
  38. case "$i" in
  39. *.sh)
  40. # Source shell script for speed.
  41. (
  42. trap - INT QUIT TSTP
  43. set stop
  44. . $i
  45. )
  46. ;;
  47. *)
  48. # No sh extension, so fork subprocess.
  49. $i stop ;;
  50. esac
  51. done
  52. ;;
  53. #
  54. *)
  55. echo "Usage: $0 [start|stop]"
  56. ;;
  57. esac
  58. #
  59. # End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement