I'm configuring a Java app to run at boot using jsvc, following this tutorial which uses systemv
(init.d). I'm running Ubuntu 16.04, which uses systemd
, and am having a hard time finding exactly what I need to do to have it run at boot, and stop at shutdown.
So far I know I need to create a service with Type=forking
as the jsvc_exec
command which starts/stops the app forks once it has run.
What else do I need to include to have it work in a similar way to the systemv script from the tutorial?
Thanks
Something like this:
[Unit]
Description=Description of daemon
After=network.target
[Service]
#WorkingDirectory=/path/to/program/
#User=
#Group=
Type=forking
ExecStart=/path/to/program/program start
ExecStop=/path/to/program/program stop
#PIDFile=/path/to/pid/file.pid
#RestartSec=15
#Restart=always
[Install]
WantedBy=multi-user.target
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다