From ffa7543b29be76bf65a395b4e0cd332f15c20450 Mon Sep 17 00:00:00 2001 From: Emilie Date: Fri, 15 Jul 2016 12:14:13 +0200 Subject: [PATCH] add PATH var in cron command --- install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- 2.39.5