Add ttyd package

Signed-off-by: Shuanglei Tao <tsl0922@gmail.com>
This commit is contained in:
Shuanglei Tao
2016-09-28 00:54:49 +08:00
parent 9adfaaf286
commit c2eb132d5d
2 changed files with 76 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/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
}