0

I'm deploying webmin across many servers using Terraform & cloud-init. I want to enable "Scheduled Upgrades" in the "Software Package Updates" module during setup by using a config file template. I can successfully configure the action and reporting email by including the following in /etc/webmin/package-updates/config :

sched_email=sys.admin@... sched_action=2 

However, there seems to be no entry for the schedule interval selection and enabling it. What other config file (if any) is this info stored in?

I've also tried using the webmin CLI but couldn't figure out the correct option name:

# webmin set-config -m package-updates -o schedule -value 1 # Error: Option 'schedule' is unknown in module package-updates 

1 Answer 1

0

Figured it out: when saving the GUI settings, it creates a cron job and update script in the module directory. To enable via command line:

# echo "0 15 * * * /etc/webmin/package-updates/update.pl" >> /var/spool/cron/root # touch /etc/webmin/package-updates/update.pl # chmod a+x /etc/webmin/package-updates/update.pl 

Then add the following content to update.pl:

#!/usr/bin/perl open(CONF, "</etc/webmin/miniserv.conf") || die "Failed to open /etc/webmin/miniserv.conf : $!"; while(<CONF>) { $root = $1 if (/^root=(.*)/); } close(CONF); $root || die "No root= line found in /etc/webmin/miniserv.conf"; $ENV{'PERLLIB'} = "$root"; $ENV{'WEBMIN_CONFIG'} = "/etc/webmin"; $ENV{'WEBMIN_VAR'} = "/var/webmin"; delete($ENV{'MINISERV_CONFIG'}); chdir("$root/package-updates"); exec("$root/package-updates/update.pl", @ARGV) || die "Failed to run $root/package-updates/update.pl : $!"; 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.