建立服务启动文档:
vim /etc/init.d/ngrok
#!/bin/sh
### BEGIN INIT INFO
# Provides: ngrok
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start or stop the ngrok Proxy.
### END INIT INFO
ngrok_path=/root/ngrok/
case "$1" in
start)
echo "start ngrok service.."
sh ${ngrok_path}/ngrok.sh &
;;
*)
exit 1
;;
esac
设置启动:
systemctl enable ngrok
systemctl start ngrok
reboot
然后测试一下。就OK了
博客介绍了建立ngrok服务启动文档的操作,通过vim /etc/init.d/ngrok建立文档,之后进行启动设置,最后测试完成操作。
2551

被折叠的 条评论
为什么被折叠?



