geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

FreeBSD.rc.d (1482B)


      1 #!/bin/sh
      2 
      3 # PROVIDE: geomyidae
      4 # REQUIRE: DAEMON
      5 # BEFORE:  LOGIN
      6 # KEYWORD: shutdown
      7 
      8 
      9 . /etc/rc.subr
     10 
     11 name=geomyidae
     12 rcvar=$name
     13 
     14 command="/usr/local/bin/$name"
     15 
     16 geomyidae_enable=${geomyidae_enable:-"NO"}
     17 
     18 #####################################################
     19 # Geomyidae Options Section - "?" => geomyidae(8)   #
     20 #  Uncomment & define options (defaults are shown)  #
     21 #####################################################
     22 #
     23 #LOGFILE="-l /var/log/gopherlog"
     24 #LOGLEVEL="-v 7"
     25 #HTDOCS="-b /var/gopher"
     26 #PORT="-p 70"
     27 #SPORT="-o 70"
     28 #USR="-u $USER"
     29 #GRP="-g $GROUP"
     30 #HOST="-h localhost"
     31 #IP="-i 127.0.0.1"
     32 
     33 ######################################################
     34 # Next, add all DEFINED options to command_args=     #
     35 ######################################################
     36 #
     37 #command_args="$LOGFILE $LOGLEVEL $HTDOCS $PORT $SPORT $USR $GRP $HOST $IP"
     38 #command_args=""
     39 
     40 
     41 ######################################################
     42 #  Uncomment this section if a PID file is desired   #
     43 ######################################################
     44 
     45 #pidfile="/var/run/${name}.pid"
     46 #start_cmd="geomyidae_start"
     47 #
     48 #geomyidae_start()
     49 #{
     50 #        echo "Starting $name"
     51 #        $command $command_args
     52 #        pgrep -n $name > $pidfile
     53 #}
     54 
     55 ######################################################
     56 #  Lastly, add the following to /etc/rc.conf:        #
     57 #  "geomyidae=YES"  (without the quotes)             #
     58 ######################################################
     59 
     60 load_rc_config $name
     61 run_rc_command "$1"