51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

linux 具体到某一天执行任务 案例

47系统和219系统链接让用户不能进行访问就行具体时间是除夕到初十(2月9-18号)放假期间

定时关:2024年2月9日 23:00

定时开:2024年2月18日 23:00

00

cat 1_close_aqfxgk.geobim.cn.sh

#! /bin/bash


mv /etc/nginx/conf.d/aqfxgk.geobim.cn.conf /etc/nginx/conf.d/aqfxgk.geobim.cn.conf.bak
mv /etc/nginx/conf.d/closesite.conf.bak  /etc/nginx/conf.d/closesite.conf

echo "mv /etc/nginx/conf.d/aqfxgk.geobim.cn.conf /etc/nginx/conf.d/aqfxgk.geobim.cn.conf.bak "
nginx -s reload 

cat 2_open_aqfxgk.geobim.cn.sh

#! /bin/bash


mv /etc/nginx/conf.d/aqfxgk.geobim.cn.conf.bak  /etc/nginx/conf.d/aqfxgk.geobim.cn.conf
mv /etc/nginx/conf.d/closesite.conf  /etc/nginx/conf.d/closesite.conf.bak

echo "mv /etc/nginx/conf.d/aqfxgk.geobim.cn.conf.bak  /etc/nginx/conf.d/aqfxgk.geobim.cn.conf"

nginx -s reload

00 23 09 2 * root sh /mnt/data/zzy/scripts/shutdownnginx/1_close_aqfxgk.geobim.cn.sh > /mnt/data/zzy/scripts/shutdownnginx/closeopen.log 2>&1
00 23 18 2 * root sh /mnt/data/zzy/scripts/shutdownnginx/2_open_aqfxgk.geobim.cn.sh  > /mnt/data/zzy/scripts/shutdownnginx/closeopen.log 2>&1
赞(1)
未经允许不得转载:工具盒子 » linux 具体到某一天执行任务 案例