mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 09:49:28 +08:00
chore(install-agent): formatting + rm unused variable
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user