diff --git a/install/iventoy-install.sh b/install/iventoy-install.sh index a0cf7650..559e3965 100644 --- a/install/iventoy-install.sh +++ b/install/iventoy-install.sh @@ -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 </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"