黑帽联盟

标题: keepalived停掉后,发现状态依然是running [打印本页]

作者: 定位    时间: 2024-7-28 22:09
标题: keepalived停掉后,发现状态依然是running
查看keepalived的启动service文件
systemctl cat keepalived
内容如下:
# /usr/lib/systemd/system/keepalived.service
[Unit]
Description=LVS and VRRP High Availability Monitor
After=syslog.target network-online.target

[Service]
Type=forking
PIDFile=/var/run/keepalived.pid
KillMode=process
EnvironmentFile=-/etc/sysconfig/keepalived
ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
把这一行(KillMode=process)注释掉即可,这行目前只会停止主进程而不会关闭子进程,所以才会出现这个情况







欢迎光临 黑帽联盟 (https://bbs.cnblackhat.com/) Powered by Discuz! X2.5