feat: add bootstrap one-click deploy and update deployment docs
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+5
-1
@@ -40,7 +40,11 @@ source "$ENV_FILE"
|
||||
: "${PANEL_USERNAME:=admin}"
|
||||
|
||||
if [[ -z "${PANEL_PASSWORD:-}" ]]; then
|
||||
PANEL_PASSWORD="$(sing-box generate rand --base64 32 | tr -d '/+=' | head -c 20)"
|
||||
if command -v sing-box >/dev/null 2>&1; then
|
||||
PANEL_PASSWORD="$(sing-box generate rand --base64 32 | tr -d '/+=' | head -c 20)"
|
||||
else
|
||||
PANEL_PASSWORD="$(openssl rand -base64 32 | tr -d '/+=' | head -c 20)"
|
||||
fi
|
||||
if grep -q "^PANEL_PASSWORD=" "$ENV_FILE" 2>/dev/null; then
|
||||
sed -i "s|^PANEL_PASSWORD=.*|PANEL_PASSWORD=${PANEL_PASSWORD}|" "$ENV_FILE"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user