Add rsyncmanager, a small ruby thing to manage repeated rsync jobs.

PR:		ports/73537
Submitted by:	Kelley Reynolds <kelley@insidesystems.net>
This commit is contained in:
Pav Lucistnik 2004-11-04 18:46:29 +00:00
parent 69735cb265
commit b7744a18eb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=120803
7 changed files with 103 additions and 0 deletions

View File

@ -357,6 +357,7 @@
SUBDIR += roottail
SUBDIR += rotate
SUBDIR += rsnapshot
SUBDIR += rsyncmanager
SUBDIR += rtty
SUBDIR += ruby-log4r
SUBDIR += ruby-quota

View File

@ -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>

View File

@ -0,0 +1,2 @@
MD5 (rsyncmanager-1.0.tar.gz) = ce5e1c134aad17f78e4ec0bc1bae9893
SIZE (rsyncmanager-1.0.tar.gz) = 10354

View File

@ -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"

View File

@ -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

View File

@ -0,0 +1,10 @@
IMPORTANT NOTE:
===============
To use rsyncmanager, be sure to include
rsyncmanager_enable="YES"
in rc.conf

View File

@ -0,0 +1,3 @@
bin/rsyncmanager.rb
etc/rc.d/rsyncmanager.sh
etc/rsyncmanager.xml.sample