19 lines
383 B
Plaintext
Executable File
19 lines
383 B
Plaintext
Executable File
#!/usr/bin/env ssm
|
|
unset reload
|
|
|
|
service_type='oneshot'
|
|
service_command=( /usr/bin/sysctl -p )
|
|
|
|
pre_start() {
|
|
for i in /etc/sysctl.conf /etc/sysctl.d/* /usr/lib/sysctl.d/*; do
|
|
[[ -f "$i" ]] && sysctl_config_files+=( "$i" )
|
|
done
|
|
|
|
[[ "$sysctl_config_files" ]] || {
|
|
printf 'No configuration for sysctl found!\n'
|
|
return 3
|
|
}
|
|
|
|
service_command+=( "${sysctl_config_files[@]}" )
|
|
}
|