You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
call service.Start, this causes the usual daemonization double fork which creates its own instance but this time calling itself without a flag and hence going into the Cron working ?
Not entirely clear about 2 because I'm using cobra as a wrapper, so will that work nicely with the command line flags, arguments used by the double fork? Or should I expliclty control the commands used?
Example, I want to have it be: h-watchdog service start where I'm grouping all the daemon related commands under service subcommand.
The text was updated successfully, but these errors were encountered:
Nvm, figured it out. Key was to understand the passing of params to .Install and using systemctl list-unit-files and systemctl show -p FragmentPath <SERVICE_NAME> to see the generated file.
Great package, thank you.
I was wondering about the flow of the daemonization, hoping to see if my thought process is accurate.
Going off of: https://github.com/takama/daemon/blob/master/examples/cron/cron_job.go#L50
Is the idea then that:
service.Install
only once neededservice.Start
, this causes the usual daemonization double fork which creates its own instance but this time calling itself without a flag and hence going into the Cron working ?Not entirely clear about
2
because I'm using cobra as a wrapper, so will that work nicely with the command line flags, arguments used by the double fork? Or should I expliclty control the commands used?Example, I want to have it be:
h-watchdog service start
where I'm grouping all the daemon related commands under service subcommand.The text was updated successfully, but these errors were encountered: