Загрузка...

Run screen on crash

Thread in Linux created by Seryozha Oct 31, 2022. 228 views

  1. Seryozha
    Seryozha Topic starter Oct 31, 2022 398 Jan 12, 2017
    Привет, может кто знает, как сделать так, что бы при падании сервера запускался screen с моими параметрами?
     
  2. санябритва
    санябритва Oct 31, 2022 выпил из стакана месячные своей телки 249 Jun 13, 2020
    не использовать screen, смени хотябы на systemd сервис, там уже будут возможности что тебе нужны
     
    1. View previous comments (6)
    2. Seryozha Topic starter
      Code
      * bot.service - My test service
      Loaded: loaded (/etc/systemd/system/bot.service; disabled; vendor preset: enabled)
      Active: failed (Result: exit-code) since Mon 2022-10-31 21:31:22 MSK; 23s ago
      Process: 3437 ExecStart=/usr/bin/python3 /home/root/film/main.py (code=exited, status=216/GROUP)
      Main PID: 3437 (code=exited, status=216/GROUP)

      Oct 31 21:31:22 112012.vds.as210546.net systemd[1]: bot.service: Scheduled restart job, restart counter is at >
      Oct 31 21:31:22 112012.vds.as210546.net systemd[1]: Stopped My test service.
      Oct 31 21:31:22 112012.vds.as210546.net systemd[1]: bot.service: Start request repeated too quickly.
      Oct 31 21:31:22 112012.vds.as210546.net systemd[1]: bot.service: Failed with result 'exit-code'.
      Oct 31 21:31:22 112012.vds.as210546.net systemd[1]: Failed to start My test service.
    3. Seryozha Topic starter
      файл лежит в /root/film/
      Code
      [Unit]
      Description=My test service
      After=multi-user.target

      [Service]
      User=root
      Group=admin
      Type=simple
      Restart=always
      ExecStart=/usr/bin/python3 /home/root/film/main.py

      [Install]
      WantedBy=multi-user.target
      код /etc/systemd/system/bot.service
Top
Loading...