mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
30976c339b
The Radicale Project is a complete CalDAV (calendar) and CardDAV (contact) server solution. Approved by: crees (mentor)
45 lines
855 B
Bash
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"
|