diff options
Diffstat (limited to 'community/ipvsadm/ipvsadm.systemd')
-rw-r--r-- | community/ipvsadm/ipvsadm.systemd | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/community/ipvsadm/ipvsadm.systemd b/community/ipvsadm/ipvsadm.systemd new file mode 100644 index 000000000..3b72bd3ef --- /dev/null +++ b/community/ipvsadm/ipvsadm.systemd @@ -0,0 +1,22 @@ +#!/bin/bash + +. /etc/conf.d/ipvsadm + +case $1 in + start) + ipvsadm-restore < "$CONFIG_FILE" + ;; + stop) + [[ $SAVE_ON_STOP =~ [yY][eE][sS] ]] && $0 save + ipvsadm -C + ;; + save) + ipvsadm-save -n > "$CONFIG_FILE" + ;; + *) + echo "usage: ${0##*/} {start|stop|save}" >&2 + exit 1 + ;; +esac + +# vim:set ts=2 sw=2 ft=sh et: |