0
I have a system service
[Unit]
Description=dynsock server
After=network.target
[Service]
EnvironmentFile=/etc/dynsock.env
ExecStart=/usr/local/bin/dynctl.sh $SERVER $COUNT $BASEPORT $AUTH
ExecStop=/usr/local/bin/dynsock_onfailure.sh down
Restart=always
Type=forking
[Install]
Alias=dynsock.service
dynctl.sh
will start $count
child process. I hope when some process dead, systemctl will restart, and exec ExecStop
. But system will only restart until all child process dead.