rsyncd 安装加入初始化

This commit is contained in:
midoks
2022-06-29 09:43:58 +08:00
parent 3958b2c915
commit 50e2794f68
+14 -1
View File
@@ -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
}