Bitcoin Forum
December 06, 2016, 12:29:23 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Running a script in the background that will run even when logged off  (Read 1138 times)
mackminer
Sr. Member
****
Offline Offline

Activity: 335



View Profile
October 07, 2011, 10:44:51 PM
 #1

Hi there,
I have a script running on Linuxcoin that monitors the temps on my cards where it will shut it down should it exceed my set temp.

At the moment I'm running it in the terminal I'm logged into but I'm afraid that I'll lose my ssh connection or something.

Any ideas?

Thanks a mill.

1tpXGRKnzaM42B1A1NZhmsX3tngwkqVEf
1481027363
Hero Member
*
Offline Offline

Posts: 1481027363

View Profile Personal Message (Offline)

Ignore
1481027363
Reply with quote  #2

1481027363
Report to moderator
1481027363
Hero Member
*
Offline Offline

Posts: 1481027363

View Profile Personal Message (Offline)

Ignore
1481027363
Reply with quote  #2

1481027363
Report to moderator
1481027363
Hero Member
*
Offline Offline

Posts: 1481027363

View Profile Personal Message (Offline)

Ignore
1481027363
Reply with quote  #2

1481027363
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481027363
Hero Member
*
Offline Offline

Posts: 1481027363

View Profile Personal Message (Offline)

Ignore
1481027363
Reply with quote  #2

1481027363
Report to moderator
1481027363
Hero Member
*
Offline Offline

Posts: 1481027363

View Profile Personal Message (Offline)

Ignore
1481027363
Reply with quote  #2

1481027363
Report to moderator
teek
Hero Member
*****
Offline Offline

Activity: 664


ASICMINER Official Canadian Distributor


View Profile
October 07, 2011, 10:48:40 PM
 #2

You could use screen if you want to re-connect to the output.

or put an "&" at the end of your command and it will run it as a background process


ie:  # ./myscript &


mackminer
Sr. Member
****
Offline Offline

Activity: 335



View Profile
October 07, 2011, 11:07:03 PM
 #3

Thanks for that. If I put the & after can I see if it's working are check the output every now and again?

Not sure how to use screen. I set it up once and then logged off. I tried to look at the screen sessions and wasn't there seemingly.  Huh

1tpXGRKnzaM42B1A1NZhmsX3tngwkqVEf
teek
Hero Member
*****
Offline Offline

Activity: 664


ASICMINER Official Canadian Distributor


View Profile
October 07, 2011, 11:09:42 PM
 #4

to use screen just run screen, then run the app you want to use normally (no &)

when you reconnect to the box via ssh, do a screen -r to grab your session back


mackminer
Sr. Member
****
Offline Offline

Activity: 335



View Profile
October 07, 2011, 11:41:46 PM
 #5

Brilliant thanks.

1tpXGRKnzaM42B1A1NZhmsX3tngwkqVEf
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!