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

RPM SystemD script is broken because Golang project does not recognize all given flags (arguments) #53

Open
erkexzcx opened this issue Jan 27, 2022 · 0 comments

Comments

@erkexzcx
Copy link

Here is the output:

Started SyncFlux Agent.
syncflux.service: Main process exited, code=exited, status=1/FAILURE
syncflux.service: Failed with result 'exit-code'.
syncflux.service: Service RestartSec=100ms expired, scheduling restart.
syncflux.service: Scheduled restart job, restart counter is at 5.
Stopped SyncFlux Agent.
syncflux.service: Start request repeated too quickly.
syncflux.service: Failed with result 'exit-code'.
Failed to start SyncFlux Agent.

Checking systemctl status syncflux gives this output:

● syncflux.service - SyncFlux Agent
   Loaded: loaded (/usr/lib/systemd/system/syncflux.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2022-01-27 16:35:35 EET; 29s ago
     Docs: http://github.com/toni-moreno/syncflux
  Process: 140031 ExecStart=/usr/sbin/syncflux --pidfile=${PID_FILE} --config=${CONF_FILE} --logs=${LOG_DIR} --home=${HOME_DIR} --data=${DATA_DIR} (code=exited, status=1/FAILURE)
 Main PID: 140031 (code=exited, status=1/FAILURE)

Taking all the variables from here and copy-pasting them into the terminal and then running command /usr/sbin/syncflux --pidfile=${PID_FILE} --config=${CONF_FILE} --logs=${LOG_DIR} --home=${HOME_DIR} --data=${DATA_DIR} gives this error:

flag provided but not defined: -home
Usage of /usr/sbin/syncflux:
...

Same goes with -data flag.

This should be related, I can see commented out lines: https://github.com/toni-moreno/syncflux/blob/master/pkg/main.go#L30-L35

workaround: run systemctl edit syncflux.service and set contents as per below:

[Service]
ExecStart=
ExecStart=/usr/sbin/syncflux --pidfile=${PID_FILE} --config=${CONF_FILE} --logs=${LOG_DIR}
@erkexzcx erkexzcx changed the title RPM SystemD script because Golang project does not recognize all given flags (arguments) RPM SystemD script is broken because Golang project does not recognize all given flags (arguments) Jan 27, 2022
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