我已经在实例启动时运行了shell脚本。我向systemd添加了服务,但出现错误:
“无法启动startservice.mttest.service:找不到单元”
[Unit]
Description=StartService_Mytest
[Service]
Type=forking
ExecStart=/bin/sh $HOME/opt/scripts/startup.sh
Restart=on-failure
[Install]
WantedBy=default.target
无法启动startservice.mttest.service:找不到单元