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/ipset/ipset.systemd | |
parent | 1f45ad8e3f17397e2f44e68ef9a0d860091eea9e (diff) |
Mon May 28 00:02:35 UTC 2012
Diffstat (limited to 'community/ipset/ipset.systemd')
-rw-r--r-- | community/ipset/ipset.systemd | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/community/ipset/ipset.systemd b/community/ipset/ipset.systemd index 36df5124a..92397f3a7 100644 --- a/community/ipset/ipset.systemd +++ b/community/ipset/ipset.systemd @@ -2,7 +2,21 @@ . /etc/conf.d/ipset -[[ -f $IPSET_CONF ]] || exit 1 -ipset restore < "$IPSET_CONF" +case $1 in + start) + ipset restore < "$CONFIG_FILE" + ;; + stop) + [[ $SAVE_ON_STOP =~ [yY][eE][sS] ]] && $0 save + ipset destroy + ;; + save) + ipset save > "$CONFIG_FILE" + ;; + *) + echo "usage: ${0##*/} {start|stop|save}" >&2 + exit 1 + ;; +esac # vim:set ts=2 sw=2 ft=sh et: |