This repository was archived by the owner on Jan 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
root/etc/s6-overlay/s6-rc.d/svc-unifi-controller Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [[ $( curl -skL " https://localhost:${WEB_PORT:- 8443} /status" | jq -r ' .meta.up' 2> /dev/null) = true ]]; then
4+ exit 0
5+ else
6+ exit 1
7+ fi
Original file line number Diff line number Diff line change 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+
46if [[ -z ${MEM_LIMIT} ]] || [[ ${MEM_LIMIT} = "default" ]]; then
57 MEM_LIMIT="1024"
68fi
79
810if [[ -z ${MEM_STARTUP} ]] || [[ ${MEM_STARTUP} = "default" ]]; then
911 exec \
10- s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8443" \
12+ s6-notifyoncheck -d -n 600 -w 1000 \
1113 cd /config s6-setuidgid abc java -Xmx"${MEM_LIMIT}M" -Dlog4j2.formatMsgNoLookups=true -jar /usr/lib/unifi/lib/ace.jar start;
1214else
1315 exec \
14- s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8443" \
16+ s6-notifyoncheck -d -n 600 -w 1000 \
1517 cd /config s6-setuidgid abc java -Xms"${MEM_STARTUP}M" -Xmx"${MEM_LIMIT}M" -Dlog4j2.formatMsgNoLookups=true -jar /usr/lib/unifi/lib/ace.jar start;
1618fi
You can’t perform that action at this time.
0 commit comments