From f2b233fc6f8d58ca9d12f46c75188d6143fc1ac2 Mon Sep 17 00:00:00 2001 From: B Stack Date: Mon, 22 May 2017 18:13:56 -0400 Subject: deleted rbup.sh backups --- usr/share/rbup/rbup.sh.2017-05-21.01 | 247 ----------------------------------- 1 file changed, 247 deletions(-) delete mode 100755 usr/share/rbup/rbup.sh.2017-05-21.01 (limited to 'usr') diff --git a/usr/share/rbup/rbup.sh.2017-05-21.01 b/usr/share/rbup/rbup.sh.2017-05-21.01 deleted file mode 100755 index 631319a..0000000 --- a/usr/share/rbup/rbup.sh.2017-05-21.01 +++ /dev/null @@ -1,247 +0,0 @@ -#!/bin/sh -# Filename: rbup.sh -# Location: /usr/share/rbup/ -# Author: bgstack15@gmail.com -# Startdate: 2017-05-21 09:25:16 -# Title: Script that Performs Regular Backups -# Purpose: Allows customizable jobs from an easy config file -# Package: rbup -# History: -# 2016 -# Usage: -# Reference: ftemplate.sh 2017-04-17a; framework.sh 2017-04-17a -# /mnt/bgirton/Backups/bup_data.sh which itself was modified from darmok:/usr/local/bin/sync_smash.sh -# dnskeepalive.sh from package bgscripts-core -# Improve: -fiversion="2017-04-29a" -rbupversion="2017-05-21a" - -usage() { - less -F >&2 <] [ -j ] -version ${rbupversion} - -d debug Show debugging info, including parsed variables. - -u usage Show this usage block. - -V version Show script version number. - -i infile Overrides default infile value. Default is none. - -c conffile Use this conf instead of default, which is /etc/rbup/rbup.conf - -j jobname Run only this job. Can be repeated. -Return values: -0 Normal -1 Help or version info displayed -2 Count or type of flaglessvals is incorrect -3 Incorrect OS type -4 Unable to find dependency -5 Not run as root or sudo -6 Unable to mount destination -7 Invalid checksum(s) on file(s) -ENDUSAGE -} - -# DEFINE FUNCTIONS -get_conf() { - # call: get_conf /etc/rbup/rbup.conf [ job1 [ job2 ... ] ] - # copied in from dnskeepalive, but modified - local _infile="$1" - #local _tmpfile1="$( mktemp -p /tmp/rbup )" - shift; local _requestedzones="default $@" - local _zone="" - grep -viE '^\s*((#).*)?$' "${_infile}" | while read _line; - do - local _left="$( echo "${_line}" | cut -d'=' -f1 )" - # check if line is a zone [rbup:default] - if echo "${_left}" | grep -qiE '^\[rbup:.*\]'; - then - _zone="$( echo "${_left}" | sed -r -e 's/^.*://;s/\]$//;' )" - echo "new zone ${_zone}" - else - eval "_thisval=\"\${${_left}}\"" - if test -z "${_thisval}" && { test -z "$@" || echo "${_requestedzones}" | grep -qiE "${_zone}"; }; - then - echo "${_line}" >> "/tmp/rbup/${_zone}.conf" - echo "${_line} added to /tmp/rbup/${_zone}.conf" - fi - fi - done - #test -f "${_tmpfile1}" && . "${_tmpfile1}" 1>/dev/null 2>&1 - #/bin/rm -rf "${_tmpfile1}" -} - -reset_vars() { - for word in $( set | grep -oIE "^RBUP_.+=" | sed -r -e 's/=$//;' ); do unset ${word}; done -} - -log() { - # WORKHERE: figure out how logging will work - echo "$@" -} - -# DEFINE TRAPS - -clean_rbup() { - #use at end of entire script if you need to clean up tmpfiles - test "${RBUP_CLEANUP}"="1" || rm -rf "${tmpdir}" 1>/dev/null 2>&1 - : -} - -CTRLC() { - #trap "CTRLC" 2 - [ ] #useful for controlling the ctrl+c keystroke - clean_rbup -} - -CTRLZ() { - #trap "CTRLZ" 18 - [ ] #useful for controlling the ctrl+z keystroke -} - -parseFlag() { - flag="$1" - hasval=0 - case ${flag} in - # INSERT FLAGS HERE - "d" | "debug" | "DEBUG" | "dd" ) setdebug; ferror "debug level ${debug}";; - "u" | "usage" | "help" | "h" ) usage; exit 1;; - "V" | "fcheck" | "version" ) ferror "${scriptfile} version ${rbupversion}"; exit 1;; - #"i" | "infile" | "inputfile" ) getval;infile1=${tempval};; - esac - - debuglev 10 && { test ${hasval} -eq 1 && ferror "flag: ${flag} = ${tempval}" || ferror "flag: ${flag}"; } -} - -# DETERMINE LOCATION OF FRAMEWORK -while read flocation; do if test -x ${flocation} && test "$( ${flocation} --fcheck )" -ge 20170111; then frameworkscript="${flocation}"; break; fi; done <&2 && exit 4 - -# INITIALIZE VARIABLES -# variables set in framework: -# today server thistty scriptdir scriptfile scripttrim -# is_cronjob stdin_piped stdout_piped stderr_piped sendsh sendopts -. ${frameworkscript} || echo "$0: framework did not run properly. Continuing..." 1>&2 -infile1= -outfile1= -logfile=${scriptdir}/${scripttrim}.${today}.out -interestedparties="bgstack15@gmail.com" -tmpdir=/tmp/rbup -mkdir -p "${tmpdir}" 2>/dev/null || { ferror "${script}: 4. Unable to make ${tmpdir} temporary directory. Aborted."; exit 4; } - -# REACT TO OPERATING SYSTEM TYPE -case $( uname -s ) in - Linux) [ ];; - FreeBSD) [ ];; - *) echo "${scriptfile}: 3. Indeterminate OS: $( uname -s )" 1>&2 && exit 3;; -esac - -## REACT TO ROOT STATUS -#case ${is_root} in -# 1) # proper root -# [ ] ;; -# sudo) # sudo to root -# [ ] ;; -# "") # not root at all -# #ferror "${scriptfile}: 5. Please run as root or sudo. Aborted." -# #exit 5 -# [ ] -# ;; -#esac - -# SET CUSTOM SCRIPT AND VALUES -#setval 1 sendsh sendopts<