Browse Source

run commit weekly

develop
Prabuddha Chakraborty 9 years ago
parent
commit
309c4e784e
  1. 4
      ee/cli/plugins/site.py
  2. 4
      ee/core/cron.py
  3. 2
      install

4
ee/cli/plugins/site.py

@ -753,7 +753,7 @@ class EESiteCreateController(CementBaseController):
setupLetsEncrypt(self, ee_domain)
httpsRedirect(self,ee_domain)
Log.info(self,"Creating Cron Job for cert auto-renewal")
EECron.setcron_daily(self,'ee site update --le=renew --all 2> /dev/null'.format(ee_domain),'Renew all'
EECron.setcron_weekly(self,'ee site update --le=renew --all 2> /dev/null'.format(ee_domain),'Renew all'
' letsencrypt SSL cert. Set by EasyEngine')
if not EEService.reload_service(self, 'nginx'):
@ -1322,7 +1322,7 @@ class EESiteUpdateController(CementBaseController):
httpsRedirect(self,ee_domain)
Log.info(self,"Creating Cron Job for cert auto-renewal")
EECron.setcron_daily(self,'ee site update --le=renew --all 2> /dev/null'.format(ee_domain),'Renew all'
EECron.setcron_weekly(self,'ee site update --le=renew --all 2> /dev/null'.format(ee_domain),'Renew all'
' letsencrypt SSL cert. Set by EasyEngine')
if not EEService.reload_service(self, 'nginx'):

4
ee/core/cron.py

@ -6,13 +6,13 @@ Set CRON on LINUX system.
"""
class EECron():
def setcron_daily(self,cmd,comment='Cron set by EasyEngine',user='root',min=0,hour=12):
def setcron_weekly(self,cmd,comment='Cron set by EasyEngine',user='root',min=0,hour=12):
if not EEShellExec.cmd_exec(self, "crontab -l | grep -q \'{0}\'".format(cmd)):
EEShellExec.cmd_exec(self, "/bin/bash -c \"crontab -l "
"2> /dev/null | {{ cat; echo -e"
" \\\""
"\\n0 12 * * * "
"\\n0 0 * * 0 "
"{0}".format(cmd) +
" # {0}".format(comment)+
"\\\"; } | crontab -\"")

2
install

@ -529,7 +529,7 @@ function ee_update_latest()
crontab -l | grep -q '\-\-min_expiry_limit'
if [[ $? -eq 0 ]]; then
crontab -l | sed '/--min_expiry_limit/d' | crontab -
crontab -l 2> /dev/null | {{ cat; echo -e "0 12 * * * ee site update --le=renew --all # Renew all letsencrypt SSL cert. Set by EasyEngine "; }} | crontab -
crontab -l 2> /dev/null | {{ cat; echo -e "0 0 * * 0 ee site update --le=renew --all 2> /dev/null # Renew all letsencrypt SSL cert. Set by EasyEngine "; }} | crontab -
fi

Loading…
Cancel
Save