Last active
February 3, 2019 05:53
-
-
Save shekharkoirala/df8e780a0785a3c6f01d3767a3a63bf4 to your computer and use it in GitHub Desktop.
Run python program as a service in linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# path : sudo nano /lib/systemd/system/service_name.service | |
[Unit] | |
Description=Daemon Service | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/python3 /path/to/python/file/example.py | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment