mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 17:59:28 +08:00
chore(install-agent): formatting + rm unused variable
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Move is_alpine function to the top of the file
|
|
||||||
is_alpine() {
|
is_alpine() {
|
||||||
[ -f /etc/alpine-release ]
|
[ -f /etc/alpine-release ]
|
||||||
}
|
}
|
||||||
@@ -9,7 +8,6 @@ is_openwrt() {
|
|||||||
cat /etc/os-release | grep -q "OpenWrt"
|
cat /etc/os-release | grep -q "OpenWrt"
|
||||||
}
|
}
|
||||||
|
|
||||||
version=0.0.1
|
|
||||||
# Define default values
|
# Define default values
|
||||||
PORT=45876
|
PORT=45876
|
||||||
UNINSTALL=false
|
UNINSTALL=false
|
||||||
@@ -133,12 +131,12 @@ if [ "$UNINSTALL" = true ]; then
|
|||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Removing the Beszel Agent directory..."
|
echo "Removing the Beszel Agent directory..."
|
||||||
rm -rf /opt/beszel-agent
|
rm -rf /opt/beszel-agent
|
||||||
|
|
||||||
echo "Removing the dedicated user for the agent service..."
|
echo "Removing the dedicated user for the agent service..."
|
||||||
killall beszel-agent 2>/dev/null
|
killall beszel-agent 2>/dev/null
|
||||||
if is_alpine || is_openwrt; then
|
if is_alpine || is_openwrt; then
|
||||||
deluser beszel 2>/dev/null
|
deluser beszel 2>/dev/null
|
||||||
else
|
else
|
||||||
userdel beszel 2>/dev/null
|
userdel beszel 2>/dev/null
|
||||||
|
Reference in New Issue
Block a user