Disable oom killing entirely to minimize the hassle comes from
lxcfs exiting unexpectedly, e.g. the mountpoint got lost.
Signed-off-by: Teng Hu <huteng.ht@bytedance.com>
Documentation=man:lxcfs(1)
[Service]
+OOMScoreAdjust=-1000
ExecStart=/usr/bin/lxcfs {{LXCFSTARGETDIR}}
KillMode=process
Restart=on-failure
NAME=lxcfs
DESC="FUSE filesystem for LXC"
PIDFILE=/var/run/lxcfs.pid
+OOM_SCORE_ADJ="-1000"
. /lib/lsb/init-functions
echo -n "Starting $DESC: "
if start-stop-daemon ${START} -- /var/lib/lxcfs >/dev/null 2>&1 ; then
echo "${NAME}."
+ echo ${OOM_SCORE_ADJ} > /proc/`cat ${PIDFILE}`/oom_score_adj
else
if start-stop-daemon --test ${START} >/dev/null 2>&1; then
echo "(failed)."
start on starting lxc or starting lxd or runlevel [2345]
stop on runlevel [06]
+oom score -1000
respawn
pre-start script