summaryrefslogtreecommitdiff
path: root/templates/system/package/auto-sync/node.def
blob: 277a5fe4b10d1463567c14b7ba25f3b2819bbc17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# this will set APT::Periodic::Update-Package-Lists in /etc/apt/apt.conf
# apt.conf is in turn read by the apt cron file loacted in /etc/cron.daily/apt
# the /etc/crontab file must have the daily line for daily to be run
type: u32
default: 1
help: "Update the the repository cache every n days. 0 disables auto-update."
syntax: $(@) >= 0 && $(@) < 32 ; "auto-sync must be between 0 and 32 days"
update: "sudo sh -c \"touch /etc/apt/apt.conf && \
sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf && \
echo \\\"APT::Periodic::Update-Package-Lists \\\"$(@)\\\";\\\" >> /etc/apt/apt.conf\" "
delete: "sudo sh -c \"touch /etc/apt/apt.conf && \
sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf\" "