mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
rsyncd 安装加入初始化
This commit is contained in:
@@ -14,13 +14,26 @@ Install_rsyncd()
|
||||
{
|
||||
echo '正在安装脚本文件...' > $install_tmp
|
||||
mkdir -p $serverPath/rsyncd
|
||||
|
||||
|
||||
echo '1.0' > $serverPath/rsyncd/version.pl
|
||||
echo '安装完成' > $install_tmp
|
||||
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/rsyncd/index.py start
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/rsyncd/index.py initd_install
|
||||
}
|
||||
|
||||
Uninstall_rsyncd()
|
||||
{
|
||||
if [ -f /lib/systemd/system/rsyncd.service ];then
|
||||
systemctl stop rsyncd
|
||||
systemctl disable rsyncd
|
||||
rm -rf /lib/systemd/system/rsyncd.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -f $serverPath/rsyncd/initd/rsyncd ];then
|
||||
$serverPath/rsyncd/initd/rsyncd stop
|
||||
fi
|
||||
rm -rf $serverPath/rsyncd
|
||||
echo "卸载完成" > $install_tmp
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user