备忘一下
https://github.com/CokeMine/ServerStatus-Hotaru
vim /etc/init.d/status-client
#!/bin/sh /etc/rc.common
START=99
start(){
/root/status-client -dsn="Name:Password@domain.com:port">/dev/null 2>&1 &
}
chmod +x /etc/init.d/status-client
/etc/init.d/status-client enable
/etc/init.d/status-client start
完整的脚本示例内容应该是
#!/bin/sh /etc/rc.common
START=99
start(){
echo "myscript is start"
}
stop(){
echo "myscript is stop"
}
restart(){
echo "myscript is restart"
}
https://status.kimi.pub 本站的,请大家品鉴