fix: entrypoint - only make group if does not exist at GID 100. Also other docs rambling because i can't be bothered to make another commit

This commit is contained in:
Sam Chau
2026-01-21 03:36:41 +10:30
parent 793b2b6bce
commit 9b5b00fd99
2 changed files with 28 additions and 7 deletions

View File

@@ -17,10 +17,17 @@ UMASK=${UMASK:-022}
# -----------------------------------------------------------------------------
# Create group if it doesn't exist
# -----------------------------------------------------------------------------
if ! getent group profilarr > /dev/null 2>&1; then
if getent group "${PGID}" > /dev/null 2>&1; then
# GID already exists - use that group name for the user
PROFILARR_GROUP=$(getent group "${PGID}" | cut -d: -f1)
elif ! getent group profilarr > /dev/null 2>&1; then
# GID is free and profilarr group doesn't exist - create it
groupadd -g "${PGID}" profilarr
elif [ "$(getent group profilarr | cut -d: -f3)" != "${PGID}" ]; then
PROFILARR_GROUP=profilarr
else
# profilarr group exists but with wrong GID - modify it
groupmod -g "${PGID}" profilarr 2>/dev/null || true
PROFILARR_GROUP=profilarr
fi
# -----------------------------------------------------------------------------

View File

@@ -1,6 +1,8 @@
> a quick brain dump for ideas as they come up
# Filter Cooldown
# Adaptive Backoff
_aka the-bear-is-sticky-with-honey_ 🐻🍯
Eventually, a filter is going is to "run out" of items to search. Maybe its an
uber specific one - all marvel releases perhaps. What are they at now? 30
@@ -31,8 +33,8 @@ want to wake it up?
we care about removals? greater than only wakes for new items
- edge case: count stays same but items changed (one removed, one added) -
probably fine though, filters like minimum_availability already catch state
changes (e.g., movie goes from announced to released, now passes filter,
count increases)
changes (e.g., movie goes from announced to released, now passes filter, count
increases)
- if same, still sleeping, return early
- cheap check, catches everything (new items, removed items, filter edits,
quality changes) maybe
@@ -49,8 +51,8 @@ want to wake it up?
**Other considerations:**
- UI feedback: show current state to user, e.g., "next run in 4h (backed off 2x)"
or indicator on sleeping filters. otherwise invisible and confusing
- UI feedback: show current state to user, e.g., "next run in 4h (backed off
2x)" or indicator on sleeping filters. otherwise invisible and confusing
- what triggers backoff: probably either 0 afterCooldown OR 0 upgrades found
- per-filter state: each filter tracks its own multiplier. important for
round_robin
@@ -86,6 +88,7 @@ want to wake it up?
7. Save state: lastMatchedCount, emptyRunCount, nextRunAt
**On success (found upgrades):**
- Reset emptyRunCount to 0
- Reset backoffMultiplier to 1 (or gradual decay?)
- Resume normal schedule
@@ -147,3 +150,14 @@ Run 50: matched=50, afterCooldown=0
Run N: sleeping, dry run → matched=70 (was 50)
WAKE UP!
```
# Toggles
Maybe use DropdownSelect instead? i hate the current design
# Upgrades Info
Move info to upgrades/info to use full page. Modal is too small
- using a table maybe?
- examples?