# Configuration for /etc/init.d/earlyoom

{% if earlyoom.mem_min_percent is defined %}
# Set available memory minimum to PERCENT of total (default 10 %). [-m]
mem_min_percent={{ earlyoom.mem_min_percent }}

{% endif %}
{% if earlyoom.swap_min_percent is defined %}
# Set free swap minimum to PERCENT of total (default 10 %). [-s]
# Note: Both memory and swap must be below minimum for earlyoom to act.
swap_min_percent={{ earlyoom.swap_min_percent }}

{% endif %}
{% if earlyoom.mem_min_size is defined %}
# Set available memory minimum to SIZE[,KILL_SIZE] KiB. [-M]
mem_min_size={{ earlyoom.mem_min_size }}

{% endif %}
{% if earlyoom.swap_min_size is defined %}
# Set free swap minimum to SIZE[,KILL_SIZE] KiB. [-S]
swap_min_size={{ swap_min_size }}

{% endif %}
{% if earlyoom.set_priority %}
# Set niceness of earlyoom to -20 and oom_score_adj to -100? yes/no [-p]
set_priority=yes

{% endif%}
supervisor="supervise-daemon"
