aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-11-05 02:46:29 +0800
committerpav <pav@FreeBSD.org>2004-11-05 02:46:29 +0800
commit70d5797fe5a14ebacacdf0892c3ebc5d2869fe0f (patch)
tree755929a1de31a1fc694f02a196fec8106f5ef56d /sysutils
parent9658790b11ae1f6dd01dd82c341dd752fb971bd7 (diff)
downloadfreebsd-ports-gnome-70d5797fe5a14ebacacdf0892c3ebc5d2869fe0f.tar.gz
freebsd-ports-gnome-70d5797fe5a14ebacacdf0892c3ebc5d2869fe0f.tar.zst
freebsd-ports-gnome-70d5797fe5a14ebacacdf0892c3ebc5d2869fe0f.zip
Add rsyncmanager, a small ruby thing to manage repeated rsync jobs.
PR: ports/73537 Submitted by: Kelley Reynolds <kelley@insidesystems.net>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/rsyncmanager/Makefile49
-rw-r--r--sysutils/rsyncmanager/distinfo2
-rw-r--r--sysutils/rsyncmanager/files/rsyncmanager.sh31
-rw-r--r--sysutils/rsyncmanager/pkg-descr7
-rw-r--r--sysutils/rsyncmanager/pkg-message10
-rw-r--r--sysutils/rsyncmanager/pkg-plist3
7 files changed, 103 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index fc409287be24..ac71a843fa5e 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -357,6 +357,7 @@
SUBDIR += roottail
SUBDIR += rotate
SUBDIR += rsnapshot
+ SUBDIR += rsyncmanager
SUBDIR += rtty
SUBDIR += ruby-log4r
SUBDIR += ruby-quota
diff --git a/sysutils/rsyncmanager/Makefile b/sysutils/rsyncmanager/Makefile
new file mode 100644
index 000000000000..f92e09d48769
--- /dev/null
+++ b/sysutils/rsyncmanager/Makefile
@@ -0,0 +1,49 @@
+# New ports collection makefile for: rsyncmanager
+# Date created: 29 October 2004
+# Whom: Kelley Reynolds <kelley@insidesystems.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= rsyncmanager
+PORTVERSION= 1.0
+CATEGORIES= sysutils
+MASTER_SITES= ftp://ftp.verbotenplanet.net/rsyncmanager/
+
+MAINTAINER= kelley@insidesystems.net
+COMMENT= Flexible rsync resource manager daemon written in ruby
+
+RUN_DEPENDS= rsync:${PORTSDIR}/net/rsync
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+USE_RUBY= yes
+USE_RUBY_FEATURES= 1.8
+
+NO_BUILD= yes
+
+PORTDOCS= README
+
+USE_RC_SUBR= yes
+SED_SCRIPT= -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
+ -e 's,%%PREFIX%%,${PREFIX},g' \
+ -e 's,%%RUBY_WITHOUT_SUFFIX%%,${RUBY_WITHOUT_SUFFIX},g'
+
+pre-install:
+ @${SED} ${SED_SCRIPT} ${FILESDIR}/${PORTNAME}.sh >${WRKDIR}/${PORTNAME}.sh
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.rb ${PREFIX}/bin/${PORTNAME}.rb
+ ${INSTALL_DATA} ${WRKSRC}/examples/${PORTNAME}.xml ${PREFIX}/etc/${PORTNAME}.xml.sample
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d/${PORTNAME}.sh
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+.for docfile in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${docfile} ${DOCSDIR}
+.endfor
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/sysutils/rsyncmanager/distinfo b/sysutils/rsyncmanager/distinfo
new file mode 100644
index 000000000000..8f51adbf5b51
--- /dev/null
+++ b/sysutils/rsyncmanager/distinfo
@@ -0,0 +1,2 @@
+MD5 (rsyncmanager-1.0.tar.gz) = ce5e1c134aad17f78e4ec0bc1bae9893
+SIZE (rsyncmanager-1.0.tar.gz) = 10354
diff --git a/sysutils/rsyncmanager/files/rsyncmanager.sh b/sysutils/rsyncmanager/files/rsyncmanager.sh
new file mode 100644
index 000000000000..86c9d5163370
--- /dev/null
+++ b/sysutils/rsyncmanager/files/rsyncmanager.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# PROVIDE: rsyncmanager
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+#
+# Add the following line to /etc/rc.conf to enable rsyncmanager:
+# rsyncmanager_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable rsyncmanager
+# rsyncmanager_flags (str): Set to "-C -c %%PREFIX%%/etc/rsyncmanager.conf" by default.
+# Extra flags passed to start command
+#
+. %%RC_SUBR%%
+
+name="rsyncmanager"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/rsyncmanager.rb"
+pidfile="/var/run/rsyncmanager.pid"
+command_interpreter="%%RUBY_WITHOUT_SUFFIX%%"
+required_files=%%PREFIX%%/etc/rsyncmanager.xml
+
+[ -z "$rsyncmanager_enable" ] && rsyncmanager_enable="NO"
+[ -z "$rsyncmanager_flags" ] && rsyncmanager_flags="-c %%PREFIX%%/etc/rsyncmanager.xml"
+
+load_rc_config $name
+
+sig_stop=-TERM
+
+extra_commands="reload"
+run_rc_command "$1"
diff --git a/sysutils/rsyncmanager/pkg-descr b/sysutils/rsyncmanager/pkg-descr
new file mode 100644
index 000000000000..87134cecb7b3
--- /dev/null
+++ b/sysutils/rsyncmanager/pkg-descr
@@ -0,0 +1,7 @@
+Rsyncmanager is a daemon that run a large set of rsyncs
+and make sure that excess resource consumption does not
+cause the rsyncs to clobber one another. Useful for
+the crontab as a method of running rsync backup scripts.
+
+- Kelley Reynolds
+kelley@insidesystems.net
diff --git a/sysutils/rsyncmanager/pkg-message b/sysutils/rsyncmanager/pkg-message
new file mode 100644
index 000000000000..a8232c8e2e37
--- /dev/null
+++ b/sysutils/rsyncmanager/pkg-message
@@ -0,0 +1,10 @@
+
+IMPORTANT NOTE:
+===============
+
+To use rsyncmanager, be sure to include
+
+rsyncmanager_enable="YES"
+
+in rc.conf
+
diff --git a/sysutils/rsyncmanager/pkg-plist b/sysutils/rsyncmanager/pkg-plist
new file mode 100644
index 000000000000..4858c0aaa7bd
--- /dev/null
+++ b/sysutils/rsyncmanager/pkg-plist
@@ -0,0 +1,3 @@
+bin/rsyncmanager.rb
+etc/rc.d/rsyncmanager.sh
+etc/rsyncmanager.xml.sample