Advertisement
black_roland

Teeworlds systemd units

Jan 22nd, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. $ mv ~/teeworlds-tw-plus /opt/
  2. $ mv ~/teeworlds-bomb /opt/
  3. $ useradd -c 'teeworlds-tw-plus' -d /opt/teeworlds-tw-plus -m -r -s /usr/sbin/nologin teeworlds-tw-plus
  4. $ useradd -c 'teeworlds-bomb' -d /opt/teeworlds-bomb -m -r -s /usr/sbin/nologin teeworlds-bomb
  5. $ cat /etc/systemd/system/teeworlds-tw-plus@.service
  6. [Unit]
  7. Description=teeworlds-tw-plus server with %i.cfg config file
  8. After=syslog.target network.target
  9.  
  10. [Service]
  11. User=teeworlds-tw-plus
  12. WorkingDirectory=/opt/teeworlds-tw-plus
  13. ExecStart=/opt/teeworlds-tw-plus/tw+_srv -f %i.cfg
  14. Restart=always
  15. RestartSec=10
  16.  
  17. [Install]
  18. WantedBy=multi-user.target
  19. $ cat /etc/systemd/system/teeworlds-bomb@.service
  20. [Unit]
  21. Description=teeworlds-bomb server with %i.cfg config file
  22. After=syslog.target network.target
  23.  
  24. [Service]
  25. User=teeworlds-bomb
  26. WorkingDirectory=/opt/teeworlds-bomb
  27. ExecStart=/opt/teeworlds-bomb/teeworlds_srv -f %i.cfg
  28. Restart=always
  29. RestartSec=10
  30.  
  31. [Install]
  32. WantedBy=multi-user.target
  33. $ systemctl start teeworlds-tw-plus@ctf teeworlds-tw-plus@ictf teeworlds-tw-plus@gctf teeworlds-tw-plus@ctf64
  34. $ systemctl start teeworlds-bomb@bomb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement