2024-02-24 14:15:57 +01:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
if [ ! -z "$CRON_EXPRESSION" ]; then
|
2024-08-02 19:35:31 +02:00
|
|
|
CRONTAB="$CRON_EXPRESSION UNATTENDED=1 /script/immich_auto_album.sh > /proc/1/fd/1 2>/proc/1/fd/2"
|
2024-02-26 21:59:17 +01:00
|
|
|
# Reset crontab
|
|
|
|
crontab -r
|
|
|
|
(crontab -l 2>/dev/null; echo "$CRONTAB") | crontab -
|
|
|
|
|
2024-02-24 14:15:57 +01:00
|
|
|
# Make environment variables accessible to cron
|
|
|
|
printenv > /etc/environment
|
2024-02-26 21:59:17 +01:00
|
|
|
fi
|