1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00
freebsd-ports/www/radicale/files/radicale.in
Mark Felder 30976c339b New port: www/radicale
The Radicale Project is a complete CalDAV (calendar) and CardDAV
(contact) server solution.

Approved by:	crees (mentor)
2013-09-23 12:34:10 +00:00

45 lines
855 B
Bash

#!/bin/sh
# Created by: Mark Felder <feld@FreeBSD.org>
# $FreeBSD$
#
# PROVIDE: radicale
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable radicale:
# radicale_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable radicale.
#
. /etc/rc.subr
name=radicale
rcvar=radicale_enable
# set defaults
load_rc_config $name
: ${radicale_enable:=NO}
: ${radicale_config=%%PREFIX%%/etc/radicale/config}
: ${radicale_user=%%USERS%%}
pidfile=/var/run/radicale/radicale.pid
command=%%PREFIX%%/bin/radicale
command_args="-d -p ${pidfile} -C ${radicale_config}"
command_interpreter=python
required_files=${radicale_config}
start_precmd=do_precmd
do_precmd()
{
if [ ! -d ${pidfile%/*} ]; then
install -d -o ${radicale_user} ${pidfile%/*}
fi
}
run_rc_command "$1"