Bash script to restart java application after Jenkins compiling
0
votes
1
answer
646
views
I'm noob in linux! I have my server and installed jenkins. I need to create bash script, which should run application(or will restart if it has already been started) after jenkins compile it. I tried to use screen util in linux, but it's not working for me. I wrote this script:
screen -X -S JavaTelegramBot quit
screen -d -m -S JavaTelegramBot
screen -X -S JavaTelegramBot java -jar "path/to/jar"
When I tip -ls
, it's empty, so application not working. I even tried to use nohup. It's only launch application for few seconds, until jenkins finished his build. Scripts starting by using cmd command in jenkins after build
Asked by Alex F
(3 rep)
Aug 28, 2021, 07:43 PM
Last activity: Aug 30, 2021, 04:19 PM
Last activity: Aug 30, 2021, 04:19 PM