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 screen -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