aboutsummaryrefslogtreecommitdiff
path: root/sysutils/rsyncmanager
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-11-04 18:46:29 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-11-04 18:46:29 +0000
commitb7744a18eb584c4f2ff23c260c43d5bdcecf096b (patch)
treedbdd66bfe3b78859e4dfdd4d6f8aa2936b4423bd /sysutils/rsyncmanager
parent69735cb265972990db1e6cf21f05807f7ba502b4 (diff)
downloadports-b7744a18eb584c4f2ff23c260c43d5bdcecf096b.tar.gz
ports-b7744a18eb584c4f2ff23c260c43d5bdcecf096b.zip
Add rsyncmanager, a small ruby thing to manage repeated rsync jobs.
PR: ports/73537 Submitted by: Kelley Reynolds <kelley@insidesystems.net>
Notes
Notes: svn path=/head/; revision=120803
Diffstat (limited to 'sysutils/rsyncmanager')
-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
6 files changed, 102 insertions, 0 deletions
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