mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2026-11-20 21:23:41 +03:00
16 lines
901 B
Bash
Executable File
16 lines
901 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# sentinel file to check if client_id was already created
|
|
CLIENT_SENTINEL="${APP_DATA_DIR}/desktop_client_id.txt"
|
|
|
|
# ──────────────────────────────────────────────────────────────
|
|
# Ensure desktop_client_id.txt exists
|
|
# ──────────────────────────────────────────────────────────────
|
|
if [[ ! -s "$CLIENT_SENTINEL" ]]; then
|
|
echo "Solidtime: generating desktop client id…"
|
|
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" \
|
|
run --rm scheduler php artisan passport:client --name=desktop --redirect_uri=solidtime://oauth/callback --public -n \
|
|
| grep 'Client ID' | awk '{print $NF}' > "$CLIENT_SENTINEL"
|
|
fi
|