1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00
freebsd-ports/mail/archiveopteryx/files/archiveopteryx.in
Doug Barton 83eb2c3700 In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().

In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
2012-01-14 08:57:23 +00:00

61 lines
1.0 KiB
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: archiveopteryx
# REQUIRE: login
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# archiveopteryx_enable (bool): Set to NO by default.
# Set it to YES to enable archiveopteryx.
#
. /etc/rc.subr
name="archiveopteryx"
rcvar=archiveopteryx_enable
archiveopteryx_enable=${archiveopteryx_enable:-"NO"}
pidfile=/var/run/${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"
do_start()
{
echo -n "Starting Archiveopteryx: "
${command} start
echo "done."
}
do_stop()
{
echo -n "Stopping Archiveopteryx: "
${command} stop
echo "done."
}
do_restart()
{
echo -n "Restarting Archiveopteryx: "
${command} restart
echo "done."
}
do_status()
{
${command} show status
}
load_rc_config $name
run_rc_command "$1"