test.service 530 B

123456789101112131415161718192021222324
  1. [Unit]
  2. Description=My Service
  3. Documentation=https://example.com/docs/my-service.html
  4. #After=/home/heyicong/DragonReach/parse_test/test1.service
  5. [Service]
  6. Type=simple
  7. ExecStart=/bin/gdb
  8. ExecStartPos=/bin/echo start_pos
  9. ExecStartPre=/bin/echo start_pre
  10. ExecStopPost=/bin/echo stop_pos
  11. ExecReload=/bin/echo reload
  12. WorkingDirectory=/home/heyicong/
  13. User=myuser
  14. Group=mygroup
  15. Environment=VAR1=value1
  16. Environment=VAR2=value2
  17. Restart=on-success
  18. RestartSec=5s
  19. TimeoutStartSec=10s
  20. TimeoutStopSec=10s
  21. [Install]
  22. #WantedBy=multi-user.target