parent
bdb45d126b
commit
2a7264c444
12
AMHScript
12
AMHScript
|
|
@ -105,10 +105,18 @@ function amh_module_admin()
|
||||||
amh nginx reload;
|
amh nginx reload;
|
||||||
;;
|
;;
|
||||||
start-cache)
|
start-cache)
|
||||||
echo "start cache";
|
RES=`php ${module_dir}cli.php --action='edit' --server_name=${domain} --field_name='proxy_cache' --value='1'`;
|
||||||
|
echo $RES;
|
||||||
|
if ! echo "$RES" | grep 'Error' > /dev/null; then
|
||||||
|
kill -HUP `cat /usr/local/nginx/logs/nginx.pid` && echo "[OK] successfully start-cache $domain " && exit;
|
||||||
|
fi;
|
||||||
;;
|
;;
|
||||||
stop-cache)
|
stop-cache)
|
||||||
echo "stop cache";
|
RES=`php ${module_dir}cli.php --action='edit' --server_name=${domain} --field_name='proxy_cache' --value='0'`;
|
||||||
|
echo $RES;
|
||||||
|
if ! echo "$RES" | grep 'Error' > /dev/null; then
|
||||||
|
kill -HUP `cat /usr/local/nginx/logs/nginx.pid` && echo "[OK] successfully stop-cache $domain " && exit;
|
||||||
|
fi;
|
||||||
;;
|
;;
|
||||||
cache)
|
cache)
|
||||||
echo "[Notice] 暂不支持缓存配置";
|
echo "[Notice] 暂不支持缓存配置";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue