I have installed memached on Ubuntu 16.04 and configured in /lib/systemd/system/memcached.service
system service to use a custom config /etc/memcached_server1.conf
file
$ cat /lib/systemd/system/memcached.service
[Unit]
Description=memcached daemon
After=network.target
[Service]
ExecStart=/usr/share/memcached/scripts/systemd-memcached-wrapper /etc/memcached_server1.conf
[Install]
WantedBy=multi-user.target
As you can see I'm using custom /etc/memcached_server1.conf
file in the ExecStart
section
After a while or because of some unknown action, /lib/systemd/system/memcached.service
file resets to default /etc/memcached.conf
config file ...
$ cat /lib/systemd/system/memcached.service
[Unit]
Description=memcached daemon
After=network.target
[Service]
ExecStart=/usr/share/memcached/scripts/systemd-memcached-wrapper /etc/memcached.conf
[Install]
WantedBy=multi-user.target
To reproduce replacement I tried server reboot, systemctl restart memcached, systemctl daemon-reload but they are all useless. Nothing changes config to default one.
Question: What can cause replacement of /lib/systemd/system/memcached.service
to default (after installation) one?
I don't found any solution here and as best workaround decided to make
/lib/systemd/system/memcached.service
none writable for anyone !