I'm working on an emailnotifier script on RaspberryPi which was written in Python. I've found a tutorial page, I've exactly copied the default code (which works fine with a simple "python emailnotifier.py") but I wanted to improve it as a startup service.

The code can be found at the bottom at this page (Sorry dunno how to insert it):


After I start the service then check the status, the following can be read:

"Stopping system #DAEMON_NAME daemon:start-stop-daemon: warning: failed to kill 2270: No such process

No process in pidfile '/var/run/emailnotifier.pid' found running; none killed.


1 Answer 1


Looks like you need to add writing pidfile to your code.

at the begining

import os

and before first try:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .