summaryrefslogtreecommitdiff
path: root/templates/system/package/auto-sync/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system/package/auto-sync/node.def')
-rw-r--r--templates/system/package/auto-sync/node.def12
1 files changed, 9 insertions, 3 deletions
diff --git a/templates/system/package/auto-sync/node.def b/templates/system/package/auto-sync/node.def
index 3d14ab04..299b43bf 100644
--- a/templates/system/package/auto-sync/node.def
+++ b/templates/system/package/auto-sync/node.def
@@ -1,12 +1,18 @@
# 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: Set to update the the repository cache every n days (0 disables auto-update)
+
syntax:expression: $VAR(@) >= 0 && $VAR(@) < 32 ; "auto-sync must be between 0 and 32 days"
+
update:expression: "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 \\\"$VAR(@)\\\";\\\" >> /etc/apt/apt.conf\" "
+ sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf && \
+ echo \\\"APT::Periodic::Update-Package-Lists \\\"$VAR(@)\\\";\\\" >> /etc/apt/apt.conf\" "
+
delete:expression: "sudo sh -c \"touch /etc/apt/apt.conf && \
-sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf\" "
+ sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf\" "