aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorArquivo Publico de Memoria Coletiva <arquivo@sarava.org>2015-08-01 16:02:36 -0300
committerArquivo Publico de Memoria Coletiva <arquivo@sarava.org>2015-08-01 16:02:36 -0300
commitaa7bfe5f51d600d5e80781bf455a6b5900ba3b30 (patch)
treea0f03393d0e80ee310e894d44938f7a43128d8ed /bin
parentf27668cff7e8f9a4a2c4d0d2a09f14892c9bea6c (diff)
downloadarquivo-aa7bfe5f51d600d5e80781bf455a6b5900ba3b30.tar.gz
arquivo-aa7bfe5f51d600d5e80781bf455a6b5900ba3b30.tar.bz2
Parametrize bin/cron
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cron13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/cron b/bin/cron
index 3df00548c5b..9ade7a06a49 100755
--- a/bin/cron
+++ b/bin/cron
@@ -3,4 +3,15 @@
# Arquivo automatic syncronizer.
#
-cd /var/cache/sites/arquivo && /usr/bin/ionice -c 3 /usr/bin/nice -n 19 /usr/bin/git annex add . && /usr/bin/ionice -c 3 /usr/bin/nice -n 19 /usr/bin/git annex sync &> /dev/null
+# Parameters
+CWD="`/bin/pwd`"
+GIT="/usr/bin/git"
+NICE="/usr/bin/nice -n 19"
+IONICE="/user/bin/ionice -c 3"
+ARCHIVE="/var/cache/sites/arquivo"
+
+# Run
+cd $ARCHIVE
+$IONICE $NICE $GIT annex add . && \
+$IONICE $NICE $GIT annex sync &> /dev/null
+cd $CWD