systemd service file for openlitespeed
To start/stop OpenLiteSpeed web server, you can use the following systemd service file
1 |
vi /usr/lib/systemd/system/lshttpd.service |
Add following content
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
[Unit] Description=OpenLiteSpeed HTTP Server After=network-online.target remote-fs.target nss-lookup.target Wants=network-online.target [Service] Type=forking PIDFile=/var/run/openlitespeed.pid ExecStart=/usr/local/lsws/bin/lswsctrl start ExecReload=/usr/local/lsws/bin/lswsctrl restart ExecStop=/usr/local/lsws/bin/lswsctrl delay-stop KillMode=none PrivateTmp=false Restart=on-failure RestartSec=5 # do not want to be limited in anyway CPUAccounting=false TasksAccounting=false MemoryAccounting=false [Install] WantedBy=multi-user.target Alias=lsws.service Alias=openlitespeed.service |
To start openlitespeed on boot,
1 |
systemctl enable lsws |
To start OpenLiteSpeed
1 |
systemctl start lsws |
To stop OpenLiteSpeed
1 |
systemctl stop lsws |
See OpenLiteSpeed