changes cherry picked from dev to stable (#169)

* lamassu-update to update crontab

* lamassu update and install script to point to #stable branch

* lamassu update and install script to point to #stable branch

* removing outdated & unused script

* crontab update fix + npm rebuild path fix
This commit is contained in:
Fabio Cigliano 2018-09-22 19:45:38 +02:00 committed by Josh Harvey
parent 59cb5da61c
commit 9b7972017d
6 changed files with 15 additions and 304 deletions

View file

@ -60,7 +60,12 @@ function processCryptos (codes) {
const blockchainDir = coinUtils.blockchainDir()
const backupDir = path.resolve(os.homedir(), 'backups')
const rsyncCmd = `echo "@daily rsync -r --prune-empty-dirs --include='*/' --include='wallet.dat' --exclude='*' ${blockchainDir} ${backupDir} > /dev/null" | crontab -`
const rsyncCmd = `( \
(crontab -l 2>/dev/null || echo -n "") | grep -v "@daily rsync ".*"wallet.dat"; \
echo "@daily rsync -r --prune-empty-dirs --include='*/' \
--include='wallet.dat' \
--exclude='*' ${blockchainDir} ${backupDir} > /dev/null" \
) | crontab -`
common.es(rsyncCmd)
logger.info('Installation complete.')