Questions tagged [nohup]

68 questions
0
votes
1 answer

How to use nohup properly within an ssh session invoked by gitlab-runner?

I use gitlab runner's ssh executor to access an embedded device via ssh. I want to run a script there. Basically the script invokes an upgrade routine on the device using dbus. Simple enough, isn't it? #!/bin/bash dbus-send --session --print-reply…
0
votes
2 answers

Saving PID as part of the filename of nohup's output file

I want to save the PID of a nohup process as part of the name of nohup's generated output file. This is going in the right direction, but only works if the process with it's ID is already settled, i.e. only works at the next line. That means that it…
colidyre
  • 137
  • 7
0
votes
3 answers

nohup daemon process dies when terminal is close

I'm trying to copy the contents of a remote server to my local computer. Here is the command that I'm using: nohup rsync -chavP -e 'ssh -p 23' --stats user@ipaddress:~/great/stuff /volume1/code > ~/rsynclog & My understanding of the above command…
melchoir55
  • 101
  • 3
0
votes
1 answer

How do I run a program as another user properly with "nohup" and "&" in bash

I have been learning bash and linux administration over the past few months while producing more and more code that needs to run in the background. I would ideally like to run my development system closer to where it would be in production in order…
0
votes
1 answer

Understanding how to foreground a background process correctly

I am wanting to background a long running script, which I know I can do using the following: nohup ./install.sh &>/dev/null & However, I also realize that if I leave that session, I can no longer see it running using job, since it would be running…
Zed Said
  • 717
  • 6
  • 14
  • 25
0
votes
2 answers

How do I install nohup on a QNAP TVS-871T

I'm trying to setup a background job in a QNAP TVS-871T. It doesn't come with nohup pre-installed. I've found multiple references to install it on a QNAP device (e.g.…
Ben
  • 367
  • 3
  • 21
0
votes
0 answers

Nohup at boot in Debian

I have a Debian server with kernel version 2.6.26-2-686. At boot time it reaches a line `nohup: ignoring input and appending output to 'nohup.out' and then it stops. I can't get to the command prompt. I can't use a remote terminal because the…
0
votes
4 answers

Script started with nohup get killed when leave terminal

I need to run some python scripts with infinite loop on ubuntu server (Amazon EC2). And I really like the idea to use nohup as it is simple and I can have output.out log file. I start script like nohup script.py > output.out & The process get…
Arthur Zangiev
  • 101
  • 1
  • 1
0
votes
1 answer

Why c app is not writing to nohup.out

I wrote a simple master-slave failover setup for my two servers using c, running redhat6 which using udp heartbeats to monitor one another. In my app I'm printing out some information like, heartbeat received, server is healthy and some more stuff.…
ivcode
  • 1,062
  • 1
  • 9
  • 13
0
votes
1 answer

How to run putty with -m command line *and* get log?

I'd like to launch putty and run my script automatically, it works, but I can't save the logs (I need them to debug)! The way I call putty: "D:\Some-Path\putty\PUTTY.EXE" -t -load "Server - 111.22.33.444" -l root -m "D:\Cmd\param-1.sh" param-1.sh…
TheDude
  • 109
  • 2
  • 10
0
votes
1 answer

Rotating a nohup.out logfile

There are a few questions on how to rotate the output file generated by nohup. Most of the answers say to use logrotate with the copytruncate option. However this does not actually work -- when the rotation occurs, it creates the rotated logfiles…
Miral
  • 169
  • 1
  • 7
0
votes
1 answer

nohup.out is no longer being appended

I have a Ubuntu Linux ec2 instance that's running on AWS. I used the following command nohup php script.php so that when I disconnect from the instance with SSH, it still runs. The script contains a huge loop and will take about 4 days to…
Lance
  • 143
  • 1
  • 7
0
votes
2 answers

How to kill the process using the name of the program instead of PID?

I started my Python program in the background using nohup as mentioned below - nohup zook.py & Now I am trying to kill this process so I did the ps command as mentioned below root@phxdbx1145:/home/david/zook# ps ax | grep zook.py 16352 pts/6 S+…
arsenal
  • 217
  • 1
  • 4
  • 11
0
votes
4 answers

nohup command on Mac

I connect to some mac machine using SSH and run a command similar to: nohup /var/root/install.sh param1 param2 /var/root/vvv.out 2>&1 & echo '' ; echo ERROR_CODE:$? It seems to work fine, but if I close the session in the middle of the…
Vic
  • 95
  • 3
  • 13
0
votes
2 answers

How to run at boot a program that will run until shutdown

I am using Debian (6) and need to run at boot an X server (without a login manager). What is the best way to do this? From what I've read, the usual way is to have a script in /etc/init.d. I created a script that runs xinit /usr/bin/xterm -- :0 vt7…