From 3fd428ce0a59c24ed5c0ae27bc6b80971d8af5b9 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Mon, 13 Feb 2023 09:44:21 +0000 Subject: [PATCH] Rebase to 3.17, migrate to s6v3 --- .editorconfig | 2 +- .github/workflows/call_invalid_helper.yml | 12 +++++++++ .github/workflows/greetings.yml | 2 +- .github/workflows/permissions.yml | 9 +++++++ Dockerfile | 8 +++--- Dockerfile.aarch64 | 8 +++--- Dockerfile.armhf | 8 +++--- Jenkinsfile | 26 +++++++++---------- README.md | 14 +++++----- readme-vars.yml | 3 ++- .../dependencies.d/init-ddclient-config | 0 .../dependencies.d/init-config | 0 .../s6-rc.d/init-ddclient-config/run} | 6 +++-- .../s6-rc.d/init-ddclient-config/type | 1 + .../s6-rc.d/init-ddclient-config/up | 1 + .../svc-ddclient/dependencies.d/init-services | 0 root/etc/s6-overlay/s6-rc.d/svc-ddclient/run | 5 ++++ root/etc/s6-overlay/s6-rc.d/svc-ddclient/type | 1 + .../svc-inotify/dependencies.d/init-services | 0 root/etc/s6-overlay/s6-rc.d/svc-inotify/run | 11 ++++++++ root/etc/s6-overlay/s6-rc.d/svc-inotify/type | 1 + .../user/contents.d/init-ddclient-config | 0 .../s6-rc.d/user/contents.d/svc-ddclient | 0 .../s6-rc.d/user/contents.d/svc-inotify | 0 root/etc/services.d/ddclient/run | 3 --- root/etc/services.d/inotify_modify/run | 10 ------- 26 files changed, 79 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/call_invalid_helper.yml create mode 100644 .github/workflows/permissions.yml create mode 100644 root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-ddclient-config create mode 100644 root/etc/s6-overlay/s6-rc.d/init-ddclient-config/dependencies.d/init-config rename root/etc/{cont-init.d/30-config => s6-overlay/s6-rc.d/init-ddclient-config/run} (83%) mode change 100644 => 100755 create mode 100644 root/etc/s6-overlay/s6-rc.d/init-ddclient-config/type create mode 100644 root/etc/s6-overlay/s6-rc.d/init-ddclient-config/up create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-ddclient/dependencies.d/init-services create mode 100755 root/etc/s6-overlay/s6-rc.d/svc-ddclient/run create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-ddclient/type create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-inotify/dependencies.d/init-services create mode 100755 root/etc/s6-overlay/s6-rc.d/svc-inotify/run create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-inotify/type create mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/init-ddclient-config create mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-ddclient create mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-inotify delete mode 100644 root/etc/services.d/ddclient/run delete mode 100644 root/etc/services.d/inotify_modify/run diff --git a/.editorconfig b/.editorconfig index a92f7df..5f150f3 100755 --- a/.editorconfig +++ b/.editorconfig @@ -15,6 +15,6 @@ trim_trailing_whitespace = false indent_style = space indent_size = 2 -[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}] +[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}] indent_style = space indent_size = 4 diff --git a/.github/workflows/call_invalid_helper.yml b/.github/workflows/call_invalid_helper.yml new file mode 100644 index 0000000..773767c --- /dev/null +++ b/.github/workflows/call_invalid_helper.yml @@ -0,0 +1,12 @@ +name: Comment on invalid interaction +on: + issues: + types: + - labeled +jobs: + add-comment-on-invalid: + if: github.event.label.name == 'invalid' + permissions: + issues: write + uses: linuxserver/github-workflows/.github/workflows/invalid-interaction-helper.yml@v1 + secrets: inherit diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index b69be16..7a29db2 100755 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -8,6 +8,6 @@ jobs: steps: - uses: actions/first-interaction@v1 with: - issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-ddclient/blob/master/.github/ISSUE_TEMPLATE/issue.bug.yml) or [feature](https://github.com/linuxserver/docker-ddclient/blob/master/.github/ISSUE_TEMPLATE/issue.feature.yml) issue templates!' + issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.' pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-ddclient/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!' repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml new file mode 100644 index 0000000..2df6b61 --- /dev/null +++ b/.github/workflows/permissions.yml @@ -0,0 +1,9 @@ +name: Permission check +on: + pull_request: + paths: + - '**/run' + - '**/finish' +jobs: + permission_check: + uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1 diff --git a/Dockerfile b/Dockerfile index a865d8a..a5286ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:3.17 # set version label ARG BUILD_DATE @@ -10,17 +12,13 @@ LABEL maintainer="saarg" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ - bzip2 \ gcc \ make \ - tar \ wget && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ bind-tools \ - curl \ inotify-tools \ - jq \ perl \ perl-digest-sha1 \ perl-io-socket-inet6 \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index b774def..fabaed7 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.12 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 # set version label ARG BUILD_DATE @@ -10,17 +12,13 @@ LABEL maintainer="saarg" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ - bzip2 \ gcc \ make \ - tar \ wget && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ bind-tools \ - curl \ inotify-tools \ - jq \ perl \ perl-digest-sha1 \ perl-io-socket-inet6 \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 64092f2..7d3fce2 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.12 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17 # set version label ARG BUILD_DATE @@ -10,17 +12,13 @@ LABEL maintainer="saarg" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ - bzip2 \ gcc \ make \ - tar \ wget && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ bind-tools \ - curl \ inotify-tools \ - jq \ perl \ perl-digest-sha1 \ perl-io-socket-inet6 \ diff --git a/Jenkinsfile b/Jenkinsfile index e9e02e3..0905532 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,7 +59,7 @@ pipeline { env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.PULL_REQUEST = env.CHANGE_ID - env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml' + env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/call_invalid_helper.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml' } script{ env.LS_RELEASE_NUMBER = sh( @@ -815,19 +815,19 @@ pipeline { echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin if [ "${CI}" == "false" ]; then docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} - docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG} + docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} - docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} - docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest - docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest - docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} + docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} + docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} + docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} + docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} if [ -n "${SEMVER}" ]; then docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER} @@ -835,13 +835,13 @@ pipeline { docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER} fi docker push ${MANIFESTIMAGE}:amd64-${META_TAG} - docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG} - docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG} - docker push ${MANIFESTIMAGE}:amd64-latest - docker push ${MANIFESTIMAGE}:arm32v7-latest - docker push ${MANIFESTIMAGE}:arm64v8-latest docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} + docker push ${MANIFESTIMAGE}:amd64-latest + docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG} + docker push ${MANIFESTIMAGE}:arm32v7-latest docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} + docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG} + docker push ${MANIFESTIMAGE}:arm64v8-latest docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} if [ -n "${SEMVER}" ]; then docker push ${MANIFESTIMAGE}:amd64-${SEMVER} @@ -987,12 +987,12 @@ pipeline { sh 'echo "build aborted"' } else if (currentBuild.currentResult == "SUCCESS"){ - sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\ + sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 1681177,\ "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } else { - sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\ + sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 16711680,\ "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } diff --git a/README.md b/README.md index 2999be4..ccdd072 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ The architectures supported by this image are: | :----: | :----: | ---- | | x86-64 | ✅ | amd64-\ | | arm64 | ✅ | arm64v8-\ | -| armhf| ✅ | arm32v7-\ | +| armhf | ✅ | arm32v7-\ | ## Application Setup @@ -84,9 +84,9 @@ services: environment: - PUID=1000 - PGID=1000 - - TZ=Europe/London + - TZ=Etc/UTC volumes: - - :/config + - /path/to/data:/config restart: unless-stopped ``` @@ -97,10 +97,11 @@ docker run -d \ --name=ddclient \ -e PUID=1000 \ -e PGID=1000 \ - -e TZ=Europe/London \ - -v :/config \ + -e TZ=Etc/UTC \ + -v /path/to/data:/config \ --restart unless-stopped \ lscr.io/linuxserver/ddclient:latest + ``` ## Parameters @@ -111,7 +112,7 @@ Container images are configured using parameters passed at runtime (such as thos | :----: | --- | | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | -| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. | +| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). | | `-v /config` | Where ddclient should store its config files. | ## Environment variables from files (Docker secrets) @@ -223,6 +224,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **13.02.23:** - Rebase to Alpine 3.17, migrate to s6v3. * **20.10.22:** - Update build instructions for 3.10.0. Update default `ddclient.conf`. * **15.01.22:** - Rebase to Alpine 3.15 * **15.05.21:** - Distribute script 'sample-get-ip-from-fritzbox' from ddclient repo diff --git a/readme-vars.yml b/readme-vars.yml index 2b23c08..cf74209 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -26,7 +26,7 @@ param_env_vars: - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." } param_usage_include_vols: true param_volumes: - - { vol_path: "/config", vol_host_path: "", desc: "Where ddclient should store its config files." } + - { vol_path: "/config", vol_host_path: "/path/to/data", desc: "Where ddclient should store its config files." } param_usage_include_ports: false param_device_map: false cap_add_param: false @@ -52,6 +52,7 @@ app_setup_block: | # changelog changelogs: + - { date: "13.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3." } - { date: "20.10.22:", desc: "Update build instructions for 3.10.0. Update default `ddclient.conf`." } - { date: "15.01.22:", desc: "Rebase to Alpine 3.15" } - { date: "15.05.21:", desc: "Distribute script 'sample-get-ip-from-fritzbox' from ddclient repo" } diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-ddclient-config b/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-ddclient-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/dependencies.d/init-config b/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/dependencies.d/init-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/cont-init.d/30-config b/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/run old mode 100644 new mode 100755 similarity index 83% rename from root/etc/cont-init.d/30-config rename to root/etc/s6-overlay/s6-rc.d/init-ddclient-config/run index fc222a8..3a386d9 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/run @@ -1,4 +1,5 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash # make our folders mkdir -p \ @@ -6,14 +7,15 @@ mkdir -p \ /var/run/ddclient # copy default config if not present in /config -[[ ! -e /config/ddclient.conf ]] && \ +if [[ ! -e /config/ddclient.conf ]]; then cp /defaults/ddclient.conf /config +fi # copy config from /config to root cp /config/ddclient.conf /ddclient.conf # permissions -chown -R abc:abc \ +lsiown -R abc:abc \ /config \ /var/cache/ddclient \ /var/run/ddclient \ diff --git a/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/type b/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/up b/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/up new file mode 100644 index 0000000..2cde178 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-ddclient-config/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-ddclient-config/run diff --git a/root/etc/s6-overlay/s6-rc.d/svc-ddclient/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-ddclient/dependencies.d/init-services new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-ddclient/run b/root/etc/s6-overlay/s6-rc.d/svc-ddclient/run new file mode 100755 index 0000000..d3f9e86 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-ddclient/run @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +exec \ + s6-setuidgid abc /usr/bin/ddclient -foreground -file /ddclient.conf diff --git a/root/etc/s6-overlay/s6-rc.d/svc-ddclient/type b/root/etc/s6-overlay/s6-rc.d/svc-ddclient/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-ddclient/type @@ -0,0 +1 @@ +longrun diff --git a/root/etc/s6-overlay/s6-rc.d/svc-inotify/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-inotify/dependencies.d/init-services new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-inotify/run b/root/etc/s6-overlay/s6-rc.d/svc-inotify/run new file mode 100755 index 0000000..8d36cf4 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-inotify/run @@ -0,0 +1,11 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +# starting inotify to watch /config/ddclient.conf and restart ddclient if changed. +while inotifywait -e modify /config/ddclient.conf; do + cp /config/ddclient.conf /ddclient.conf + lsiown abc:abc /ddclient.conf + chmod 600 /ddclient.conf + s6-svc -h /run/service/svc-ddclient + echo "ddclient has been restarted" +done diff --git a/root/etc/s6-overlay/s6-rc.d/svc-inotify/type b/root/etc/s6-overlay/s6-rc.d/svc-inotify/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-inotify/type @@ -0,0 +1 @@ +longrun diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-ddclient-config b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-ddclient-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-ddclient b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-ddclient new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-inotify b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-inotify new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/services.d/ddclient/run b/root/etc/services.d/ddclient/run deleted file mode 100644 index befa250..0000000 --- a/root/etc/services.d/ddclient/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv bash -exec \ - s6-setuidgid abc /usr/bin/ddclient -foreground -file /ddclient.conf diff --git a/root/etc/services.d/inotify_modify/run b/root/etc/services.d/inotify_modify/run deleted file mode 100644 index a996cfa..0000000 --- a/root/etc/services.d/inotify_modify/run +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/with-contenv bash - -# starting inotify to watch /config/ddclient.conf and restart ddclient if changed. -while inotifywait -e modify /config/ddclient.conf; do - cp /config/ddclient.conf /ddclient.conf - chown abc:abc /ddclient.conf - chmod 600 /ddclient.conf - s6-svc -h /var/run/s6/services/ddclient - echo "ddclient has been restarted" -done