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

running raspberry-instock-check as a service #2

Closed
careyer opened this issue May 9, 2022 · 2 comments
Closed

running raspberry-instock-check as a service #2

careyer opened this issue May 9, 2022 · 2 comments

Comments

@careyer
Copy link

careyer commented May 9, 2022

Hi there,

I try to run your raspberry-instock-check as a service on my system but sadly I am not successful in doing so. It seems like when running as a service it cannot write its output to tty. Have you ever tried to run it as a service and could share how you managed to do so?

Thank you!
Keep up the excellent work!

@rigwild
Copy link
Owner

rigwild commented May 9, 2022

I use PM2.

it cannot write its output to tty

That's weird, it only uses normal console.log, so shouldn't cause any issues?

@careyer
Copy link
Author

careyer commented May 10, 2022

Got it working.... the trick was to specify the working directory in the system unit file:

[Unit]
Description=rpicheck
After=network-online.target

[Service]
WorkingDirectory=/home/pi/raspberry-instock-check
ExecStart=/home/pi/raspberry-instock-check/rpicheck.sh
User=pi

[Install]
WantedBy=multi-user.target

Ticket can be closed, thanks!

@rigwild rigwild closed this as completed May 10, 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

2 participants