forked from groland11/do-restarting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdo-restarting.conf
44 lines (41 loc) · 1.65 KB
/
do-restarting.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Sample configuration file
### Main section applies to all services
# Following configuration values are supported:
# blacklist: List of services that will not be restarted.
# Service names must not include the trailing ".service".
# Example: blacklist=httpd,myslqd,firewalld
# whitelist: List of services that will be restarted even though
# they are hardcoded in the internal blacklist in the script.
# Service names must not include the trailing ".service".
# Example: whitelist=dbus
[MAIN]
blacklist=httpd,mysqld
whitelist=dbus
### Sections for individual services
# Following configuration values are supported:
# dow: Day of week when service will be restarted
# Valid values are "mon","tue","wed","thu","fri","sat","sun"
# as a comma separated list or ranges of values.
# Example: dow=mon-wed,fri
# hours: Hours when service will be restarted. If script is called
# outside of the specified hours, restart of service will be
# skipped.
# Example: hours=12-14,18-20
# pre: Pre condition to check before service will be restarted.
# This can be any command that will be run in a shell as
# the calling user. If the return value is not zero, the
# service will not be restarted.
# Example: pre="apachectl configtest"
# post: Post condition to check after service restart. If the
# return value is not zero. an error message will be
# printed to stderr. This can be useful if the output
# of the script is redirected to a log file that is
# monitored.
[httpd]
dow=sat,sun
hours=12-20,15
pre="apachectl configtest"
post="systemctl status httpd"
[firewalld]
dow=mon-fri
hours=0-6,12,19