Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not double-log logs to syslog #2

Closed
dasGoogle opened this issue Mar 21, 2023 · 0 comments
Closed

Do not double-log logs to syslog #2

dasGoogle opened this issue Mar 21, 2023 · 0 comments

Comments

@dasGoogle
Copy link
Member

We have to make sure that we do not log the logs to the syslog twice (from wimoved itself and the system service manager).
This is a working example:

#!/bin/sh /etc/rc.common
# Example script
# Copyright (C) 2007 OpenWrt.org

USE_PROCD=1
START=99
STOP=15
start_service() {
         procd_open_instance [instance_name]
         procd_set_param command /usr/bin/wimoved # service executable that has to run in **foreground**.
         # respawn automatically if something died, be careful if you have an alternative process supervisor
         # if process dies sooner than respawn_threshold, it is considered crashed and after 5 retries the service is stopped
         procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-15} ${respawn_retry:-10}
         procd_set_param stdout 0 # forward stdout of the command to logd
         procd_set_param stderr 0 # same for stderr
         procd_set_param user root # run service as user nobody
         procd_set_param term_timeout 60 # wait before sending SIGKILL
         procd_close_instance
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant