chore(install-agent): formatting + rm unused variable

This commit is contained in:
Henry Dollman
2025-01-18 18:09:02 -05:00
parent 4789f48ad0
commit ee6a456b66

View File

@@ -1,6 +1,5 @@
#!/bin/sh
# Move is_alpine function to the top of the file
is_alpine() {
[ -f /etc/alpine-release ]
}
@@ -9,7 +8,6 @@ is_openwrt() {
cat /etc/os-release | grep -q "OpenWrt"
}
version=0.0.1
# Define default values
PORT=45876
UNINSTALL=false
@@ -133,12 +131,12 @@ if [ "$UNINSTALL" = true ]; then
systemctl daemon-reload
fi
echo "Removing the Beszel Agent directory..."
rm -rf /opt/beszel-agent
echo "Removing the Beszel Agent directory..."
rm -rf /opt/beszel-agent
echo "Removing the dedicated user for the agent service..."
killall beszel-agent 2>/dev/null
if is_alpine || is_openwrt; then
echo "Removing the dedicated user for the agent service..."
killall beszel-agent 2>/dev/null
if is_alpine || is_openwrt; then
deluser beszel 2>/dev/null
else
userdel beszel 2>/dev/null