From de9fec8eedac6692c9da1dba3a6a7a316b317a0f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 12 Sep 2015 21:19:44 +0200 Subject: [PATCH] fix bug in a python script do not install crontab anywhere but eressea@gruenbaer --- process/compress.py | 5 ++--- s/install | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/process/compress.py b/process/compress.py index 243f80d9c..1a9c4cebf 100755 --- a/process/compress.py +++ b/process/compress.py @@ -60,11 +60,10 @@ for line in infile.readlines(): output = "%s%s.bz2" % (prefix, extension) files = files+[output] if access(filename, R_OK): - if (access(output, R_OK)): - #print output, "exists, skipping" + if access(output, R_OK): continue system("bzip2 %s" % filename) - if not access('../wochenbericht.txt'): + if not access('../wochenbericht.txt', R_OK): os.symlink('../parteien', '../wochenbericht.txt') extras = [ '../wochenbericht.txt', '../express.txt' ] for extra in extras: diff --git a/s/install b/s/install index 16109391f..da949f82a 100755 --- a/s/install +++ b/s/install @@ -27,6 +27,5 @@ install -v $ROOT/process/$prg $DEST/bin/ done # install crontab, but only on the eressea server: -HOST=`hostname` - -[ "gruenbaer" = "$HOST" ] && crontab $ROOT/process/cron/crontab +WHOAMI=`whoami`@`hostname` +[ "eressea@gruenbaer" = "$WHOAMI" ] && crontab $ROOT/process/cron/crontab