我在debian jessie服务器上安装了fstab的sambanetworking共享。 在这些共享上,我存储了apache2 web服务器使用的文件。
如果networking共享脱机,是否有办法停止apache2服务?
当这个文件不可用,如果桑巴不工作,你可以使用简单的bash脚本:
if [ -a "path/to/file" ] then return 0; else systemctl stop apache2 return 0; fi
并将此脚本添加到每分钟的cron。