|
|
@@ -1,6 +1,7 @@
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
import os
|
|
|
+import subprocess
|
|
|
from flask import Flask, Response, json, request
|
|
|
from cron.Parser import Parser
|
|
|
|
|
|
@@ -25,4 +26,8 @@ def set_section(name):
|
|
|
return Response(cronFile.get_section(name), mimetype="text/plain")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
+ print("Running as user:")
|
|
|
+ subprocess.run("whoami")
|
|
|
+ print("Checking crontab access with 'crontab -l'")
|
|
|
+ print(subprocess.run(["crontab", "-l"], capture_output = True, text = True).stdout.count('\n'))
|
|
|
api.run(host = "0.0.0.0", port = 5000)
|