• 0 Posts
  • 5 Comments
Joined 2 years ago
cake
Cake day: June 30th, 2023

help-circle



  • Instead of using systemd user services you can just use a normal systemd service and tell it to run the command as a specific user, put something like this in a file at /etc/systemd/system/<unit Name>.service

    [Unit]
    Description=Run service as user test
    After=network.target
    
    [Service]
    Type=simple
    User=test
    Group=test
    ExecStart=/opt/teamspoke
    
    [Install]
    WantedBy=default.target
    

    Then set it to start at boot

    systemctl enable <unit Name>.service
    

    And to start it now

    systemctl start <unit Name>.service