LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-27-2014, 12:46 PM   #1
d3249
LQ Newbie
 
Registered: Dec 2010
Location: México
Distribution: Debian
Posts: 28

Rep: Reputation: 3
Problem with init script and screen


Ok, this is so weird I don't even know where to put this.

Recently I bought some low cost bitcoin miners. They are installed in my PC which is not running 24/7 (I know this is not efficient, but that's not the point).

So I made an easy script to start bfgminer inside a detached screen session, for future monitoring.

The problem is that, even though the script starts smoothly, I just can't find any screen session.

Digging with ps this is what I get:

Code:
root      1398  0.0  0.0  24208  1264 ?        Ss   ago25   0:08 SCREEN -S bfgminer -d -m bfgminer -S all -o stratum+tcp://us1.ghash.io:3333 -u <USER> -p <PASSWD>
As you can see the command is uppercase. As I said, I have no idea of what happened.

Any sugestions?

This is my script
Code:
#!/bin/bash

### BEGIN INIT INFO
# Provides:          bfgminer + screen
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# X-Start-Before:    kdm gdm3 xdm lightdm
# X-Stop-After:      kdm gdm3 xdm lightdm
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Sets up bfgminer to bitcoin minning
# Description:       Sets up bfgminer to bitcoin minning with given params inside a screen session
#                    
### END INIT INFO

server="stratum+tcp://us1.ghash.io:3333"
user="user"
passwd="passwd"

screen -S bfgminer -d -m bfgminer -S all -o $server -u $user -p $passwd
 
Old 08-27-2014, 01:49 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
The uppercase SCREEN is not the problem, it seems to just do that

What happens when you try to find the screen session? Are you root?
 
Old 08-27-2014, 02:08 PM   #3
d3249
LQ Newbie
 
Registered: Dec 2010
Location: México
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by AlucardZero View Post
The uppercase SCREEN is not the problem, it seems to just do that

What happens when you try to find the screen session? Are you root?
Yes, I'm root. And there is no session. I get this message both as root and as regular user.

Code:
screen -ls
No Sockets found in /var/run/screen/S-root.
Thanks for the answer.

Last edited by d3249; 08-27-2014 at 02:09 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] why init script cannot source init tools unless session root linuxecho Linux - Newbie 8 02-17-2014 05:17 PM
Start Samba at boot up problem on FC11. init script? need_rto Linux - Software 2 02-18-2010 09:39 PM
Init script in /etc/init.d does not start at boot tdnnash25 Linux - Server 4 12-18-2009 04:40 PM
Init script problem danaketh Debian 5 03-11-2008 08:16 AM
Problem with init script for openssh kaplan71 Linux - Networking 1 04-28-2004 01:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration