redis 安装加入初始化

pull/116/head
midoks 3 years ago
parent fdbf49c5db
commit 5d7f61e4bc
  1. 6
      plugins/php/install.sh
  2. 20
      plugins/redis/install.sh

@ -32,12 +32,10 @@ if [ ! -d $curPath/versions/$2 ];then
fi
if [ "${action}" == "uninstall" ];then
#初始化
cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py stop ${type}
cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py initd_uninstall ${type}
if [ -f /lib/systemd/system/php${type}.service ];then
systemctl stop php${type}
systemctl disable php${type}
rm -rf /lib/systemd/system/php${type}.service
systemctl daemon-reload
fi

@ -28,18 +28,30 @@ Install_redis()
cd redis-${VERSION} && make PREFIX=$serverPath/redis install
sed '/^ *#/d' redis.conf > $serverPath/redis/redis.conf
echo "${VERSION}" > $serverPath/redis/version.pl
if [ -d $serverPath/redis ];then
echo "${VERSION}" > $serverPath/redis/version.pl
echo '安装完成' > $install_tmp
echo '安装完成' > $install_tmp
cd ${rootPath} && python3 ${rootPath}/plugins/redis/index.py start
cd ${rootPath} && python3 ${rootPath}/plugins/redis/index.py initd_install
fi
}
Uninstall_redis()
{
rm -rf $serverPath/redis
if [ -f /lib/systemd/system/redis.service ];then
systemctl stop redis
systemctl disable redis
rm -rf /lib/systemd/system/redis.service
systemctl daemon-reload
fi
if [ -f $serverPath/redis/initd/redis ];then
$serverPath/redis/initd/redis stop
fi
rm -rf $serverPath/redis
echo "Uninstall_redis" > $install_tmp
}

Loading…
Cancel
Save