mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Add linebreak at the end of cron commands
This commit is contained in:
parent
bd45e15f8c
commit
cddae8b54a
3 changed files with 4 additions and 4 deletions
|
@ -146,7 +146,7 @@ def dyndns_update(dyn_host="dynhost.yunohost.org", domain=None, key=None, ip=Non
|
|||
break
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
|
||||
if new_ipv6 is None:
|
||||
new_ipv6 = '0000:0000:0000:0000:0000:0000:0000:0000'
|
||||
|
||||
|
@ -205,7 +205,7 @@ def dyndns_installcron():
|
|||
|
||||
"""
|
||||
with open('/etc/cron.d/yunohost-dyndns', 'w+') as f:
|
||||
f.write('*/2 * * * * root yunohost dyndns update >> /dev/null')
|
||||
f.write('*/2 * * * * root yunohost dyndns update >> /dev/null\n')
|
||||
|
||||
msignals.display(m18n.n('dyndns_cron_installed'), 'success')
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ def firewall_upnp(action=None):
|
|||
firewall['uPnP']['enabled'] = True
|
||||
|
||||
with open('/etc/cron.d/yunohost-firewall', 'w+') as f:
|
||||
f.write('*/50 * * * * root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin yunohost firewall reload >>/dev/null')
|
||||
f.write('*/50 * * * * root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin yunohost firewall reload >>/dev/null\n')
|
||||
|
||||
msignals.display(m18n.n('upnp_enabled'), 'success')
|
||||
|
||||
|
|
2
tools.py
2
tools.py
|
@ -403,7 +403,7 @@ def tools_upgrade(ignore_apps=False, ignore_packages=False):
|
|||
msignals.display(m18n.n('packages_upgrade_critical_later',
|
||||
', '.join(critical_upgrades)))
|
||||
with open('/etc/cron.d/yunohost-upgrade', 'w+') as f:
|
||||
f.write('00 * * * * root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin apt-get install %s -y && rm -f /etc/cron.d/yunohost-upgrade' % ' '.join(critical_upgrades))
|
||||
f.write('00 * * * * root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin apt-get install %s -y && rm -f /etc/cron.d/yunohost-upgrade\n' % ' '.join(critical_upgrades))
|
||||
|
||||
if cache.get_changes():
|
||||
msignals.display(m18n.n('upgrading_packages'))
|
||||
|
|
Loading…
Add table
Reference in a new issue