Date: Mon, 24 Mar 2014 20:30:21 +0000 (UTC) From: Pawel Pekala <pawel@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r349065 - in head/sysutils/duply: . files Message-ID: <201403242030.s2OKULae080759@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pawel Date: Mon Mar 24 20:30:21 2014 New Revision: 349065 URL: http://svnweb.freebsd.org/changeset/ports/349065 QAT: https://qat.redports.org/buildarchive/r349065/ Log: Add periodic script PR: ports/187643 Submitted by: Claudius Herder <claudius.herder@ambtec.de> Approved by: maintainer Added: head/sysutils/duply/files/ head/sysutils/duply/files/periodic_duply.in (contents, props changed) head/sysutils/duply/files/pkg-message.in (contents, props changed) Modified: head/sysutils/duply/Makefile head/sysutils/duply/pkg-descr Modified: head/sysutils/duply/Makefile ============================================================================== --- head/sysutils/duply/Makefile Mon Mar 24 20:30:00 2014 (r349064) +++ head/sysutils/duply/Makefile Mon Mar 24 20:30:21 2014 (r349065) @@ -3,7 +3,7 @@ PORTNAME= duply PORTVERSION= 1.6.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= SF/ftplicity/${PORTNAME}%20%28simple%20duplicity%29/1.6.x/ DISTNAME= ${PORTNAME}_${PORTVERSION} @@ -16,18 +16,24 @@ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/gpl-2.0.txt RUN_DEPENDS= duplicity:${PORTSDIR}/sysutils/duplicity \ - bash:${PORTSDIR}/shells/bash + bash:${PORTSDIR}/shells/bash NO_BUILD= yes PORTDOCS= INSTALL.txt gpl-2.0.txt -PLIST_FILES= bin/duply +PLIST_FILES= bin/duply ${PERIODICDIR}/${PERIODICFILE} +PLIST_DIRSTRY= etc/periodic ${PERIODICDIR} +PERIODICFILE?= 300.duply +PERIODICDIR?= ${PREFIX}/etc/periodic/backup +SUB_FILES= pkg-message periodic_duply post-patch: ${REINPLACE_CMD} -e "s,/etc/duply,${ETCDIR},g" ${WRKSRC}/duply do-install: ${INSTALL_SCRIPT} ${WRKSRC}/duply ${STAGEDIR}${PREFIX}/bin/duply + @${MKDIR} ${STAGEDIR}${PERIODICDIR} + ${INSTALL_SCRIPT} ${WRKDIR}/periodic_duply ${STAGEDIR}${PERIODICDIR}/${PERIODICFILE} @${MKDIR} ${STAGEDIR}${DOCSDIR} . for i in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR} Added: head/sysutils/duply/files/periodic_duply.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/duply/files/periodic_duply.in Mon Mar 24 20:30:21 2014 (r349065) @@ -0,0 +1,57 @@ +#!/bin/sh +# +# periodic(8) script that runs duply on a nightly basis +# +# Define these variables in either /etc/periodic.conf or +# /etc/periodic.conf.local to override the defaults. +# +# Configuration Settings (with default values): +# +# backup_duply_enable="NO" +# enable duply backup +# +# backup_duply_profile="" +# default duply profile to use +# see duply usage +# +# backup_duply_command="bkp_status" +# default duply commands +# +# backup_duply_opt="" +# options passed to duply +# +# backup_duply_random="0" +# randomize backup time +# + +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +: ${backup_duply_enable}="NO" +: ${backup_duply_command}="bkp_status" +: ${backup_duply_profile}="" +: ${backup_duply_opt}="" +: ${backup_duply_random}="0" + +PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin +export PATH + +case "$backup_duply_enable" in + [Yy][Ee][Ss]) + eval sleep $(jot -r 1 0 ${backup_duply_random}) + echo + echo "Duply Backup:" + eval duply ${backup_duply_profile} ${backup_duply_command} ${backup_duply_opt} + if [ $? -gt 0 ] + then + echo "Errors were reported during backup." + rc=3 + fi + ;; +esac + +exit $rc + Added: head/sysutils/duply/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/duply/files/pkg-message.in Mon Mar 24 20:30:21 2014 (r349065) @@ -0,0 +1,25 @@ + + To run duply periodically you can add these options to your + /etc/periodic.conf or /etc/periodic.conf.local + + Configuration Settings (with default values): + + backup_duply_enable="NO" + enable duply backup + + backup_duply_profile="" + default duply profile to use + see duply usage + + backup_duply_command="bkp_status" + default duply commands + + backup_duply_opt="" + options passed to duply + + backup_duply_random="0" + randomize backup time + + + Add these lines to your /etc/crontab + 10 3 * * * root periodic backup Modified: head/sysutils/duply/pkg-descr ============================================================================== --- head/sysutils/duply/pkg-descr Mon Mar 24 20:30:00 2014 (r349064) +++ head/sysutils/duply/pkg-descr Mon Mar 24 20:30:21 2014 (r349065) @@ -3,4 +3,4 @@ It greatly simplifies its usage by imple job profiles, batch commands and more. Who says secure backups on non-trusted spaces are no child's play. -WWW: http://duply.net +WWW: http://duply.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403242030.s2OKULae080759>