2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

Crontab: Fix for ArchLinux which uses the FreeBSD syntax

This commit is contained in:
Paul Banks 2019-10-25 08:25:22 +00:00
parent 9c854c1892
commit b8cc8b03f7

View File

@ -243,7 +243,7 @@ def add_to_crontab(line):
line = str.encode(line)
if not line in current_crontab:
cmd = ["crontab"]
if platform.system() == 'FreeBSD':
if platform.system() == 'FreeBSD' or platform.linux_distribution()[0]=="arch":
cmd = ["crontab", "-"]
s = subprocess.Popen(cmd, stdin=subprocess.PIPE)
s.stdin.write(current_crontab)