Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 3rd, 2011  |  syntax: Bash  |  size: 0.54 KB  |  hits: 155  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. . /etc/rc.conf
  4. . /etc/rc.d/functions
  5.  
  6. case "$1" in
  7.   start)
  8.     stat_busy "Starting frandom"
  9.     modprobe frandom >/dev/null 2>&1
  10.     if [ $? -ne 0 ]; then
  11.       stat_fail
  12.     else
  13.       stat_done
  14.       add_daemon frandom
  15.     fi
  16.     ;;
  17.   stop)
  18.     stat_busy "Stopping frandom"
  19.     rmmod frandom >/dev/null 2>&1
  20.     if [ $? -ne 0 ]; then
  21.         stat_fail
  22.     else
  23.         stat_done
  24.         rm_daemon frandom
  25.     fi
  26.     ;;
  27.   restart)
  28.     $0 stop
  29.     sleep 1
  30.     $0 start
  31.     ;;
  32.   *)
  33.     echo "usage: $0 {start|stop|restart}"  
  34. esac