diff --git a/SPECS/ipvsadm-config b/SPECS/ipvsadm-config new file mode 100644 index 0000000..34251a3 --- /dev/null +++ b/SPECS/ipvsadm-config @@ -0,0 +1,23 @@ +# Unload modules on restart and stop +# Value: yes|no, default: yes +# This option has to be 'yes' to get to a sane state for a ipvs +# restart or stop. Only set to 'no' if there are problems unloading ipvs +# modules. +IPVS_MODULES_UNLOAD="yes" + +# Save current ipvs rules on stop. +# Value: yes|no, default: no +# Saves all ipvs rules to /etc/sysconfig/ipvsadm if ipvsadm gets stopped +# (e.g. on system shutdown). +IPVS_SAVE_ON_STOP="no" + +# Save current ipvs rules on restart. +# Value: yes|no, default: no +# Saves all ipvs rules to /etc/sysconfig/ipvsadm if ipvsadm gets +# restarted. +IPVS_SAVE_ON_RESTART="no" + +# Numeric status output +# Value: yes|no, default: yes +# Print IP addresses and port numbers in numeric format in the status output. +IPVS_STATUS_NUMERIC="yes" diff --git a/SPECS/ipvsadm.service b/SPECS/ipvsadm.service new file mode 100644 index 0000000..a1d497f --- /dev/null +++ b/SPECS/ipvsadm.service @@ -0,0 +1,14 @@ +[Unit] +Description=Initialise the Linux Virtual Server +After=syslog.target network.target + +[Service] +Type=oneshot +ExecStart=/bin/bash -c "exec /sbin/ipvsadm-restore < /etc/sysconfig/ipvsadm" +ExecStop=/bin/bash -c "exec /sbin/ipvsadm-save -n > /etc/sysconfig/ipvsadm" +ExecStop=/sbin/ipvsadm -C +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target +