首页 > 服务器 > ubuntu安装配置Xware1.0.31

作者:ghostry 发布时间:2016-10-04 浏览: 4813

转载注明出处: https://blog.1ge.fun/server/747.html

首先下载Xware1.0.31_x86_32_glibc.zip
解包到一个目录

apt install zlib1g:i386
useradd --no-create-home --user-group thunder
mkdir /media/thunder/TDDownload -p
chmod 777 -R /mnt/data/down
chown thunder:thunder /media/thunder/TDDownload
chown thunder:thunder /mnt/data/opt/Xware1.0.31
mount --bind /mnt/data/down /media/thunder/TDDownload/
cd /mnt/data/opt/Xware1.0.31
vi start.sh

写入

#!/bin/sh

XWARE_DIR="/mnt/data/opt/Xware1.0.31"
USERNAME="thunder"
# 下载绝对路径
DOWN_DIR=/mnt/data/down
# 挂载路径
MOUNT_DIR=/media/thunder/TDDownload
if [ $# -gt 0 ];
then
    # 加参数 -s是关闭
    su $USERNAME -c "$XWARE_DIR/portal -s"
    code=$?
    if [ $code -eq 0 ];
    then
        umount $MOUNT_DIR
        echo "xware stop sucess..."
    else
        echo "xware stop fail,code $code"
    fi
else
    mount --bind $DOWN_DIR $MOUNT_DIR
    # 不加参数默认是启动
    su $USERNAME -c $XWARE_DIR/portal
    code=$?
    if [ $code -eq 0 ];
    then
        echo "xware start sucess..."
    else
        echo "xware start fail,code $code"
    fi
fi

执行

./start.sh

把得到的key绑定
然后

vi /etc/rc.local

加入

/mnt/data/opt/Xware1.0.31/start.sh

标签: ubuntu

上一篇: ubuntu安装配置aria2
下一篇: Ubuntu/Debian自动安装安全更新

添加新评论 »

*
*

欢迎评论!歡迎評論!Comments welcome!komentoj bonvenaj!댓글 오신 것을 환영합니다!
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: :cold: :cryy: :cute: :shy: :sleep: :struggle: :tea: :yahou: