[Unit] Description=POG-CC PermDevMapper (stable /dev/pogcc for DyzineFrame) After=local-fs.target systemd-udevd.service Wants=systemd-udevd.service [Service] Type=simple ExecStart=/usr/bin/python3 /home/topbox/DyzineFrame/pogcc_permdev_mapper.py --phys /dev/ser_DT1 --pty-link /dev/pogcc --status /run/dyzineframe/pogcc_link.status ExecStopPost=/bin/bash -c 'echo "{\"ok\":false,\"ts\":$(date +%%s),\"reason\":\"mapper_stopped\",\"phys\":\"/dev/ser_DT1\",\"pty\":\"/dev/pogcc\"}" > /run/dyzineframe/pogcc_link.status' Restart=always RestartSec=1 Nice=-5 [Install] WantedBy=multi-user.target