Hello I have a Jenkins job which is supposed to execute a command after uploading to the webserver. It's a simple script which kills the current npm process, writes the date to a file and restarts the server.
#!/bin/bash kill $(ps faux | grep server.js | grep node | cut -f2 -d' ') cd /var/www/chatbot date >> chatbot.log nohup npm start & When I execute it as user www-data on the console everything works fine. Unfortunately this is not the case when running from Jenkins. Jenkins executes the command, receives the following output and then stalls until I kill the build manually. How can I force Jenkins to disconnect and consider the build a success after executing server-neustart? SSH: EXEC: STDOUT/STDERR from command [/usr/local/bin/server-neustart] ... > NetFed-Chatbot@0.1.1 start /var/www/chatbot > node server.js Yours Sincerely Stefan -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5ca619de-71d9-466d-9207-606c05955155%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.