Ubuntu自定义服务开机自启

cat isoc.service

[Unit]
Description=isoc
After=local-fs.target network-online.target network.target
Wants=local-fs.target network-online.target network.target

[Service]

ExecStart=/data/isoc/installed/shell/ccheck.sh

[Install]

 

 

cp -f /data/user_data/opt/package/isoc/isoc.service /usr/lib/systemd/system/
systemctl start isoc && systemctl enable isoc

posted @ 2024-09-12 10:38  风清月  阅读(5)  评论(0编辑  收藏  举报