mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
initscripts: start loxilb keepalived after reboot
When loxilb and keepalived are enabled, after BPFire rebooted, loxilb and keepalived failed to start and shows as "STOPPED" from UI, this is not expected since we want to loxilb and keepalived to continue to be enabled after reboot based on the enabled state of loxilb and keepalived before reboot. Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
@@ -39,3 +39,4 @@ usr/sbin/keepalived
|
||||
#usr/share/man/man8/keepalived.8
|
||||
var/ipfire/backup/addons/includes/keepalived
|
||||
var/ipfire/keepalived
|
||||
etc/rc.d/rc3.d/S101keepalived
|
||||
|
||||
@@ -4,3 +4,4 @@ opt/loxilb/llb_kern_sock.o
|
||||
opt/loxilb/llb_xdp_main.o
|
||||
opt/loxilb/loxilb_libdp.o
|
||||
usr/bin/loxilb
|
||||
etc/rc.d/rc3.d/S100loxilb
|
||||
|
||||
@@ -135,6 +135,8 @@ $(TARGET) :
|
||||
ln -sf ../init.d/imspetor /etc/rc.d/rc3.d/S99imspetor
|
||||
ln -sf ../init.d/motion /etc/rc.d/rc3.d/S99motion
|
||||
ln -sf ../init.d/vdradmin /etc/rc.d/rc3.d/S99vdradmin
|
||||
ln -sf ../init.d/loxilb /etc/rc.d/rc3.d/S100loxilb
|
||||
ln -sf ../init.d/keepalived /etc/rc.d/rc3.d/S101keepalived
|
||||
|
||||
ln -sf ../init.d/imspetor /etc/rc.d/rc6.d/K01imspetor
|
||||
ln -sf ../init.d/motion /etc/rc.d/rc6.d/K01motion
|
||||
|
||||
@@ -23,17 +23,20 @@
|
||||
. ${rc_functions}
|
||||
|
||||
[ -r "/etc/sysconfig/keepalive" ] && . /etc/sysconfig/keepalive
|
||||
eval $(/usr/local/bin/readhash /var/ipfire/keepalived/runsettings)
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
# Load IPVS module
|
||||
modprobe ip_vs
|
||||
# modprobe ip_vs
|
||||
|
||||
# Enable connection tracking for IPVS
|
||||
sysctl -w net.ipv4.vs.conntrack=1 &>/dev/null
|
||||
# sysctl -w net.ipv4.vs.conntrack=1 &>/dev/null
|
||||
|
||||
boot_mesg "Starting keepalive daemon..."
|
||||
loadproc /usr/sbin/keepalived ${KEEPALIVED_OPTIONS}
|
||||
if [ "$ENABLE_HA" == "on" ]; then
|
||||
boot_mesg "Starting keepalive daemon..."
|
||||
loadproc /usr/sbin/keepalived ${KEEPALIVED_OPTIONS}
|
||||
fi
|
||||
;;
|
||||
|
||||
stop)
|
||||
|
||||
Reference in New Issue
Block a user