mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
- Add rc script [1]
- Improve Makefile by use PORTVERSION:R Submitted by: Matthias Petermann <matthias@d2ux.net> (via Email) [1] Reviewed by: dougb@ [1] Thanks to: danfe@ [2]
This commit is contained in:
parent
dfe7a32277
commit
bd251b6b76
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=302704
@ -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
|
||||
|
41
finance/trytond/files/trytond.in
Normal file
41
finance/trytond/files/trytond.in
Normal file
@ -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"
|
Loading…
Reference in New Issue
Block a user