Hi!请登陆

迅雷远程下载的服务脚本

2020-10-31 65 10/31

放到/etc/init.d中即可。

/home/pi/xunlei/portal是portal的绝对路径!

#!/bin/sh
#
# Xunlei initscript
#
### BEGIN INIT INFO
# Provides: xunlei
# Required-Start: $network $local_fs $remote_fs
# Required-Stop:: $network $local_fs $remote_fs
# Should-Start: $all
# Should-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start xunlei at boot time
# Description: A downloader
### END INIT INFO
do_start()
{
/home/pi/xunlei/portal
}
do_stop()
{
/home/pi/xunlei/portal -s
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
esac

Tag:

相关推荐