diff --git a/whoogle/Dockerfile b/whoogle/Dockerfile index 438f0ed6a..cb638b592 100644 --- a/whoogle/Dockerfile +++ b/whoogle/Dockerfile @@ -45,6 +45,10 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +RUN chmod 777 /entrypoint.sh +ENTRYPOINT [ "/usr/bin/env" ] +CMD [ "/entrypoint.sh" ] + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/whoogle/rootfs/entrypoint.sh b/whoogle/rootfs/entrypoint.sh new file mode 100644 index 000000000..a948f3bbb --- /dev/null +++ b/whoogle/rootfs/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +echo "Starting..." + +#################### +# Starting scripts # +#################### + +for SCRIPTS in /scripts/*; do + [ -e "$SCRIPTS" ] || continue + echo "$SCRIPTS: executing" + chown $(id -u):$(id -g) $SCRIPTS + chmod a+x $SCRIPTS + sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' $SCRIPTS || true + /./$SCRIPTS || echo "$SCRIPTS: exiting $?" +done diff --git a/whoogle/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/whoogle/rootfs/scripts/00-aaa_dockerfile_backup.sh similarity index 100% rename from whoogle/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh rename to whoogle/rootfs/scripts/00-aaa_dockerfile_backup.sh diff --git a/whoogle/rootfs/etc/cont-init.d/00-banner.sh b/whoogle/rootfs/scripts/00-banner.sh similarity index 100% rename from whoogle/rootfs/etc/cont-init.d/00-banner.sh rename to whoogle/rootfs/scripts/00-banner.sh diff --git a/whoogle/rootfs/etc/cont-init.d/90-config_yaml.sh b/whoogle/rootfs/scripts/90-config_yaml.sh similarity index 100% rename from whoogle/rootfs/etc/cont-init.d/90-config_yaml.sh rename to whoogle/rootfs/scripts/90-config_yaml.sh diff --git a/whoogle/rootfs/scripts/99-run.sh b/whoogle/rootfs/scripts/99-run.sh new file mode 100644 index 000000000..4a315297d --- /dev/null +++ b/whoogle/rootfs/scripts/99-run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +exec misc/tor/start-tor.sh & +./run