把sunny ngrok做成服务,总是提示失败insserv: Script broken: missing end of LSB comment

KevinC007 2017-11-29 09:41:47
用的是ngrok.cc下载下来的sunny文件,直接执行是可以连接上的,但是做成服务,总是创建服务就是失败,用的raspbian9

1. update-rc.d ngrok defaults 90 执行错误代码


root@raspberryhome:/etc/init.d# update-rc.d ngrok defaults 90
insserv: Script ngrok is broken: missing end of LSB comment.
insserv: warning: script 'K01ngrok' missing LSB tags and overrides
insserv: Script ngrok is broken: missing end of LSB comment.
insserv: Script ngrok is broken: missing end of LSB comment.
insserv: Script ngrok is broken: missing end of LSB comment.
insserv: Script ngrok is broken: missing end of LSB comment.
insserv: Script ngrok is broken: missing end of LSB comment.
insserv: Script ngrok is broken: missing end of LSB comment.
insserv: Script ngrok is broken: missing end of LSB comment.
insserv: warning: script 'ngrok' missing LSB tags and overrides
root@raspberryhome:/etc/init.d#


2 /etc/init.d/目录下 ngrok文件内容


#!/bin/sh

#

### BEGIN INIT INFO
# Provides: ngrok1
# Required-Start:
# Required-Stop:
# Should-Start:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop A
# Description: asf
### END INIT INFO


case $1 in
start)
echo "start ngrok service.."
sh /usr/software/ngrok/start.sh
;;
esac

exit 0


3. sunny程序放在 /usr/software/ngrok目录下,并且创建了start.sh文件去启动
直接下此目录下执行start.sh文件是可以连接到ngrok服务的,这个没有问题
下面是start.sh的文件内容,为了安全,clientid不是真实的。


/usr/software/ngrok/sunny clientid 884d76024d89f486

...全文
380 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧