-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Fix(Systemd): fix execa command (issue #660) #668
Conversation
Fix mismatch systemctl file and execa command permission
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too well-versed in using systemd so I can't say if using .service
everywhere will help 🙃
@@ -60,12 +60,12 @@ class SystemdProcessManager extends cli.ProcessManager { | |||
|
|||
isEnabled() { | |||
try { | |||
execa.shellSync(`systemctl is-enabled ${this.systemdName}`); | |||
execa.shellSync(`sudo systemctl is-enabled ${this.systemdName}`); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@@ -85,12 +85,12 @@ class SystemdProcessManager extends cli.ProcessManager { | |||
|
|||
isRunning() { | |||
try { | |||
execa.shellSync(`systemctl is-active ${this.systemdName}`); | |||
execa.shellSync(`sudo systemctl is-active ${this.systemdName}`); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Well i'm not too well-versed with nodejs. i'm still learning anyway. i have tried with sudo helper, but the result didn't same. (or i didn't capable to make it) But adding sudo and fixing execa error catch, it's easy way to resolve the issue 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -60,12 +60,12 @@ class SystemdProcessManager extends cli.ProcessManager { | |||
|
|||
isEnabled() { | |||
try { | |||
execa.shellSync(`systemctl is-enabled ${this.systemdName}`); | |||
execa.shellSync(`sudo systemctl is-enabled ${this.systemdName}`); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@acburdine Regarding this error output
it seem the command didn't have enough permission to run systemctl .service file. It short cut to solve the issue, |
I'm gonna look into exactly how difficult it would be to allow |
refs TryGhost#668 [ci skip] - update instance.running() to handle process.isRunning promise - update everywhere that uses instance.running to handle the promise
refs TryGhost#668 - update instance.running() to handle process.isRunning promise - update everywhere that uses instance.running to handle the promise - fix tests
) refs #668 - update instance.running() to handle process.isRunning promise - update everywhere that uses instance.running to handle the promise - fix tests
I submitted a PR that will change those two commands to run as sudo: #672 |
Closed by #672. |
Regarding #660 Issue