Created
September 8, 2021 12:21
-
-
Save ali80/b13859f3272321272f957785cc94b6e5 to your computer and use it in GitHub Desktop.
create systemd service rpi
This file contains 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
[Unit] | |
Description=Test Service | |
# After=multi-user.target | |
[Service] | |
WorkingDirectory=/home/pi/ | |
User=pi | |
Environment=DISPLAY=:0 | |
Environment=XAUTHORITY=/home/pi/.Xauthority | |
Type=simple | |
ExecStart=/usr/bin/python3 /home/pi/dev//test.py | |
#Restart=on-abort | |
Restart=always | |
[Install] | |
WantedBy=graphical.target | |
# WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment