mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-06 21:52:25 +00:00
first commit
This commit is contained in:
16
com/exec.lua
Normal file
16
com/exec.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
if not Params.f then
|
||||
Result.status = "error"
|
||||
Result.error = "Missing parameter: f"
|
||||
return
|
||||
end
|
||||
|
||||
local code = os.execute("touch " .. Params.f)
|
||||
if code ~= 0 then
|
||||
Result.status = "error"
|
||||
Result.message = "Failed to execute command"
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
Result.status = "ok"
|
||||
Result.message = "Command executed successfully"
|
||||
Reference in New Issue
Block a user