From: Shuanglei Tao Date: Thu, 6 Apr 2017 14:44:24 +0000 (+0800) Subject: openwrt: remove the default insecure init script X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=0a9ff2fa7dd92e374cd7d8a22213d771bd7271f5;p=ttyd.git openwrt: remove the default insecure init script --- diff --git a/openwrt/Makefile b/openwrt/Makefile index df79be5..fbdac53 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -42,9 +42,6 @@ endef define Package/ttyd/install $(INSTALL_DIR) $(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 $(eval $(call BuildPackage,ttyd)) diff --git a/openwrt/files/ttyd.init b/openwrt/files/ttyd.init deleted file mode 100644 index d8d6d10..0000000 --- a/openwrt/files/ttyd.init +++ /dev/null @@ -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 -}