From aa7bfe5f51d600d5e80781bf455a6b5900ba3b30 Mon Sep 17 00:00:00 2001 From: Arquivo Publico de Memoria Coletiva Date: Sat, 1 Aug 2015 16:02:36 -0300 Subject: Parametrize bin/cron --- bin/cron | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'bin') 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 -- cgit v1.2.3