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.
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?