Update caddy.lua
This commit is contained in:
parent
038ae23a15
commit
cfaf472a6f
@ -30,8 +30,8 @@ function caddy_status()
|
|||||||
local tagcontent = tagfile:read("*all")
|
local tagcontent = tagfile:read("*all")
|
||||||
tagfile:close()
|
tagfile:close()
|
||||||
if tagcontent and tagcontent ~= "" then
|
if tagcontent and tagcontent ~= "" then
|
||||||
os.execute("start_time=$(cat /tmp/caddy_time) && time=$(($(date +%s)-start_time)) && day=$((time/86400)) && [ $day -eq 0 ] && day='' || day=${day}天 && time=$(date -u -d @${time} +'%H小时%M分%S秒') && echo $day $time > /tmp/command_output 2>&1")
|
os.execute("start_time=$(cat /tmp/caddy_time) && time=$(($(date +%s)-start_time)) && day=$((time/86400)) && [ $day -eq 0 ] && day='' || day=${day}天 && time=$(date -u -d @${time} +'%H小时%M分%S秒') && echo $day $time > /tmp/command_caddy 2>&1")
|
||||||
local command_output_file = io.open("/tmp/command_output", "r")
|
local command_output_file = io.open("/tmp/command_caddy", "r")
|
||||||
if command_output_file then
|
if command_output_file then
|
||||||
e.caddysta = command_output_file:read("*all")
|
e.caddysta = command_output_file:read("*all")
|
||||||
command_output_file:close()
|
command_output_file:close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user