From: Emilie Date: Fri, 15 Jul 2016 10:14:13 +0000 (+0200) Subject: add PATH var in cron command X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ffa7543b29be76bf65a395b4e0cd332f15c20450;p=mezzo.git add PATH var in cron command --- diff --git a/install.py b/install.py index 7e4c45b1..d5db0bf3 100755 --- a/install.py +++ b/install.py @@ -158,10 +158,11 @@ class DockerCompositionInstaller(object): # version with migration # command = "cd /srv/ircam-www && git pull origin dev && " + self.docker_compose + " -f " + self.config + " run app /srv/app/manage.py migrate --noinput && ./scripts/push.sh >> /var/log/cri/cron/`date +\%Y\%m\%d\%H\%M\%S`-cron.log 2>&1 \n" # without migration + path = "PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin\n" command = "cd /srv/ircam-www && ./scripts/push.sh >> /var/log/cri/cron/`date +\%Y\%m\%d-\%H-\%M-\%S`-cron.log 2>&1 \n" rule = self.cron_rule % (self.user, command) f = open('/etc/cron.d/' + self.name, 'w') - f.write(rule) + f.write(path + rule) f.close() def uninstall_daemon_sysvinit(self):