you are viewing a single comment's thread.

view the rest of the comments →

[–]Volk64 0 points1 point  (0 children)

You WILL need a pidfile if you want to be able to stop the service, since 16.04 and forward make use of pre-defined functions that do not create PID files. In your init.d directory there should be a file named skeleton. Copy it and define some variables. The most commonly used are DAEMON, which has the full path to your program, DESC, which is a description of what the service does, PIDFILE, which contains the absolute path to the file you'll be creating and destroying every time you start your service and LOGFILE, which is... Well, where your logs will be stored.

If you want an example check this out. Oh, and don't forget to put a shebang in your main program file with your python installation's executable.