Merge pull request #1860 from m-breitbach/fix/previews-auto-bug

Fix bug in nc-previews-auto.sh
This commit is contained in:
Tobias Knöppler 2024-09-07 12:49:47 +02:00 committed by GitHub
commit dd5a00f9e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -23,8 +23,8 @@ configure()
grep -qP "^\d+$" <<<"$RUNTIME" || { echo "Invalid RUNTIME value $RUNTIME"; return 1; }
RUNTIME=$((RUNTIME*60))
echo "0 2 * * * root /usr/local/bin/nc-previews" > /etc/cron.d/ncp-previews-auto
chmod 644 /etc/cron.d/ncp-previews-auto
echo "0 2 * * * root /usr/local/bin/nc-previews" > /etc/cron.d/nc-previews-auto
chmod 644 /etc/cron.d/nc-previews-auto
cat > /usr/local/bin/nc-previews <<EOF
#!/bin/bash

View File

@ -2,3 +2,5 @@
apt-get update
apt-get install -y --no-install-recommends logrotate
[ -f /etc/cron.d/ncp-previews-auto ] && mv /etc/cron.d/ncp-previews-auto /etc/cron.d/nc-previews-auto