#!/bin/sh # ----------------------------------------------------- # Rakka's rc script for NetBSD # ----------------------------------------------------- # Put this file into your /etc/rc.d/ # FreeBSD users should also be able to use this script. # ----------------------------------------------------- # PROVIDE: rakka # REQUIRE: NETWORKING . /etc/rc.subr name="rakka" rcvar=$name command="/tmp/launch_rakka.$$" procname="@RAKKA_BINDIR@/rakka" pidfile="@RAKKA_LOCALSTATEDIR@/pid" # Dirty hack: rakka can't daemonize itself because of Haskell's # forkProcess limitation. trap "unlink '$command'" EXIT cat <<'EOF' >"$command" #!/bin/sh @RAKKA_BINDIR@/rakka $@ & EOF chmod +x "$command" load_rc_config $name run_rc_command "$1"