File tree Expand file tree Collapse file tree 1 file changed +19
-15
lines changed
Expand file tree Collapse file tree 1 file changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -35,21 +35,25 @@ make && make install
3535ln -sf /usr/sbin/nginx /usr/bin/nginx
3636}
3737
38- # [Unit]
39- # Description=nginx - high performance web server
40- # Documentation=http://nginx.org/en/docs/
41- # After=network-online.target remote-fs.target nss-lookup.target
42- # Wants=network-online.target
43- #
44- # [Service]
45- # Type=forking
46- # PIDFile=/var/run/nginx.pid
47- # ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf
48- # ExecReload=/bin/kill -s HUP $MAINPID
49- # ExecStop=/bin/kill -s TERM $MAINPID
50- #
51- # [Install]
52- # WantedBy=multi-user.target
38+ config (){
39+ sudo tee /usr/lib/systemd/system/nginx.service << -'EOF '
40+ [Unit]
41+ Description=nginx - high performance web server
42+ Documentation=http://nginx.org/en/docs/
43+ After=network-online.target remote-fs.target nss-lookup.target
44+ Wants=network-online.target
45+
46+ [Service]
47+ Type=forking
48+ PIDFile=/var/run/nginx.pid
49+ ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf
50+ ExecReload=/bin/kill -s HUP $MAINPID
51+ ExecStop=/bin/kill -s TERM $MAINPID
52+
53+ [Install]
54+ WantedBy=multi-user.target
55+ EOF
56+ }
5357
5458
5559main (){
You can’t perform that action at this time.
0 commit comments