[GH-ISSUE #334] Автозапуск server.py на ubuntu #265

Closed
opened 2026-10-13 19:53:30 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @burdeyniyua on GitHub (Mar 20, 2020).
Original GitHub issue: https://github.com/werwolfby/monitorrent/issues/334

Добрый день! Уже несколько дней не могу запустить скрипт Monitorrent при запуске системы.
При ручном запуске скрипта запускается и работает. Но при загрузке системы никак. Пробую и через systemd и через rc.local
Помогите пожалуйста прописать скрипт в автозапуск.
Сам скрипт:

#!/bin/bash
python3 /home/user/monitorrent/server.py

Версия linux 4.15.0-91-generic (Ubuntu 7.4.0-1ubuntu1~18.04.1)

Originally created by @burdeyniyua on GitHub (Mar 20, 2020). Original GitHub issue: https://github.com/werwolfby/monitorrent/issues/334 Добрый день! Уже несколько дней не могу запустить скрипт Monitorrent при запуске системы. При ручном запуске скрипта запускается и работает. Но при загрузке системы никак. Пробую и через systemd и через rc.local Помогите пожалуйста прописать скрипт в автозапуск. Сам скрипт: ``` #!/bin/bash python3 /home/user/monitorrent/server.py ``` **Версия linux 4.15.0-91-generic (Ubuntu 7.4.0-1ubuntu1~18.04.1)**
Author
Owner

@burdeyniyua commented on GitHub (Mar 20, 2020):

Я так понимаю, что скрипт init.d еще не прописан в возможностях Monitorrent.

<!-- gh-comment-id:601707216 --> @burdeyniyua commented on GitHub (Mar 20, 2020): Я так понимаю, что скрипт init.d еще не прописан в возможностях Monitorrent.
Author
Owner

@werwolfby commented on GitHub (Mar 22, 2020):

Ну да я ниразу этого не планировал.
Просто docker покрывает это ещё лучше чем init.d.

<!-- gh-comment-id:602148068 --> @werwolfby commented on GitHub (Mar 22, 2020): Ну да я ниразу этого не планировал. Просто docker покрывает это ещё лучше чем init.d.
Author
Owner

@Akior commented on GitHub (Mar 22, 2020):

А зачем создавать баш скрипт ?
Systemd запуск

[Unit]
Description=Monitorrent
After=network.target

[Service]
ExecStart=/usr/bin/python3 /opt/monitorrent/server.py --db-path /opt/monitorrent/monitorrent.db
Restart=always
RestartSec=10
WorkingDirectory=/opt/monitorrent/
User=root
Group=root
KillMode=process

[Install]
WantedBy=multi-user.target
<!-- gh-comment-id:602267037 --> @Akior commented on GitHub (Mar 22, 2020): А зачем создавать баш скрипт ? Systemd запуск [Unit] Description=Monitorrent After=network.target [Service] ExecStart=/usr/bin/python3 /opt/monitorrent/server.py --db-path /opt/monitorrent/monitorrent.db Restart=always RestartSec=10 WorkingDirectory=/opt/monitorrent/ User=root Group=root KillMode=process [Install] WantedBy=multi-user.target
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
werwolfby/monitorrent#265
No description provided.