
[Unit]
Description=mytest
[Service]
Type=simple
ExecStart=/root/mytest.sh
Restart=always
RestartSec=5
StartLimitInterval=0
[Install]
WantedBy=multi-user.target
RestartPreventExitStatus=143 137 SIGTERM SIGKILL
ExecStart=/root/mem改为ExecStart=/root/mytest.sh
/root/mytest.sh内容为
#!/bin/bash
sleep 100000 &
sleep 200000
| 欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |