LINUX.ORG.RU

История изменений

Исправление VecH, (текущая версия) :

# cat /etc/systemd/system/tmux_master.service
[Unit]
Description=tmux master service

[Service]
Type=forking
User=root
ExecStart=/usr/bin/tmux new-session -s master -d
ExecStop=/usr/bin/tmux kill-session -t master

[Install]
WantedBy=multi-user.target
# cat /etc/systemd/system/tmux_telememos.service
[Unit]
Description=tmux telegram-Integration service
PartOf=tmux_master.service
After=tmux_master.service

[Service]
Type=oneshot
RemainAfterExit=yes
User=root
ExecStart=/usr/bin/tmux new-session -s telegram-Integration -d "source /root/.bashrc; source /root/.profile; cd /opt/telegram-integration; ./memogram"
ExecStop=/usr/bin/tmux kill-session -t telegram-Integration

[Install]
WantedBy=multi-user.target
# cat /etc/systemd/system/tmux_test2.service
[Unit]
Description=tmux test 2 service
PartOf=tmux_master.service
After=tmux_master.service

[Service]
Type=oneshot
RemainAfterExit=yes
User=root
ExecStart=/usr/bin/tmux new-session -s test2 -d
ExecStop=/usr/bin/tmux kill-session -t test2

[Install]
WantedBy=multi-user.target
# tmux ls
master: 1 windows (created Thu Jun  6 19:52:54 2024)
test2: 1 windows (created Thu Jun  6 19:52:54 2024)
# journalctl -u tmux_telememos.service
-- Boot 89ae884043144604a3454b0a960936e9 --
Jun 06 19:52:54 vps01 systemd[1]: Starting tmux telegram-Integration service...
Jun 06 19:52:54 vps01 systemd[1]: Finished tmux telegram-Integration service.

Попробовал через systemd, получаю какую то фигу у этого memogram никаких логов нет, спросил на github, жду ответа

При запуске с консоли все в порядке

# systemctl restart tmux_telememos.service
# tmux ls
master: 1 windows (created Thu Jun  6 19:52:54 2024)
telegram-Integration: 1 windows (created Thu Jun  6 20:07:40 2024)
test2: 1 windows (created Thu Jun  6 19:52:54 2024)

Исходная версия VecH, :

# cat /etc/systemd/system/tmux_master.service
[Unit]
Description=tmux master service

[Service]
Type=forking
User=root
ExecStart=/usr/bin/tmux new-session -s master -d
ExecStop=/usr/bin/tmux kill-session -t master

[Install]
WantedBy=multi-user.target
# cat /etc/systemd/system/tmux_telememos.service
[Unit]
Description=tmux telegram-Integration service
PartOf=tmux_master.service
After=tmux_master.service

[Service]
Type=oneshot
RemainAfterExit=yes
User=root
ExecStart=/usr/bin/tmux new-session -s telegram-Integration -d "source /root/.bashrc; source /root/.profile; cd /opt/telegram-integration; ./memogram"
ExecStop=/usr/bin/tmux kill-session -t telegram-Integration

[Install]
WantedBy=multi-user.target
# cat /etc/systemd/system/tmux_test2.service
[Unit]
Description=tmux test 2 service
PartOf=tmux_master.service
After=tmux_master.service

[Service]
Type=oneshot
RemainAfterExit=yes
User=root
ExecStart=/usr/bin/tmux new-session -s test2 -d
ExecStop=/usr/bin/tmux kill-session -t test2

[Install]
WantedBy=multi-user.target
# tmux ls
master: 1 windows (created Thu Jun  6 19:52:54 2024)
test2: 1 windows (created Thu Jun  6 19:52:54 2024)
# journalctl -u tmux_telememos.service
-- Boot 89ae884043144604a3454b0a960936e9 --
Jun 06 19:52:54 vps01 systemd[1]: Starting tmux telegram-Integration service...
Jun 06 19:52:54 vps01 systemd[1]: Finished tmux telegram-Integration service.

Попробовал через systemd, получаю какую то фигу у этого memogram никаких логов нет, спросил на github, жду ответа