From 33d24b869b21ed70bb1f1d5969a59e170433061e Mon Sep 17 00:00:00 2001 From: sang Date: Thu, 16 Jan 2025 15:23:56 +0800 Subject: [PATCH] docs(readme): Add uninstall guide MODIFIED: README.md NEW: uninstall.sh --- README.md | 13 +++++++++++++ uninstall.sh | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 uninstall.sh diff --git a/README.md b/README.md index 5476b4c..eb7d302 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,16 @@ Open `/usr/local/etc/lxc-iptag.conf` and change the config | FW_NET_INTERFACE_CHECK_INTERVAL | `60` | The interval(seconds) for using `ifconfig` to check lxc status changed (Set -1 to disable this feature) | | LXC_STATUS_CHECK_INTERVAL | `-1` | The interval(seconds) for using `pct list` to check lxc status changed (Set -1 to disable this feature) | | FORCE_UPDATE_INTERVAL | `1800` | The interval(seconds) for force check and update lxc tags | + +## 3. Uninstall + +```sh +# stop lxc-iptag +systemctl stop lxc-iptag.service +systemctl disable lxc-iptag.service + +# remove lxc-iptag +rm -f /lib/systemd/system/lxc-iptag.service +rm -f /usr/local/etc/lxc-iptag.conf +rm -f /usr/local/bin/lxc-iptag +``` diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..f442dc2 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -xe + +# stop lxc-iptag +systemctl stop lxc-iptag.service +systemctl disable lxc-iptag.service + +# remove lxc-iptag +rm -f /lib/systemd/system/lxc-iptag.service +rm -f /usr/local/etc/lxc-iptag.conf +rm -f /usr/local/bin/lxc-iptag