mirror of
https://github.com/CoolnsX/selfhost_podman.git
synced 2025-12-20 11:55:16 +05:30
Chore: moved the nextcloud setup to control via environment variables
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
NC_PATH="/var/www/html"
|
||||
CONFIG="$NC_PATH/config/config.php"
|
||||
NOTIFY_BIN="$NC_PATH/apps/notify_push/bin/x86_64/notify_push"
|
||||
SOCKET_PATH="${SOCKET_PATH:-/tmp/docker/notify_push.sock}"
|
||||
# env exports
|
||||
export NEXTCLOUD_URL="${NEXTCLOUD_URL:-$OVERWRITECLIURL}"
|
||||
export REDIS_URL="redis+unix://${REDIS_HOST}"
|
||||
export DATABASE_URL="mysql://${MARIADB_USER}:${MARIADB_PASSWORD}@localhost/${MARIADB_DATABASE}?socket=${MARIADB_HOST}"
|
||||
export DATABASE_PREFIX="oc_"
|
||||
|
||||
# Clean shutdown handler
|
||||
cleanup() {
|
||||
@@ -18,12 +19,12 @@ php occ app:install notify_push || true
|
||||
php occ app:enable notify_push || true
|
||||
|
||||
echo "[*] Starting notify_push binary..."
|
||||
"$NOTIFY_BIN" "$CONFIG" &
|
||||
/var/www/html/apps/notify_push/bin/x86_64/notify_push &
|
||||
NOTIFY_PID=$!
|
||||
|
||||
# Wait for the socket to appear, max 30 seconds
|
||||
i=0
|
||||
while [ $i -lt 6 ]; do
|
||||
i=1
|
||||
while [ $i -le 6 ]; do
|
||||
echo "[*] Waiting 5 seconds for notify_push to be ready... (try $i/6)"
|
||||
sleep 5
|
||||
if [ -S "$SOCKET_PATH" ]; then
|
||||
|
||||
Reference in New Issue
Block a user