Skip to content

Commit ed8fd1e

Browse files
author
gclm
committed
fix(增加 tengine 脚本配置)
1 parent 7c0cbe0 commit ed8fd1e

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

include/tengine-2.3.2.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,25 @@ make && make install
3535
ln -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

5559
main(){

0 commit comments

Comments
 (0)