Advertisement
Guest User

Untitled

a guest
Nov 16th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. create /lib/systemd/system/ptokax.service
  2.  
  3. Код:
  4. [Unit]
  5. Description=Ptokax DC Hub
  6. After=network.target
  7.  
  8. [Service]
  9. ExecStart=path/to/bin/ptokax -c /path/to/cfgdir/ptokax
  10. User=ptokax user
  11. Group=ptokax group
  12. Restart=always
  13. RestartSec=5s
  14. WorkingDirectory=/path/to/cfgdir/ptokax
  15. CapabilityBoundingSet=CAP_NET_BIND_SERVICE
  16. AmbientCapabilities=CAP_NET_BIND_SERVICE
  17. PrivateTmp=yes
  18. PrivateDevices=yes
  19. ProtectSystem=full
  20. ProtectHome=yes
  21. NoNewPrivileges=yes
  22.  
  23. [Install]
  24. WantedBy=multi-user.target
  25.  
  26.  
  27. console exec:
  28.  
  29. systemctl daemon-reload
  30. systemctl enable ptokax.service
  31. systemctl start ptokax.service
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement