Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/plugins/php-guard/install.sh

35 lines
616 B

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
Install_pg()
{
5 months ago
echo '安装PHP守护中...'
echo 'True' > ${rootPath}/data/502Task.pl
3 years ago
mkdir -p $serverPath/php-guard
echo '1.0' > $serverPath/php-guard/version.pl
5 months ago
echo '安装PHP守护成功!!'
}
Uninstall_pg()
{
rm -rf ${rootPath}/data/502Task.pl
3 years ago
rm -rf $serverPath/php-guard
echo '卸载PHP守护成功!!'
}
action=$1
host=$2
if [ "${1}" == 'install' ];then
Install_pg
else
Uninstall_pg
fi