Skip to content

Commit

Permalink
Create rc.d_freebsd_server
Browse files Browse the repository at this point in the history
  • Loading branch information
Oxy976 committed Apr 11, 2017
1 parent de2ccc1 commit 52ec334
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions rc.d_freebsd_server
@@ -0,0 +1,26 @@
#!/bin/sh
#
#
# PROVIDE: urbackupsrv
# REQUIRE: DAEMON netif LOGIN
#
# For start this in FreeBSD need copy to /usr/local/etc/rc.d/urbackupsrv
# And add urbackupsrv_enable="YES" in rc.conf

. /etc/rc.subr

name="urbackupsrv"
desc="UrBackup - backup server"
rcvar=`set_rcvar`
pidfile="/var/run/${name}.pid"
command="/usr/local/bin/${name}"

start_cmd="ur_start"

ur_start()
{
${command} run --daemon
}

load_rc_config $name
run_rc_command "$1"

0 comments on commit 52ec334

Please sign in to comment.