Skip to content
This repository was archived by the owner on Jan 7, 2024. It is now read-only.

Commit 5aa1ef9

Browse files
committed
Detect web port
1 parent 09ab126 commit 5aa1ef9

File tree

2 files changed

+2
-2
lines changed
  • root/etc/s6-overlay/s6-rc.d/svc-unifi-controller

2 files changed

+2
-2
lines changed

root/etc/s6-overlay/s6-rc.d/svc-unifi-controller/data/check

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
WEB_PORT=$(grep 'unifi.https.port=' '/config/data/system.properties' | awk -F '=' '{print $2}')
4+
35
if [[ $(curl -skL "https://localhost:${WEB_PORT:-8443}/status" | jq -r '.meta.up' 2>/dev/null) = true ]]; then
46
exit 0
57
else

root/etc/s6-overlay/s6-rc.d/svc-unifi-controller/run

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/usr/bin/with-contenv bash
22
# shellcheck shell=bash
33

4-
WEB_PORT=$(grep 'unifi.https.port=' '/config/data/system.properties' | awk -F '=' '{print $2}')
5-
64
if [[ -z ${MEM_LIMIT} ]] || [[ ${MEM_LIMIT} = "default" ]]; then
75
MEM_LIMIT="1024"
86
fi

0 commit comments

Comments
 (0)