19 lines
383 B
Plaintext
Raw Normal View History

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