2017-07-13 13:09:42 +00:00
|
|
|
#!/usr/bin/env ssm
|
2015-09-04 13:47:37 +00:00
|
|
|
unset reload
|
2014-03-01 18:34:13 +00:00
|
|
|
|
|
|
|
service_type='oneshot'
|
2017-12-21 15:06:33 +00:00
|
|
|
service_command=( /usr/bin/sysctl -p )
|
2014-07-03 07:05:52 +00:00
|
|
|
|
2015-09-04 13:47:37 +00:00
|
|
|
pre_start() {
|
|
|
|
for i in /etc/sysctl.conf /etc/sysctl.d/* /usr/lib/sysctl.d/*; do
|
2017-12-21 15:06:33 +00:00
|
|
|
[[ -f "$i" ]] && sysctl_config_files+=( "$i" )
|
2015-09-04 13:47:37 +00:00
|
|
|
done
|
|
|
|
|
2017-12-21 15:06:33 +00:00
|
|
|
[[ "$sysctl_config_files" ]] || {
|
|
|
|
printf 'No configuration for sysctl found!\n'
|
|
|
|
return 3
|
|
|
|
}
|
|
|
|
|
|
|
|
service_command+=( "${sysctl_config_files[@]}" )
|
2015-09-04 13:47:37 +00:00
|
|
|
}
|