Автор: funk2256, 2 лет назад, написана на языке Plain Text.
Встраивание на сайт
  1. funk2256@home-server:~/lampa/lampa-source$ cat /usr/local/bin/lampa_start
  2. #!/bin/sh
  3. cd /home/funk2256/lampa/lampa-source/ && pm2 --name lampa start npm -- start
  4. funk2256@home-server:~/lampa/lampa-source$ sudo cat /etc/systemd/system/lampa.service
  5. [Unit]
  6. Description=lampa start npm service
  7.  
  8. [Service]
  9. Type=simple
  10. ExecStart=/usr/local/bin/lampa_start
  11. Restart=always
  12.  
  13. [Install]
  14. WantedBy=multi-user.target
  15. funk2256@home-server:~/lampa/lampa-source$ sudo systemctl daemon-reload
  16. funk2256@home-server:~/lampa/lampa-source$ sudo systemctl start lampa.service
  17. funk2256@home-server:~/lampa/lampa-source$ sudo systemctl status lampa.service
  18. × lampa.service - lampa start npm service
  19.      Loaded: loaded (/etc/systemd/system/lampa.service; disabled; vendor preset: enabled)
  20.      Active: failed (Result: exit-code) since Fri 2022-10-07 02:20:21 +07; 3s ago
  21.     Process: 10658 ExecStart=/usr/local/bin/lampa_start (code=exited, status=203/EXEC)
  22.    Main PID: 10658 (code=exited, status=203/EXEC)
  23.         CPU: 2ms
  24.  
  25. окт 07 02:20:21 home-server systemd[1]: Started lampa start npm service.
  26. окт 07 02:20:21 home-server systemd[1]: lampa.service: Main process exited, code=exited, status=203/EXEC
  27. окт 07 02:20:21 home-server systemd[1]: lampa.service: Failed with result 'exit-code'.
  28. окт 07 02:20:21 home-server systemd[1]: lampa.service: Scheduled restart job, restart counter is at 5.
  29. окт 07 02:20:21 home-server systemd[1]: Stopped lampa start npm service.
  30. окт 07 02:20:21 home-server systemd[1]: lampa.service: Start request repeated too quickly.
  31. окт 07 02:20:21 home-server systemd[1]: lampa.service: Failed with result 'exit-code'.
  32. окт 07 02:20:21 home-server systemd[1]: Failed to start lampa start npm service.
  33. funk2256@home-server:~/lampa/lampa-source$ sudo systemctl daemon-reload
  34. funk2256@home-server:~/lampa/lampa-source$ sudo systemctl start lampa.service
  35. funk2256@home-server:~/lampa/lampa-source$ sudo systemctl status lampa.service
  36. × lampa.service - lampa start npm service
  37.      Loaded: loaded (/etc/systemd/system/lampa.service; disabled; vendor preset: enabled)
  38.      Active: failed (Result: exit-code) since Fri 2022-10-07 02:20:21 +07; 3s ago
  39.     Process: 10658 ExecStart=/usr/local/bin/lampa_start (code=exited, status=203/EXEC)
  40.    Main PID: 10658 (code=exited, status=203/EXEC)
  41.         CPU: 2ms
  42.  
  43. окт 07 02:20:21 home-server systemd[1]: Started lampa start npm service.
  44. окт 07 02:20:21 home-server systemd[1]: lampa.service: Main process exited, code=exited, status=203/EXEC
  45. окт 07 02:20:21 home-server systemd[1]: lampa.service: Failed with result 'exit-code'.
  46. окт 07 02:20:21 home-server systemd[1]: lampa.service: Scheduled restart job, restart counter is at 5.
  47. окт 07 02:20:21 home-server systemd[1]: Stopped lampa start npm service.
  48. окт 07 02:20:21 home-server systemd[1]: lampa.service: Start request repeated too quickly.
  49. окт 07 02:20:21 home-server systemd[1]: lampa.service: Failed with result 'exit-code'.
  50. окт 07 02:20:21 home-server systemd[1]: Failed to start lampa start npm service.
  51.