## 配置

- 服务配置路径 `/usr/lib/systemd/system/`
- 服务配置示例
```
- [Unit]
Description = ops notify Service

[Service]
LimitCORE=infinity
LimitNOFILE=102400
LimitNPROC=65535
Type=simple
WorkingDirectory=/data/ops-notify/
ExecStart=/data/ops-notify/ops-notify
KillSignal=SIGINT
Restart=on-failure
StandardOutput=null

[Install]
WantedBy=multi-user.target
```

- nginx
```
[Unit]
Description=nginx
After=network.target
  
[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s quit
PrivateTmp=true
  
[Install]
WantedBy=multi-user.target
```

## 设置开机启动
- 建立好服务配置后，执行 `systemctl enable ops-notify.service`
- 执行完之后，`/etc/systemd/system/multi-user.target.wants/` 路径下，会多一个链接文件

## 程序输出
- 程序的标准输出在：/var/log/messages
