Add logic for installing luigi service as part of backup app

This commit is contained in:
Lance Edgar 2019-09-26 23:40:55 -05:00
parent 477af6c6a0
commit 067c02e965
6 changed files with 212 additions and 1 deletions

View file

@ -0,0 +1,28 @@
#!/bin/bash
${'#'}###############################################################################
#
# overnight "backups" automation
#
${'#'}###############################################################################
set -e
DATE=$1
if [ "$1" = "--verbose" ]; then
DATE=$2
VERBOSE='--verbose'
else
VERBOSE=
fi
if [ "$DATE" = "" ]; then
DATE=`date --date='yesterday' +%Y-%m-%d`
fi
LUIGI='${envpath}/bin/luigi --logging-conf-file luigi-logging.conf'
export PYTHONPATH=${envpath}/app/
cd ${envpath}/app/luigi
$LUIGI --module luigitasks.overnight OvernightBackups --date $DATE