diff --git a/root/app/update.sh b/root/app/update.sh new file mode 100644 index 0000000..f91d2b9 --- /dev/null +++ b/root/app/update.sh @@ -0,0 +1,6 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +cd /app/wg++/bin.net || exit 1 + +/app/dotnet/dotnet "WebGrab+Plus.dll" "/config" diff --git a/root/defaults/update.sh b/root/defaults/update.sh deleted file mode 100755 index e09c183..0000000 --- a/root/defaults/update.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -cd /app/wg++/bin.net || exit - -/app/dotnet/dotnet "WebGrab+Plus.dll" "/config" - -exit 0 diff --git a/root/defaults/wg3-cron b/root/defaults/wg3-cron deleted file mode 100644 index b73f28f..0000000 --- a/root/defaults/wg3-cron +++ /dev/null @@ -1 +0,0 @@ -2 3 * * * /bin/bash /defaults/update.sh diff --git a/root/etc/crontabs/abc b/root/etc/crontabs/abc new file mode 100644 index 0000000..26201a6 --- /dev/null +++ b/root/etc/crontabs/abc @@ -0,0 +1,2 @@ +# min hour day month weekday command +2 3 * * * /app/update.sh 2>&1 diff --git a/root/etc/s6-overlay/s6-rc.d/init-webgrabplus-config/run b/root/etc/s6-overlay/s6-rc.d/init-webgrabplus-config/run index 38cf0a0..95a00e3 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-webgrabplus-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-webgrabplus-config/run @@ -1,6 +1,11 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash +mkdir -p \ + /app/wg++/bin.net/WebGrab+Plus \ + /config/License +ln -sf /config/License /app/wg++/bin.net/WebGrab+Plus + # copy config if [[ ! -e /config/WebGrab++.config.xml ]]; then cp /defaults/WebGrab++.config.xml /config/ @@ -10,20 +15,6 @@ if [[ ! -e /config/siteini.pack ]]; then cp -R /defaults/ini/siteini.pack /config/ fi -# warn user about changing name for crontab file -echo "******** Please use the file wg3-cron to adjust the scheduled time for running WebGrab++. wg-cron can now be deleted. ********" - -# add cron file for running webgrab+plus -if [[ ! -e /config/wg3-cron ]]; then - cp /defaults/wg3-cron /config/wg3-cron -fi - -crontab -u abc /config/wg3-cron - -mkdir -p /app/wg++/bin.net/WebGrab+Plus -mkdir -p /config/License -ln -sf /config/License /app/wg++/bin.net/WebGrab+Plus - # permissions lsiown -R abc:abc \ /app \ diff --git a/root/etc/s6-overlay/s6-rc.d/svc-cron/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-cron/dependencies.d/init-services deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-cron/run b/root/etc/s6-overlay/s6-rc.d/svc-cron/run deleted file mode 100755 index 67c11bb..0000000 --- a/root/etc/s6-overlay/s6-rc.d/svc-cron/run +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/with-contenv bash -# shellcheck shell=bash - -exec /usr/sbin/crond -f -L 1 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-cron/type b/root/etc/s6-overlay/s6-rc.d/svc-cron/type deleted file mode 100644 index 5883cff..0000000 --- a/root/etc/s6-overlay/s6-rc.d/svc-cron/type +++ /dev/null @@ -1 +0,0 @@ -longrun diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-cron b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-cron deleted file mode 100644 index e69de29..0000000