[root@localhost lighttpd]# cat lighttpd.service [unit] Description=lighttpd-server After=network.target [Service] Type=forking ExecStart=/home/lighttpd/lighttpd -f /home/lighttpd/lighttpd.conf ExecStop=pkill lighttpd PrivateTmp=true Restart=always RestartSec=1 [Install] WantedBy=multi-user.target [root@localhost lighttpd]# cat install.sh #!/bin/sh cp lighttpd.service /etc/systemd/system/ systemctl daemon-reload systemctl start lighttpd systemctl enable lighttpd [root@localhost lighttpd]#



