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/Dockerfile b/Dockerfile index c663682..125363f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.14 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17 # set version label ARG BUILD_DATE @@ -7,30 +9,34 @@ ARG DISKOVER_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="alex-phillips" +# environment settings +ENV DISKOVERDIR=/config/diskover.conf.d/diskover/ + RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ build-base \ - gcc \ - py3-pip \ - python3-dev \ + cargo \ composer \ - curl \ git \ - jq \ nodejs \ - npm && \ + npm \ + python3-dev && \ echo "**** install runtime packages ****" && \ - apk add --no-cache \ + apk add --no-cache \ libldap \ ncurses \ - php7-curl \ - php7-ldap \ - php7-sqlite3 \ + php81-curl \ + php81-ldap \ + php81-sqlite3 \ py3-requests \ py3-urllib3 \ py3-xxhash \ python3 && \ + echo "**** configure php-fpm to pass env vars ****" && \ + sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php81/php-fpm.d/www.conf && \ + grep -qxF 'clear_env = no' /etc/php81/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php81/php-fpm.d/www.conf && \ + echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php81/php-fpm.conf && \ echo "**** install diskover ****" && \ if [ -z ${DISKOVER_RELEASE+x} ]; then \ DISKOVER_RELEASE=$(curl -sX GET "https://api.github.com/repos/diskoverdata/diskover-community/releases" \ @@ -43,17 +49,22 @@ RUN \ /tmp/diskover.tar.gz -C \ /app/ --strip-components=1 && \ cd /app/diskover && \ - pip3 install --no-cache-dir -r requirements.txt && \ - sed -i 's@;clear_env = no@clear_env = no@' "/etc/php7/php-fpm.d/www.conf" && \ - echo "**** overlay-fs workaround ****" && \ - mv /app/diskover /app/diskover-tmp && \ - mv /app/diskover-web /app/diskover-web-tmp && \ + python3 -m ensurepip && \ + pip3 install -U --no-cache-dir \ + pip \ + wheel && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r requirements.txt && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ rm -rf \ /tmp/* \ - /root/.cache + $HOME/.cache \ + $HOME/.cargo # add local files -COPY ./root/ / +COPY root/ / + +# ports and volumes +EXPOSE 80 443 +VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 96d0e49..efda9bd 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.14 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.17 # set version label ARG BUILD_DATE @@ -7,30 +9,34 @@ ARG DISKOVER_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="alex-phillips" +# environment settings +ENV DISKOVERDIR=/config/diskover.conf.d/diskover/ + RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ build-base \ - gcc \ - py3-pip \ - python3-dev \ + cargo \ composer \ - curl \ git \ - jq \ nodejs \ - npm && \ + npm \ + python3-dev && \ echo "**** install runtime packages ****" && \ - apk add --no-cache \ + apk add --no-cache \ libldap \ ncurses \ - php7-curl \ - php7-ldap \ - php7-sqlite3 \ + php81-curl \ + php81-ldap \ + php81-sqlite3 \ py3-requests \ py3-urllib3 \ py3-xxhash \ python3 && \ + echo "**** configure php-fpm to pass env vars ****" && \ + sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php81/php-fpm.d/www.conf && \ + grep -qxF 'clear_env = no' /etc/php81/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php81/php-fpm.d/www.conf && \ + echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php81/php-fpm.conf && \ echo "**** install diskover ****" && \ if [ -z ${DISKOVER_RELEASE+x} ]; then \ DISKOVER_RELEASE=$(curl -sX GET "https://api.github.com/repos/diskoverdata/diskover-community/releases" \ @@ -43,17 +49,22 @@ RUN \ /tmp/diskover.tar.gz -C \ /app/ --strip-components=1 && \ cd /app/diskover && \ - pip3 install --no-cache-dir -r requirements.txt && \ - sed -i 's@;clear_env = no@clear_env = no@' "/etc/php7/php-fpm.d/www.conf" && \ - echo "**** overlay-fs workaround ****" && \ - mv /app/diskover /app/diskover-tmp && \ - mv /app/diskover-web /app/diskover-web-tmp && \ + python3 -m ensurepip && \ + pip3 install -U --no-cache-dir \ + pip \ + wheel && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r requirements.txt && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ rm -rf \ /tmp/* \ - /root/.cache + $HOME/.cache \ + $HOME/.cargo # add local files -COPY ./root/ / +COPY root/ / + +# ports and volumes +EXPOSE 80 443 +VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf index ce3c055..47dcf48 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.14 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.17 # set version label ARG BUILD_DATE @@ -7,30 +9,34 @@ ARG DISKOVER_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="alex-phillips" +# environment settings +ENV DISKOVERDIR=/config/diskover.conf.d/diskover/ + RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ build-base \ - gcc \ - py3-pip \ - python3-dev \ + cargo \ composer \ - curl \ git \ - jq \ nodejs \ - npm && \ + npm \ + python3-dev && \ echo "**** install runtime packages ****" && \ - apk add --no-cache \ + apk add --no-cache \ libldap \ ncurses \ - php7-curl \ - php7-ldap \ - php7-sqlite3 \ + php81-curl \ + php81-ldap \ + php81-sqlite3 \ py3-requests \ py3-urllib3 \ py3-xxhash \ python3 && \ + echo "**** configure php-fpm to pass env vars ****" && \ + sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php81/php-fpm.d/www.conf && \ + grep -qxF 'clear_env = no' /etc/php81/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php81/php-fpm.d/www.conf && \ + echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php81/php-fpm.conf && \ echo "**** install diskover ****" && \ if [ -z ${DISKOVER_RELEASE+x} ]; then \ DISKOVER_RELEASE=$(curl -sX GET "https://api.github.com/repos/diskoverdata/diskover-community/releases" \ @@ -43,17 +49,22 @@ RUN \ /tmp/diskover.tar.gz -C \ /app/ --strip-components=1 && \ cd /app/diskover && \ - pip3 install --no-cache-dir -r requirements.txt && \ - sed -i 's@;clear_env = no@clear_env = no@' "/etc/php7/php-fpm.d/www.conf" && \ - echo "**** overlay-fs workaround ****" && \ - mv /app/diskover /app/diskover-tmp && \ - mv /app/diskover-web /app/diskover-web-tmp && \ + python3 -m ensurepip && \ + pip3 install -U --no-cache-dir \ + pip \ + wheel && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r requirements.txt && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ rm -rf \ /tmp/* \ - /root/.cache + $HOME/.cache \ + $HOME/.cargo # add local files -COPY ./root/ / +COPY root/ / + +# ports and volumes +EXPOSE 80 443 +VOLUME /config diff --git a/Jenkinsfile b/Jenkinsfile index 558dcfc..5de5287 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,12 +30,12 @@ pipeline { DIST_IMAGE = 'alpine' MULTIARCH='true' CI='true' - CI_WEB='false' - CI_PORT='' - CI_SSL='' + CI_WEB='true' + CI_PORT='80' + CI_SSL='false' CI_DELAY='120' CI_DOCKERENV='TZ=US/Pacific' - CI_AUTH='' + CI_AUTH='user:password' CI_WEBPATH='' } stages { diff --git a/README.md b/README.md index 1fd1a8c..41b30bd 100644 --- a/README.md +++ b/README.md @@ -271,6 +271,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **20.08.22:** - Rebasing to alpine 3.17 with php8.1. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)). * **25.02.22:** - Add php7-sqlite3 to support rc4 release. * **03.11.21:** - Added more support for potential config files. * **31.10.21:** - Added xpack.security variable to ElasticSearch; added instructions to edit Constants.php in diskover; corrected command needed to manually generate an index in diskover diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 262a813..bdb8232 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -20,10 +20,10 @@ repo_vars: - DIST_IMAGE = 'alpine' - MULTIARCH='true' - CI='true' - - CI_WEB='false' - - CI_PORT='' - - CI_SSL='' + - CI_WEB='true' + - CI_PORT='80' + - CI_SSL='false' - CI_DELAY='120' - CI_DOCKERENV='TZ=US/Pacific' - - CI_AUTH='' + - CI_AUTH='user:password' - CI_WEBPATH='' diff --git a/readme-vars.yml b/readme-vars.yml index 343ca8e..9151ee4 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -94,6 +94,7 @@ app_setup_block: | # changelog changelogs: + - { date: "20.08.22:", desc: "Rebasing to alpine 3.17 with php8.1. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base))." } - { date: "25.02.22:", desc: "Add php7-sqlite3 to support rc4 release." } - { date: "03.11.21:", desc: "Added more support for potential config files." } - { date: "31.10.21:", desc: "Added xpack.security variable to ElasticSearch; added instructions to edit Constants.php in diskover; corrected command needed to manually generate an index in diskover" } diff --git a/root/defaults/crontabs/abc b/root/defaults/crontabs/abc deleted file mode 100644 index 50da62f..0000000 --- a/root/defaults/crontabs/abc +++ /dev/null @@ -1 +0,0 @@ -#0 3 * * * python3 /app/diskover/diskover.py /data diff --git a/root/defaults/default b/root/defaults/default deleted file mode 100644 index 75f24f5..0000000 --- a/root/defaults/default +++ /dev/null @@ -1,38 +0,0 @@ -server { - listen 80 default_server; - - listen 443 ssl; - - root /app/www/public; - index index.php index.html index.htm; - - server_name _; - - ssl_certificate /config/keys/cert.crt; - ssl_certificate_key /config/keys/cert.key; - - client_max_body_size 0; - - location / { - try_files $uri $uri/ /index.php?$query_string; - } - -# # unless the request is for a valid file (image, js, css, etc.), send to bootstrap -# if (!-e $request_filename) -# { -# rewrite ^/(.*)$ /index.php?/$1 last; -# break; -# } - - location ~ \.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass 127.0.0.1:9000; - fastcgi_index index.php; - include /etc/nginx/fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - fastcgi_read_timeout 300; - } -} diff --git a/root/defaults/nginx/site-confs/default.conf.sample b/root/defaults/nginx/site-confs/default.conf.sample new file mode 100644 index 0000000..3b31012 --- /dev/null +++ b/root/defaults/nginx/site-confs/default.conf.sample @@ -0,0 +1,34 @@ +## Version 2023/01/23 - Changelog: https://github.com/linuxserver/docker-diskover/commits/master/root/defaults/nginx/site-confs/default.conf.sample + +server { + listen 80 default_server; + listen [::]:80 default_server; + + listen 443 ssl http2 default_server; + listen [::]:443 ssl http2 default_server; + + server_name _; + + root /app/diskover-web/public; + index index.html index.htm index.php; + + location / { + # enable for basic auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + try_files $uri $uri/ /index.php$is_args$args; + } + + location ~ ^(.+\.php)(.*)$ { + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + + # deny access to .htaccess/.htpasswd files + location ~ /\.ht { + deny all; + } +} diff --git a/root/etc/cont-init.d/50-permissions b/root/etc/cont-init.d/50-permissions deleted file mode 100644 index 0b16751..0000000 --- a/root/etc/cont-init.d/50-permissions +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/with-contenv bash - -if [ -d "/app/diskover-tmp" ]; then - echo "New container detected. Setting up app folder and fixing permissions." - mv /app/diskover-tmp /app/diskover -fi - - -if [ -d "/app/diskover-web-tmp" ]; then - mv /app/diskover-web-tmp /app/www -fi - -chown -R abc:abc /app diff --git a/root/etc/cont-init.d/51-config-diskover b/root/etc/cont-init.d/51-config-diskover deleted file mode 100644 index 2111fb6..0000000 --- a/root/etc/cont-init.d/51-config-diskover +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/with-contenv bash - -# copy config -if [[ ! -e /config/diskover.conf.d ]]; then - cp -r /app/diskover/configs_sample /config/diskover.conf.d -fi - -ls /config/diskover.conf.d | \ - xargs -I {} \ - ln -sf /config/diskover.conf.d/{} /etc/{} - -# install crontab -[[ ! -e "/config/crontab" ]] && \ - cp /defaults/crontabs/abc /config/crontab - -crontab -u abc /config/crontab - -chown -R abc:abc /config diff --git a/root/etc/cont-init.d/52-config-diskover-web b/root/etc/cont-init.d/52-config-diskover-web deleted file mode 100644 index 6f0e362..0000000 --- a/root/etc/cont-init.d/52-config-diskover-web +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/with-contenv bash - -mkdir -p \ - /config/diskover-web.conf.d - -# copy over sample config files -cd /app/www/public -for file in *.sample; do - dest=${file%.sample} - - [[ ! -e "/config/diskover-web.conf.d/$dest" ]] && \ - cp /app/www/public/$file /config/diskover-web.conf.d/$dest - - ln -sf /config/diskover-web.conf.d/$dest /app/www/public/$dest -done - -cd /app/www/public/tasks -for file in *.sample; do - dest=${file%.sample} - - [[ ! -e "/config/diskover-web.conf.d/$dest" ]] && \ - cp /app/www/public/tasks/$file /config/diskover-web.conf.d/$dest - - ln -sf /config/diskover-web.conf.d/$dest /app/www/public/tasks/$dest -done - -if [[ ! -e "/config/diskoverdb.sqlite3" ]]; then - touch /config/diskoverdb.sqlite3 -fi -ln -sf /config/diskoverdb.sqlite3 /app/www/diskoverdb.sqlite3 - -# copy and set variables in Constants.php -if [[ ! -e "/config/diskover-web.conf.d/Constants.php" ]]; then - cp /app/www/src/diskover/Constants.php.sample /config/diskover-web.conf.d/Constants.php -fi - -ln -sf /config/diskover-web.conf.d/Constants.php /app/www/src/diskover/Constants.php - -chown -R abc:abc /config diff --git a/root/etc/crontabs/abc b/root/etc/crontabs/abc new file mode 100644 index 0000000..2d7869c --- /dev/null +++ b/root/etc/crontabs/abc @@ -0,0 +1 @@ +#0 3 * * * python3 /app/diskover/diskover.py -i diskover-my_index_name /data diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-diskover-config b/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-diskover-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/dependencies.d/init-eol-check b/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/dependencies.d/init-eol-check new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run b/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run new file mode 100755 index 0000000..797a077 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run @@ -0,0 +1,21 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +# make crontab config folder +mkdir -p \ + /config/crontabs + +# if abc crontabs do not exist in config +# copy abc crontab from system +if [[ ! -f /config/crontabs/abc ]] && crontab -l -u abc; then + crontab -l -u abc >/config/crontabs/abc +fi + +# if abc crontabs still do not exist in config (were not copied from system) +# copy abc crontab from included defaults +if [[ ! -f /config/crontabs/abc ]]; then + cp /etc/crontabs/abc /config/crontabs/ +fi + +# import user crontabs +crontab -u abc /config/crontabs/abc diff --git a/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/type b/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/up b/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/up new file mode 100644 index 0000000..006d814 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-crontabs-config/run diff --git a/root/etc/s6-overlay/s6-rc.d/init-diskover-config/dependencies.d/init-crontabs-config b/root/etc/s6-overlay/s6-rc.d/init-diskover-config/dependencies.d/init-crontabs-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-diskover-config/run b/root/etc/s6-overlay/s6-rc.d/init-diskover-config/run new file mode 100755 index 0000000..5b99b12 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-diskover-config/run @@ -0,0 +1,49 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +# copy config +if [[ ! -e /config/diskover.conf.d ]]; then + cp -r /app/diskover/configs_sample /config/diskover.conf.d +fi + +# setup web +mkdir -p \ + /config/diskover-web.conf.d + +# copy over sample config files +if [[ -d /app/diskover-web/public ]]; then + cd /app/diskover-web/public || exit 1 + for file in *.sample; do + dest=${file%.sample} + if [[ ! -e "/config/diskover-web.conf.d/$dest" ]]; then + cp "/app/diskover-web/public/$file" "/config/diskover-web.conf.d/$dest" + fi + ln -sf "/config/diskover-web.conf.d/$dest" "/app/diskover-web/public/$dest" + done +fi + +if [[ -d /app/diskover-web/public/tasks ]]; then + cd /app/diskover-web/public/tasks || exit 1 + for file in *.sample; do + dest=${file%.sample} + if [[ ! -e "/config/diskover-web.conf.d/$dest" ]]; then + cp "/app/diskover-web/public/tasks/$file" "/config/diskover-web.conf.d/$dest" + fi + ln -sf "/config/diskover-web.conf.d/$dest" "/app/diskover-web/public/tasks/$dest" + done +fi + +# touch db +if [[ ! -e "/config/diskoverdb.sqlite3" ]]; then + touch /config/diskoverdb.sqlite3 +fi +ln -sf /config/diskoverdb.sqlite3 /app/diskover-web/diskoverdb.sqlite3 + +# copy and set variables in Constants.php +if [[ ! -e "/config/diskover-web.conf.d/Constants.php" ]]; then + cp /app/diskover-web/src/diskover/Constants.php.sample /config/diskover-web.conf.d/Constants.php +fi + +ln -sf /config/diskover-web.conf.d/Constants.php /app/diskover-web/src/diskover/Constants.php + +lsiown -R abc:abc /config diff --git a/root/etc/s6-overlay/s6-rc.d/init-diskover-config/type b/root/etc/s6-overlay/s6-rc.d/init-diskover-config/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-diskover-config/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-diskover-config/up b/root/etc/s6-overlay/s6-rc.d/init-diskover-config/up new file mode 100644 index 0000000..49135bb --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-diskover-config/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-diskover-config/run diff --git a/root/etc/s6-overlay/s6-rc.d/init-eol-check/dependencies.d/init-nginx-end b/root/etc/s6-overlay/s6-rc.d/init-eol-check/dependencies.d/init-nginx-end new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/cont-init.d/49-eol-check b/root/etc/s6-overlay/s6-rc.d/init-eol-check/run old mode 100644 new mode 100755 similarity index 96% rename from root/etc/cont-init.d/49-eol-check rename to root/etc/s6-overlay/s6-rc.d/init-eol-check/run index d74a14c..1000959 --- a/root/etc/cont-init.d/49-eol-check +++ b/root/etc/s6-overlay/s6-rc.d/init-eol-check/run @@ -1,4 +1,5 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash if [ -f "/config/diskover.cfg" ]; then echo ' @@ -23,8 +24,7 @@ if [ -f "/config/diskover.cfg" ]; then * * ****************************************************** ******************************************************' - while true - do + while true; do sleep 3600 done fi diff --git a/root/etc/s6-overlay/s6-rc.d/init-eol-check/type b/root/etc/s6-overlay/s6-rc.d/init-eol-check/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-eol-check/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-eol-check/up b/root/etc/s6-overlay/s6-rc.d/init-eol-check/up new file mode 100644 index 0000000..c809c4d --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-eol-check/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-eol-check/run diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-crontabs-config b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-crontabs-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-diskover-config b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-diskover-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-eol-check b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-eol-check new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/services.d/cron/run b/root/etc/services.d/cron/run deleted file mode 100644 index 29cd322..0000000 --- a/root/etc/services.d/cron/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv bash - -exec /usr/sbin/crond -f -S -l 5 -c /etc/crontabs