Skip to content

Instantly share code, notes, and snippets.

@stranljip
Created January 24, 2020 06:57
Show Gist options
  • Save stranljip/7cc8e7343099b7acf37e913efed56e90 to your computer and use it in GitHub Desktop.
Save stranljip/7cc8e7343099b7acf37e913efed56e90 to your computer and use it in GitHub Desktop.
# /etc/systemd/system/screenrunner.service
[Service]
User=user-to-run-as
Type=simple
RemainAfterExit=yes
ExecStart=/usr/bin/screen -dmS screenname bash -c "/usr/bin/python3 /some/python/script.py"
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment