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

Merge pull request #851 from Paul-STHL/fix-arch-crontab

fix(Crontab): ArchLinux which uses the FreeBSD syntax
This commit is contained in:
gavin 2019-11-01 12:58:58 +05:30 committed by GitHub
commit fb5c4d0dad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)