#
# restart-services configuration file
#
# Here you can categorize your services:
# - can service be restarted any time? -> SV_ALWAYS*
# - is service critical and may be scheduled at a later time? -> SV_CRITICAL*
# - should service always be ignored? -> SV_IGNORE
# - config options below can be one value or regex or a shell array of items
# - if a service matches an expression in more than one of the SV_* options below
#   the following order is applied:
#   - SV_IGNORE (hightest priority)
#   - SV_CRITICAL_WITH_NODEPS
#   - SV_CRITICAL
#   - SV_ALWAYS_RELOAD_ONLY
#   - SV_ALWAYS_WITH_NODEPS
#   - SV_ALWAYS (lowest priority)
#
# so if a service matches SV_CRITICAL_WITH_NODEPS *and* SV_ALWAYS, it will be handled as a critical
# service that needs to be restarted without its dependencies
#
# The configured service names follow these rules:
# - extended regular expressions are supported, but skip '^' and '$'
# - every item may be just service names or regular expressions
# - systemd services can be specified with or without a '.service' suffix
# - there is a well defined priority when a service matches expressions in more than one optionwhen a service matches both, a SV_CRITICAL_* and SV_ALWAYS_*, SV_CRITICAL_*
#   will win
#
# Examples:
# =========
#
# This single expression will always restart the mentioned services if they have been upgraded:
#SV_ALWAYS='(acpid|cronie|haveged|irqbalance|sshd)'
#
# Same as above, but as an array:
#SV_ALWAYS=( acpid cronie haveged irqbalance sshd )
#
# Extend the above configuration by one more service (useful in a split configuration scenario)
#SV_ALWAYS+=( foo )
# Results is:  SV_ALWAYS=( acpid cronie haveged irqbalance sshd foo )
#
# Always restart any service that is not part of a higher priorized service class:
#SV_ALWAYS='.*'
#
##############################################################################
# SERVICE CLASSIFICATION
##############################################################################
#
# Define services that can always be restarted
# Default: SV_ALWAYS=( )
#SV_ALWAYS=( acpid apcupsd atd autofs "(bareos|bacula)-fd" cf-.* cronie haveged irqbalance lldpd monit named ntpd nullmailer opendnssec salt-minion smartd snmpd sshd zabbix-agentd )

# Define services that can always be restarted, but excluding dependencies
# Default: SV_ALWAYS_WITH_NODEPS=( )
#SV_ALWAYS_WITH_NODEPS=( udev ulogd rpc.* rsyslog )

# Define services that must not be restarted without
# the '--critical' option.
# Here you should put services where a restart would
# interrupt a service being offered to your users
# Default: SV_CRITICAL=( )
#SV_CRITICAL=( apache2 clamd "(bareos|bacula)-(sd|dir)" exim .*ftpd lighttpd minidlna mysql nginx openvpn pacemaker postfix postgresql-.* quasselcore salt-master samba unbound )

# Define services that must not be restarted without
# the '--critical' option being specified
# Here you should put services where a restart would
# interrupt a service being offered to your users
# Default: SV_CRITICAL_WITH_NODEPS=( )
#SV_CRITICAL_WITH_NODEPS=()

# Define services than only need to be reloaded instead of restarted
# Default: SV_ALWAYS_RELOAD_ONLY=( )
#SV_ALWAYS_RELOAD_ONLY=( libvirtd )

# Define services that should always be ignored
# Default: SV_IGNORE=( )
#SV_IGNORE=( ntp-client )

##############################################################################
# INITTAB RESPAWN SERVICES
##############################################################################
# Define processes started via inittab that should be killed so that init will
# respawn them
# Default: INITTAB_KILLALL=( )
#INITTAB_KILLALL=( /sbin/agetty )

##############################################################################
# CUSTOM PROCESS MAPPINGS
##############################################################################
# Assign processes to (custom) services manually.
# A match in CUSTOM_PROCESS_MAP takes precedence over any automatically found
# service.
# Format of each entry is [<unknown proc as in restart-services -l>]=<service name>
# Defined services will then be processed as any automatically found service.
# proc will be matched using regular bash pattern matching.
# To use an extended regular expression (as in regex(3)) prepend it with 'E@'.
# Default: CUSTOM_PROCESS_MAP=( )
# Examples:
#   [/usr/local/bin/myproc*]=myproc
#   [E@/usr/(local)?/bin/myproc[0-9]*]=myproc
#CUSTOM_PROCESS_MAP=( )

##############################################################################
# SPECIFY INCLUDES
##############################################################################
# load addional config files
# to extend options in another file use a syntax like SV_ALWAYS+=( myservice )
# where "myservice" can also be a regex
#include /etc/restart-services.d/*.conf
