Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local filesystem = require("filesystem");
- local serialization = require("serialization");
- local shouldRun = false;
- if filesystem.exists("/usr/CM_Automator/launcher-config.cfg") then
- local file = io.open("/usr/CM_Automator/launcher-config.cfg");
- settings = serialization.unserialize(file:read("*a"));
- shouldRun = settings["autostart"];
- if shouldRun == nil then
- shouldRun = false;
- print("[Autostart] Error loading configuration file.");
- end
- file:close();
- else
- print("[Autostart] Configuration file not found.");
- end
- if shouldRun then
- os.execute("cmauto");
- end
Advertisement
Add Comment
Please, Sign In to add comment