Merge pull request #63 from linuxserver/standard-cron

standard cron
This commit is contained in:
Eric Nemchik 2023-11-18 19:11:02 -06:00 committed by GitHub
commit a742267bc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 13 additions and 27 deletions

6
root/app/update.sh Normal file
View File

@ -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"

View File

@ -1,7 +0,0 @@
#!/bin/bash
cd /app/wg++/bin.net || exit
/app/dotnet/dotnet "WebGrab+Plus.dll" "/config"
exit 0

View File

@ -1 +0,0 @@
2 3 * * * /bin/bash /defaults/update.sh

2
root/etc/crontabs/abc Normal file
View File

@ -0,0 +1,2 @@
# min hour day month weekday command
2 3 * * * /app/update.sh 2>&1

View File

@ -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 \

View File

@ -1,4 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
exec /usr/sbin/crond -f -L 1

View File

@ -1 +0,0 @@
longrun