创建服务开机自启文件
程序员文章站
2022-04-12 09:44:34
eg: vim /lib/systemd/system/nginx.service [Unit] Description=nginx After=network.target [Service] Type=forking ExecStart=/usr/local/nginx/sbin/nginx # ......
eg:
vim /lib/systemd/system/nginx.service
[unit]
description=nginx
after=network.target
[service]
type=forking
execstart=/usr/local/nginx/sbin/nginx #开启nginx服务
execreload=/usr/local/nginx/sbin/nginx reload #重载nginx服务
execstop=/usr/local/nginx/sbin/nginx quit
privatetmp=true
[install]
wantedby=multi-user.target
上一篇: CDR制作立体风格的折纸文字效果