dmx/xetc_systemd_system/lights.service.1
2024-08-07 17:27:25 +05:30

20 lines
445 B
Groff

[Unit]
Description=Run sequence.py in tmux sess
# wait for network to come up
After=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
User=light
Group=light
WorkingDirectory=/home/light/bin/dmx
# Start a new tmux session named "light"
# run Python script in the tmux session
ExecStart=/usr/bin/tmux new-session -s light -d "python3 sequence.py"
ExecStop=/usr/bin/tmux kill-session -t light
[Install]
WantedBy=multi-user.target