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

no 'restart' command #19

Open
FKPSC opened this issue Apr 26, 2024 · 3 comments
Open

no 'restart' command #19

FKPSC opened this issue Apr 26, 2024 · 3 comments

Comments

@FKPSC
Copy link

FKPSC commented Apr 26, 2024

Key features mentions this on point 3:

Service Control: Start, stop, restart, enable, or disable services seamlessly with straightforward commands.

But there is no restart command.

I looked into the code and saw there is a reload function. It does not seem to do what I expect.

I found your project while looking for an alternative to pm2 that works with pino. I am happy so far. A restart command should be easy to implement :)

@flexwie
Copy link
Contributor

flexwie commented May 9, 2024

We had a discussion about this in #6
Can you explain what you'd expect from a reload and how it differs from that?

@FKPSC
Copy link
Author

FKPSC commented May 9, 2024

I get this error:

$ sudo ser reload staging
thread 'main' panicked at src/handlers/handle_reload_service.rs:51:10:
Failed to reload service staging.ser.service. Ensure it has an ExecReload statement: MethodError(OwnedErrorName(ErrorName(Str(Owned("org.freedesktop.systemd1.JobTypeNotApplicable")))), Some("Job type reload is not applicable for unit staging.ser.service."), Msg { type: Error, sender: UniqueName(Str(Borrowed(":1.3"))), reply-serial: 6, body: Signature("s") })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

but running sudo ser stop staging && sudo ser start staging works just fine but it's quite cumbersome to type every time I need to to restart the node instance when I pull the changes.

@flexwie
Copy link
Contributor

flexwie commented May 21, 2024

So the reload works as designed, your unit file needs to specify a ExecReload target (take a look at the error message).
For a dedicated restart command, that would be quite easy to implement if @secretshardul is open for it?

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

2 participants