diff options
author | root <root@rshg054.dnsready.net> | 2012-05-28 00:02:35 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-05-28 00:02:35 +0000 |
commit | 89dd7b5f30d48c708092a71b1c8285090fe91505 (patch) | |
tree | fb3a22f789121b955ff0fce7ec8d2f8c8886579b /community/ipvsadm/ipvsadm.systemd | |
parent | 1f45ad8e3f17397e2f44e68ef9a0d860091eea9e (diff) |
Mon May 28 00:02:35 UTC 2012
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: |