- update to 3.21

- add rc.d script
This commit is contained in:
Dirk Meyer 2010-05-08 19:50:14 +00:00
parent 18c3fa28f3
commit 80bd7367fa
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=253952
3 changed files with 62 additions and 5 deletions

View file

@ -6,8 +6,7 @@
#
PORTNAME= iroffer
PORTVERSION= 3.20
PORTREVISION= 1
PORTVERSION= 3.21
CATEGORIES= irc
MASTER_SITES= http://iroffer.dinoex.net/
PKGNAMESUFFIX= -dinoex${PKGNAMESUFFIX2}
@ -22,6 +21,7 @@ HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= Configure
MAN1= iroffer.1
CONFIGURE_ARGS= CC="${CC}" LDFLAGS="${LDFLAGS}" LOCALBASE="${LOCALBASE}"
USE_RC_SUBR= iroffer-dinoex
OPTIONS= CURL "build ftp/http support" on \
RUBY "build RUBY script support" on \

View file

@ -1,3 +1,3 @@
MD5 (iroffer-dinoex-3.20.tar.gz) = e8596c1dfa52163dc98d25395a36e083
SHA256 (iroffer-dinoex-3.20.tar.gz) = 0464530d8a49d516d8a536f5818a82c28f7dead0bf9fe4c4cfdd9b56ff372d9c
SIZE (iroffer-dinoex-3.20.tar.gz) = 404013
MD5 (iroffer-dinoex-3.21.tar.gz) = 84e4943480e4296533dcbf5df403a922
SHA256 (iroffer-dinoex-3.21.tar.gz) = d740aa15102c0d2dde2d73474c1df78bd8b23699188106806188e2c5058e7ebe
SIZE (iroffer-dinoex-3.21.tar.gz) = 410472

View file

@ -0,0 +1,57 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: iroffer
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# iroffer_enable="YES"
# iroffer_flags="<set as needed>"
#
# See iroffer(1) for iroffer_flags
#
. "/etc/rc.subr"
name="iroffer"
rcvar=`set_rcvar`
# read configuration and set defaults
load_rc_config "$name"
: ${iroffer_enable="NO"}
: ${iroffer_user="bot"}
: ${iroffer_bin="iroffer"}
: ${iroffer_flags=""}
: ${iroffer_dir="/home/bot/iroffer/"}
: ${iroffer_config="${iroffer_dir}mybot.config"}
start_precmd="iroffer_checkdisk"
restart_precmd="iroffer_checkdisk"
iroffer_checkdisk()
{
cd "${iroffer_dir}"
if [ "${iroffer_dir}" != "" ]; then
freespace=`df -k . | tail -1 | awk {'print $4'}`
if [ "${freespace}" -lt 10 ]; then
echo "Filesystem Full!" >&2
exit
fi
fi
}
required_files="${iroffer_config}"
command="${iroffer_dir}/${iroffer_bin}"
command_args=""
if [ "${iroffer_dir}" != "" ]; then
command_args="${command_args} -w ${iroffer_dir}"
fi
command_args="${command_args} -u ${iroffer_user}"
command_args="${command_args} -b ${iroffer_config}"
pidfile="${iroffer_dir}/mybot.pid"
run_rc_command "$1"
# eof