aboutsummaryrefslogtreecommitdiffstats
path: root/irc
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2010-05-09 03:50:14 +0800
committerdinoex <dinoex@FreeBSD.org>2010-05-09 03:50:14 +0800
commit88d743a64c99710e06edafd3b5609ed5287e3c8d (patch)
tree269210fff17975da123d7e1c2ed11fcfadb4e3ab /irc
parentc17ccb2ec2b46f22041b7b0ea9f36499e4d927c9 (diff)
downloadfreebsd-ports-gnome-88d743a64c99710e06edafd3b5609ed5287e3c8d.tar.gz
freebsd-ports-gnome-88d743a64c99710e06edafd3b5609ed5287e3c8d.tar.zst
freebsd-ports-gnome-88d743a64c99710e06edafd3b5609ed5287e3c8d.zip
- update to 3.21
- add rc.d script
Diffstat (limited to 'irc')
-rw-r--r--irc/iroffer-dinoex/Makefile4
-rw-r--r--irc/iroffer-dinoex/distinfo6
-rw-r--r--irc/iroffer-dinoex/files/iroffer-dinoex.in57
3 files changed, 62 insertions, 5 deletions
diff --git a/irc/iroffer-dinoex/Makefile b/irc/iroffer-dinoex/Makefile
index 2193fe4663c7..99736231e198 100644
--- a/irc/iroffer-dinoex/Makefile
+++ b/irc/iroffer-dinoex/Makefile
@@ -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 \
diff --git a/irc/iroffer-dinoex/distinfo b/irc/iroffer-dinoex/distinfo
index a2a0efce951f..951b74f7eb98 100644
--- a/irc/iroffer-dinoex/distinfo
+++ b/irc/iroffer-dinoex/distinfo
@@ -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
diff --git a/irc/iroffer-dinoex/files/iroffer-dinoex.in b/irc/iroffer-dinoex/files/iroffer-dinoex.in
new file mode 100644
index 000000000000..f96a061e3fb1
--- /dev/null
+++ b/irc/iroffer-dinoex/files/iroffer-dinoex.in
@@ -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