Commit a68bc52c authored by Dietmar Maurer's avatar Dietmar Maurer

/etc/cron.d/pveupdate: always write file in postinstall

so that we can change times in future
parent d6b52850
include ../defines.mk include ../defines.mk
SUBDIRS = init.d cron ocf test SUBDIRS = init.d ocf test
SERVICES = pvestatd pveproxy SERVICES = pvestatd pveproxy
CLITOOLS = vzdump pvesubscription CLITOOLS = vzdump pvesubscription
......
...@@ -50,13 +50,13 @@ case "$1" in ...@@ -50,13 +50,13 @@ case "$1" in
fi fi
# create new daily randomize update cronjob if not exist # create new daily randomize update cronjob if not exist
if !(test -e /etc/cron.d/pveupdate); then
MIN="$(shuf -i 0-59 -n 1)" MIN="$(shuf -i 0-59 -n 1)"
HOUR="$(shuf -i 6-10 -n 1)" HOUR="$(shuf -i 6-10 -n 1)"
echo "Create cron job for daily update" echo "Create cron job for daily update"
printf " ${MIN} ${HOUR} * * * root /usr/bin/pveupdate\n\n" > /etc/cron.d/pveupdate cat <<EOF >/etc/cron.d/pveupdate
fi # automatically generated - do not edit
${MIN} ${HOUR} * * * root /usr/bin/pveupdate
EOF
if test ! -e /var/lib/pve-manager/apl-info/download.proxmox.com; then if test ! -e /var/lib/pve-manager/apl-info/download.proxmox.com; then
mkdir -p /var/lib/pve-manager/apl-info mkdir -p /var/lib/pve-manager/apl-info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment