ventoy / PXE

The open source part of iVentoy.
460 stars 32 forks source link

systemd init #30

Open barryking93 opened 1 year ago

barryking93 commented 1 year ago

in case anyone else needs one like I did. this is working on ubuntu 22.04

[Unit]
Description=iVentoy tftp service
Wants=network-online.target
After=network-online.target
DefaultDependencies=no
Conflicts=shutdown.target
Before=shutdown.target

[Service]
Type=forking
# REPLACE WITH YOUR INSTALL DIRECTORY BELOW
WorkingDirectory=/usr/local/iventoy
ExecStart=bash iventoy.sh -R start
ExecStop=bash iventoy.sh stop

[Install]
WantedBy=multi-user.target

maybe make an examples/init or something similar in the release, for things like this?

thestraycat commented 11 months ago

what and where should this be saved too? .cfg file??

barryking93 commented 8 months ago

/etc/systemd/system/iventoy.service