1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00

- Actually commit rc script fixes

- Convert to new Perl USES
- Move pkg-install logic to @exec and post-install
- Other suggested cleanup

Approved by:	crees (mentor)
This commit is contained in:
Mark Felder 2013-08-30 14:42:06 +00:00
parent c2405350bb
commit 0554302787
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=325702
5 changed files with 25 additions and 37 deletions

View File

@ -8,15 +8,16 @@ CATEGORIES= mail
MASTER_SITES= http://archiveopteryx.org/download/
MAINTAINER= feld@FreeBSD.org
COMMENT= An advanced PostgreSQL-based IMAP/POP server
COMMENT= Advanced PostgreSQL-based IMAP/POP server
LICENSE= BSD
LICENSE_FILE= ${WRKSRC}/bsd.txt
BUILD_DEPENDS= jam:${PORTSDIR}/devel/jam
USES= perl5
USE_BZIP2= yes
USE_PERL5_BUILD= yes
USE_PERL5= build
USE_PGSQL= yes
MAN5= aoxsuper.conf.5 archiveopteryx.conf.5
@ -47,7 +48,8 @@ do-install:
@cd ${WRKSRC} && ${JAM} install
post-install:
@${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
${INSTALL} -d -o root -g wheel -m 700 /var/db/aox/jail
${INSTALL} -d -o ${USERS} -g ${GROUPS} /var/db/aox/messages
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -15,46 +15,41 @@
. /etc/rc.subr
name="archiveopteryx"
name=archiveopteryx
rcvar=archiveopteryx_enable
load_rc_config $name
archiveopteryx_enable=${archiveopteryx_enable:-"NO"}
pidfile=/var/run/${name}.pid
pidfile=/var/run/aox/${name}.pid
config_file=%%PREFIX%%/etc/archiveopteryx/archiveopteryx.conf
required_files=$config_file
command=%%PREFIX%%/bin/aox
extra_commands="status"
status_cmd="do_status"
start_cmd="do_start"
stop_cmd="do_stop"
restart_cmd="do_restart"
extra_commands=status
status_cmd="${command} show status"
start_cmd=do_start
stop_cmd=do_stop
restart_cmd=do_restart
do_start()
{
echo -n "Starting Archiveopteryx: "
${command} start
echo "done."
echo -n "Starting Archiveopteryx: "
${command} start
echo "done."
}
do_stop()
{
echo -n "Stopping Archiveopteryx: "
${command} stop
echo "done."
echo -n "Stopping Archiveopteryx: "
${command} stop
echo "done."
}
do_restart()
{
echo -n "Restarting Archiveopteryx: "
${command} restart
echo "done."
echo -n "Restarting Archiveopteryx: "
${command} restart
echo "done."
}
do_status()
{
${command} show status
}
load_rc_config $name
run_rc_command "$1"

View File

@ -3,4 +3,4 @@ long-term archival storage. It seeks to make it practical not only to
manage large archives, but to use the information therein on a daily
basis instead of relegating it to offline storage.
WWW: http://www.archiveopteryx.org/
WWW: http://www.archiveopteryx.org/

View File

@ -1,11 +0,0 @@
#!/bin/sh
INSTALL=/usr/bin/install
AOXGROUP=aox
AOXUSER=aox
if [ "$2" = POST-INSTALL ]; then
${INSTALL} -d -o root -g wheel -m 700 /var/db/aox/jail
${INSTALL} -d -o ${AOXUSER} -g ${AOXGROUP} /var/db/aox/messages
${INSTALL} -d -o ${AOXUSER} -g ${AOXGROUP} /var/run/aox
fi

View File

@ -23,3 +23,5 @@ sbin/recorder
@dirrmtry /var/db/aox/messages
@dirrmtry /var/db/aox
@dirrmtry /var/run/aox
@exec install -d -o root -g wheel -m 700 /var/db/aox/jail
@exec install -d -o %%USERS%% -g %%GROUPS%% /var/db/aox/messages