1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
--[[
Configuration file for qcontrol (LUA syntax)
Supports Synology DiskStation and RackStation NASes.
--]]
register("synology")
register("system-status")
-- Set to "false" to suppress the sounding of the buzzer
buzzer = true
function system_status( status )
logprint("System status: "..status)
if status == "start" then
piccmd("statusled", "greenon")
piccmd("powerled", "on")
if buzzer then piccmd("buzzer", "short") end
elseif status == "stop" then
piccmd("statusled", "redon")
piccmd("powerled", "2hz")
if buzzer then piccmd("buzzer", "short") end
else
logprint("Unknown system status")
end
end
function power_button( time )
os.execute("poweroff")
end
function restart_button( time )
os.execute("reboot")
end
function media_button( time )
piccmd("usbled", "2hz")
end
confdir("/etc/qcontrol.d")
--
-- Local variables:
-- mode: lua
-- indent-level: 8
-- End:
|