Commit 9ec5b6b4 authored by Ted Trask's avatar Ted Trask

Chown /etc/fetchmailrc to user fetchmail for alpine 1.9

parent 3e7a40ed
......@@ -279,6 +279,7 @@ local function writeentryline(entrystruct, entryline)
fs.write_file(configfile, string.gsub(table.concat(lines), "\n+$", ""))
posix.chmod(configfile, "rw-------")
posix.chown(configfile, posix.getpasswd("fetchmail", "uid") or 0)
config = nil
end
......@@ -396,6 +397,7 @@ function update_filecontent(filedetails)
-- FIXME - validation
local retval = modelfunctions.setfiledetails(filedetails, {configfile})
posix.chmod(configfile, "rw-------")
posix.chown(configfile, posix.getpasswd("fetchmail", "uid") or 0)
config = nil
return retval
end
......@@ -450,6 +452,7 @@ function updateconfig(conf)
fs.write_file(configfile, table.concat(lines))
posix.chmod(configfile, "rw-------")
posix.chown(configfile, posix.getpasswd("fetchmail", "uid") or 0)
config = nil
fs.write_file(confdfile, format.update_ini_file(fs.read_file(confdfile) or "", "", "polling_period", '"'..conf.value.interval.value..'"'))
......
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