Updated the service creation to use cat instead of echo

This commit is contained in:
Bram Suurd 2024-05-15 20:55:15 +02:00
parent 4ae38ab9af
commit cbcbd504e3

View file

@ -25,13 +25,11 @@ wget -q $(curl -s https://api.github.com/repos/ventoy/pxe/releases/latest | grep
tar -C /tmp -xzf iventoy*.tar.gz
mv /tmp/iventoy*/* /opt/iventoy/
rm -rf iventoy*.tar.gz
msg_ok "Installed iVentoy"
msg_info "Creating Service"
service_path="/etc/systemd/system/iventoy.service"
echo "# /etc/systemd/system/iventoy.service
cat <<EOF >/etc/systemd/system/iventoy.service
[Unit]
Description =iVentoy PXE Booter
Documentation =https://www.iventoy.com
@ -46,7 +44,8 @@ ExecStart =sh ./iventoy.sh -R start
WorkingDirectory =/opt/iventoy
Restart =on-failure
[Install]
WantedBy=multi-user.target" >$service_path
WantedBy=multi-user.target
EOF
systemctl enable --now iventoy.service
msg_ok "Created Service"