mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-19 09:53:02 -04:00
auto install plugin, add various checks
This commit is contained in:
@@ -8,15 +8,13 @@ This mod adds a service to start the [notify-push](https://github.com/nextcloud/
|
|||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
1. Download and install the "client-push" (``notify-push``) app from the Nextcloud store.
|
1. Add ``DOCKER_MODS=linuxserver/mods:nextcloud-notify-push`` to your env.
|
||||||
|
|
||||||
2. Add ``DOCKER_MODS=linuxserver/mods:nextcloud-notify-push`` to your env.
|
2. Make sure that Redis is already configured with Nextcloud.
|
||||||
|
|
||||||
3. notify_push should be running and ``**** Starting notify-push ****`` appear in the log. Also check for errors.
|
3. [Configure your reverse proxy for notify push.](https://github.com/nextcloud/notify_push#reverse-proxy)
|
||||||
|
|
||||||
4. [Configure your reverse proxy for notify push.](https://github.com/nextcloud/notify_push#reverse-proxy)
|
4. notify_push should be running and ``**** Starting notify-push ****`` appear in the log. Also check for errors.
|
||||||
|
|
||||||
5. run ``occ notify_push:setup https://cloud.example.org/push`` to test and enable notify-push, replace "*cloud.example.org*" with your domain.
|
|
||||||
|
|
||||||
### SWAG configuration
|
### SWAG configuration
|
||||||
|
|
||||||
|
|||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
NOTIFY_PUSH_URL=$(echo "$(occ config:system:get overwrite.cli.url)/push")
|
||||||
|
echo "**** Setting notify_push server URL to ${NOTIFY_PUSH_URL} ****"
|
||||||
|
if ! occ notify_push:setup "${NOTIFY_PUSH_URL}"; then
|
||||||
|
echo "**** There was an error setting the notify_push server URL. Please double check your reverse proxy settings as well as the overwrite.cli.url entry in Nextcloud's config.php ****"
|
||||||
|
fi
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
oneshot
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/etc/s6-overlay/s6-rc.d/svc-mod-nextcloud-notify-push-set-url/run
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
7867
|
||||||
@@ -2,8 +2,23 @@
|
|||||||
|
|
||||||
export NEXTCLOUD_URL="https://localhost"
|
export NEXTCLOUD_URL="https://localhost"
|
||||||
export ALLOW_SELF_SIGNED=true
|
export ALLOW_SELF_SIGNED=true
|
||||||
NEXTCLOUD_BASE="/config/www/nextcloud"
|
export NEXTCLOUD_BASE="/config/www/nextcloud"
|
||||||
NOTIFY_PUSH_BIN="$NEXTCLOUD_BASE/apps/notify_push/bin/$(arch)/notify_push"
|
export NOTIFY_PUSH_BIN="$NEXTCLOUD_BASE/apps/notify_push/bin/$(arch)/notify_push"
|
||||||
|
|
||||||
|
installed_version=$(php -r "require '/config/www/nextcloud/config/config.php'; echo \$CONFIG['version'];" 2>/dev/null)
|
||||||
|
if [ "${installed_version}" = "" ]; then
|
||||||
|
echo "**** Nextcloud not installed yet. Please go through the wizard and restart the container. Then notify_push will be enabled. ****"
|
||||||
|
sleep infinity
|
||||||
|
fi
|
||||||
|
# Check redis
|
||||||
|
if ! occ config:system:get redis >/dev/null; then
|
||||||
|
echo "**** Redis does not seem to be configued. Notify_push will not start ****"
|
||||||
|
sleep infinity
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "**** Making sure the Nextcloud Client Push plugin is installed and enabled ****"
|
||||||
|
occ app:install notify_push
|
||||||
|
occ app:enable notify_push
|
||||||
|
|
||||||
# Check if notify-push is installed
|
# Check if notify-push is installed
|
||||||
if [ ! -d "$NEXTCLOUD_BASE/apps/notify_push/" ]; then
|
if [ ! -d "$NEXTCLOUD_BASE/apps/notify_push/" ]; then
|
||||||
@@ -18,4 +33,6 @@ fi
|
|||||||
|
|
||||||
# run notify-push binary
|
# run notify-push binary
|
||||||
echo "**** Starting notify-push ****"
|
echo "**** Starting notify-push ****"
|
||||||
|
exec \
|
||||||
|
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 7867" \
|
||||||
s6-setuidgid abc "$NOTIFY_PUSH_BIN" "$NEXTCLOUD_BASE/config/config.php"
|
s6-setuidgid abc "$NOTIFY_PUSH_BIN" "$NEXTCLOUD_BASE/config/config.php"
|
||||||
Reference in New Issue
Block a user