26 lines
533 B
Bash
26 lines
533 B
Bash
#!/bin/bash
|
|
|
|
MACO_USER="matrix-commander"
|
|
MACO_BASE_DIR="/opt/matrix-commander"
|
|
MACO_DIR="$MACO_BASE_DIR/matrix-commander"
|
|
MACO_SERVICE="[Unit]
|
|
Description=Matrix-Commander
|
|
After=syslog.target network-online.target
|
|
StartLimitIntervalSec=0
|
|
|
|
[Service]
|
|
User=$MACO_USER
|
|
Group=$MACO_USER
|
|
|
|
Type=simple
|
|
|
|
ExecStart=${MACO_BASE_DIR}/bin/python3 ${MACO_DIR}/matrix-commander.py --listen forever --listen-self
|
|
TimeoutStopSec=20
|
|
#KillMode=process
|
|
Restart=always
|
|
RestartSec=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
Alias=matrix-commander.service"
|