This commit is contained in:
dami
2025-09-11 17:10:08 +08:00
parent 4158f25b35
commit bb41f89d44
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -562,6 +562,7 @@ def getSslCrt():
def getOs():
# python3 -c 'import sys; print(sys.platform)'
return sys.platform
def getOsName():
+2 -1
View File
@@ -523,11 +523,12 @@ echo "--------------------------------------------------------------------------
file = '/var/spool/cron/crontabs/root'
sys_os = mw.getOs()
sys_name = mw.getOsName()
if sys_os == 'darwin':
file = '/etc/crontab'
elif sys_os.startswith("freebsd"):
file = '/var/cron/tabs/root'
elif sys_os.startswith("ubuntu"):
elif sys_name.startswith("ubuntu"):
file = '/var/spool/cron/root'
if not os.path.exists(file):