Skip to content

Instantly share code, notes, and snippets.

@stranljip
Created January 24, 2020 06:57

Revisions

  1. stranljip created this gist Jan 24, 2020.
    9 changes: 9 additions & 0 deletions screenrunner.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # /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