According to the bash manual, these should be available always, even if the os does not supply them
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
@@ -919,6 +919,19 @@ if service_nologs; then
|
||||
service_logfile_err = '/dev/null'
|
||||
fi
|
||||
|
||||
# Same if one of the files isn't available
|
||||
>> "$service_logfile_out" || {
|
||||
printf 'WARNING: %s is not writable, defaulting to stdout.\n'
|
||||
service_logfile_out = /dev/stdout
|
||||
}
|
||||
|
||||
[[ "$service_logfile_out" == "$service_logfile_err" ]] || {
|
||||
>> "$service_logfile_err" || {
|
||||
printf 'WARNING: %s is not writable, defaulting to stderr.\n'
|
||||
service_logfile_err = /dev/stderr
|
||||
}
|
||||
}
|
||||
|
||||
# Get the last recorded mainpid
|
||||
if service_pidfile is file; then
|
||||
read -r service_pid < "$service_pidfile"
|
||||
|
||||
Reference in New Issue
Block a user