mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-17 21:26:19 +00:00
Replace alpine atd with crond
This commit is contained in:
parent
1db05f3a8a
commit
8191d6f2d1
2 changed files with 34 additions and 24 deletions
|
|
@ -28,7 +28,7 @@ RUN printf '%s\n' "https://dl-cdn.alpinelinux.org/alpine/${apkrepo:-latest-stabl
|
||||||
&& apk update \
|
&& apk update \
|
||||||
&& apk upgrade \
|
&& apk upgrade \
|
||||||
&& apk add --no-cache \
|
&& apk add --no-cache \
|
||||||
bash bash-completion ncurses at rsync grep coreutils \
|
bash bash-completion ncurses rsync grep coreutils \
|
||||||
nginx \
|
nginx \
|
||||||
mariadb mariadb-client mariadb-server-utils \
|
mariadb mariadb-client mariadb-server-utils \
|
||||||
ca-certificates acl \
|
ca-certificates acl \
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,38 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# Crond
|
||||||
|
if [ ! -d /etc/periodic/ ]
|
||||||
|
then
|
||||||
|
echo "Cron not detected, exiting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ln -s /usr/share/webapps/roundcube/bin/cleandb.sh /etc/periodic/daily/roundcube-cleandb
|
||||||
|
ln -s /usr/local/bin/postwhite/postwhite /etc/periodic/daily/postwhite
|
||||||
|
ln -s /usr/local/bin/postwhite/scrape_yahoo /etc/periodic/weekly/postwhite_scrape_yahoo
|
||||||
|
crond -b -l 0 -L /var/log/mail/cron.log
|
||||||
|
|
||||||
# Start at daemon
|
# # Start at daemon
|
||||||
atd
|
# atd
|
||||||
|
#
|
||||||
# Roundcube cleanup (daily)
|
# # Roundcube cleanup (daily)
|
||||||
while true
|
# while true
|
||||||
do
|
# do
|
||||||
at -f /usr/share/webapps/roundcube/bin/cleandb.sh midnight
|
# at -f /usr/share/webapps/roundcube/bin/cleandb.sh midnight
|
||||||
sleep 1d
|
# sleep 1d
|
||||||
done &
|
# done &
|
||||||
|
#
|
||||||
# Update Postscreen Whitelists (daily)
|
# # Update Postscreen Whitelists (daily)
|
||||||
while true
|
# while true
|
||||||
do
|
# do
|
||||||
at -f /usr/local/bin/postwhite/postwhite midnight
|
# at -f /usr/local/bin/postwhite/postwhite midnight
|
||||||
sleep 1d
|
# sleep 1d
|
||||||
done &
|
# done &
|
||||||
|
#
|
||||||
# Update Yahoo! IPs for Postscreen Whitelists (weekly)
|
# # Update Yahoo! IPs for Postscreen Whitelists (weekly)
|
||||||
while true
|
# while true
|
||||||
do
|
# do
|
||||||
at -f /usr/local/bin/postwhite/scrape_yahoo midnight sunday
|
# at -f /usr/local/bin/postwhite/scrape_yahoo midnight sunday
|
||||||
sleep 7d
|
# sleep 7d
|
||||||
done &
|
# done &
|
||||||
|
|
||||||
# # Refresh ssl keys daily
|
# # Refresh ssl keys daily
|
||||||
# # https://www.golinuxcloud.com/renew-self-signed-certificate-openssl/
|
# # https://www.golinuxcloud.com/renew-self-signed-certificate-openssl/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue