diff options
author | Wen Heping <wen@FreeBSD.org> | 2012-08-18 07:18:24 +0000 |
---|---|---|
committer | Wen Heping <wen@FreeBSD.org> | 2012-08-18 07:18:24 +0000 |
commit | bd251b6b764a45a77005688c5f2c55140f5c8532 (patch) | |
tree | 770c3de3a5166a5db71e7df175e451de5df04efb /finance/trytond | |
parent | dfe7a32277ca919dd8779e1b28f17fa89d10fad0 (diff) | |
download | ports-bd251b6b764a45a77005688c5f2c55140f5c8532.tar.gz ports-bd251b6b764a45a77005688c5f2c55140f5c8532.zip |
Notes
Diffstat (limited to 'finance/trytond')
-rw-r--r-- | finance/trytond/Makefile | 3 | ||||
-rw-r--r-- | finance/trytond/files/trytond.in | 41 |
2 files changed, 43 insertions, 1 deletions
diff --git a/finance/trytond/Makefile b/finance/trytond/Makefile index 14be34c62e9b..d619e5c30e67 100644 --- a/finance/trytond/Makefile +++ b/finance/trytond/Makefile @@ -7,8 +7,9 @@ PORTNAME= trytond PORTVERSION= 2.4.1 +PORTREVISION= 1 CATEGORIES= finance python -MASTER_SITES= http://downloads2.tryton.org/2.4/ +MASTER_SITES= http://downloads2.tryton.org/${PORTVERSION:R}/ MAINTAINER= wen@FreeBSD.org COMMENT= A three-tiers high-level general purpose application platform diff --git a/finance/trytond/files/trytond.in b/finance/trytond/files/trytond.in new file mode 100644 index 000000000000..8a4b091c50c2 --- /dev/null +++ b/finance/trytond/files/trytond.in @@ -0,0 +1,41 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: trytond +# REQUIRE: postgresql LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable trytond +# +# +# trytond_enable (bool): Set to "NO" by default, +# Set it to "YES" to enable trytond + +. /etc/rc.subr + +name=trytond +rcvar=trytond_enable + +load_rc_config $name + +trytond_enable="${trytond_enable:-"NO"}" +trytond_config="${trytond_config:-"%%PREFIX%%/etc/trytond.conf"}" +trytond_user="${trytond_user:-"trytond"}" +trytond_logdir="${trytond_logdir:-"$(dirname `grep logfile %%PREFIX%%/etc/trytond.conf | awk -F "=" ' { print $2 } ' `)"}" + +command=%%PREFIX%%/bin/trytond +command_args="--config=${trytond_config} >/dev/null 2>&1 &" + +pidfile="${trytond_pidfile:-"$(grep pidfile %%PREFIX%%/etc/trytond.conf | awk -F "=" ' { print $2 } ' |sed 's/[ ]//g' )"}" +required_files="${trytond_config}" + +start_precmd="${name}_prestart" + +trytond_prestart () +{ + install -d -o ${trytond_user} $(dirname "${trytond_pidfile}") + install -d -o ${trytond_user} ${trytond_logdir} +} + +run_rc_command "$1" |