linux服务器,使用systemctl stop停止一个web程序,会执行finally里的语句,但是kill -9这个程序,就不会执行

2022-08-13 社会 118阅读
1、cd /usr/lib/systemd/system
2、查实例grep Stop *.service
auditd.service:RefuseManualStop=yes
blk-availability.service:ExecStop=/usr/sbin/blkdeactivate -u -l wholevg
console-shell.service:ExecStopPost=-/usr/bin/systemctl poweroff
cpupower.service:ExecStop=/usr/bin/cpupower $CPUPOWER_STOP_OPTS
ebtables.service:ExecStop=/usr/libexec/ebtables stop
iptables.service:ExecStop=/usr/libexec/iptables/iptables.init stop
kdump.service:ExecStop=/usr/bin/kdumpctl stop
nginx.service:ExecStop=/bin/kill -s QUIT $MAINPID
postfix.service:ExecStop=/usr/sbin/postfix stop
rdma.service:RefuseManualStop=true
rhel-configure.service:ExecStopPost=/bin/rm -f /.unconfigured
3、可见并不是所有的stop都是kill命令
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com