ttyd: remove the default insecure init script (#3271)
Signed-off-by: Shuanglei Tao <tsl0922@gmail.com>
This commit is contained in:
parent
a457d89b32
commit
fbdcdd8a4a
2 changed files with 1 additions and 30 deletions
|
@ -29,7 +29,7 @@ define Package/ttyd
|
||||||
SECTION:=utils
|
SECTION:=utils
|
||||||
CATEGORY:=Utilities
|
CATEGORY:=Utilities
|
||||||
TITLE:=Command-line tool for sharing terminal over the web
|
TITLE:=Command-line tool for sharing terminal over the web
|
||||||
DEPENDS:=+openssl +libjson-c +libpthread +libwebsockets-openssl
|
DEPENDS:=+libopenssl +libjson-c +libpthread +libwebsockets-openssl
|
||||||
URL:=https://github.com/tsl0922/ttyd
|
URL:=https://github.com/tsl0922/ttyd
|
||||||
SUBMENU:=Terminal
|
SUBMENU:=Terminal
|
||||||
MAINTAINER:=Shuanglei Tao <tsl0922@gmail.com>
|
MAINTAINER:=Shuanglei Tao <tsl0922@gmail.com>
|
||||||
|
@ -42,9 +42,6 @@ endef
|
||||||
define Package/ttyd/install
|
define Package/ttyd/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ttyd $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ttyd $(1)/usr/bin/
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
|
||||||
$(INSTALL_BIN) ./files/ttyd.init $(1)/etc/init.d/ttyd
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,ttyd))
|
$(eval $(call BuildPackage,ttyd))
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/bin/sh /etc/rc.common
|
|
||||||
|
|
||||||
START=99
|
|
||||||
SERVICE_WRITE_PID=1
|
|
||||||
SERVICE_DAEMONIZE=1
|
|
||||||
|
|
||||||
start() {
|
|
||||||
logger -t TTYD 'Starting ttyd service'
|
|
||||||
service_start /usr/bin/ttyd login
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
if [ -n "`pidof ttyd`" ]; then
|
|
||||||
logger -t TTYD 'Shutting down ttyd service'
|
|
||||||
service_stop /usr/bin/ttyd
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
restart() {
|
|
||||||
logger -t TTYD 'Restarting ttyd service'
|
|
||||||
stop
|
|
||||||
sleep 2 # give time to shutdown
|
|
||||||
start
|
|
||||||
}
|
|
Loading…
Reference in a new issue