VectorLinux
August 23, 2014, 05:05:29 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: [ SOLVED ] start up script  (Read 1194 times)
Deach
Vectorite
***
Posts: 168


« on: January 30, 2010, 09:21:12 am »

I'd like to run the following at startup
Code:
syndaemon -i 1 -d

I placed the following into /etc/rc.d and called it "rc.syndaemon" 
Code:
#!/bin/bash
sleep 5
syndaemon -i 1 -d

I'ts not working can anybody tell me why or what I need to do please?  Thanks.

PS...If there was a way to do that before the login screen that would be even better.....
« Last Edit: January 31, 2010, 02:27:34 am by Deach » Logged

Inspiron 4000 Laptop, VL 6.0  600 mhz; 384 ram : Inspiron1100 VL 6.0
Inspiron B120 & B130 Laptop, VL 6.0  1. 4& 1.5  ghz; 1gig ram
IBM Thinkpad Laptop, VL 6.0  1.5 ghz;  1 gig ram
OU812
Vectorite
***
Posts: 156



« Reply #1 on: January 30, 2010, 09:29:44 am »

I'm assuming you remembered to change the permissions on your bash script so that it's executable.

john
Logged
Deach
Vectorite
***
Posts: 168


« Reply #2 on: January 30, 2010, 09:37:51 am »

is that "run as program" with the properties tab?  That was the only thing I wasn't sure about but yes, I have that checked.  If there's another change (came from debian here sorry) I'm not aware of it.
Thanks

The permissions are Owner "root"
access "read and write"
group "root"
access "read only"
Others "read only"
Allow this file to run as program is checked.
« Last Edit: January 30, 2010, 10:04:58 am by Deach » Logged

Inspiron 4000 Laptop, VL 6.0  600 mhz; 384 ram : Inspiron1100 VL 6.0
Inspiron B120 & B130 Laptop, VL 6.0  1. 4& 1.5  ghz; 1gig ram
IBM Thinkpad Laptop, VL 6.0  1.5 ghz;  1 gig ram
toothandnail
Tester
Vectorian
****
Posts: 2527


« Reply #3 on: January 30, 2010, 01:22:05 pm »

For that type of program, I would normally edit (as root, of course) /etc/rc.d/rc.local and add the commands to the end of it. For instance, to set the hard drive parameters I want, and to run tmpreaper to clear old files from /tmp, I have this at the bottom of /etc/rc.d/rc.local:

Code:
/sbin/hdparm -B 254 /dev/sda
/usr/sbin/tmpreaper 24 /tmp

Have you tried that?

Paul.
Logged
Deach
Vectorite
***
Posts: 168


« Reply #4 on: January 30, 2010, 02:30:04 pm »

EDIT 2:  Ok I got it.  I was having a moment and just had a typo.  Honestly the command will work either way by the rc.syndaemon script, or.....putting it in rc.local.  Thanks guys.....

EDIT:  I guess it's at least sort of working now.  I did put it at the end of rc.local under where it says to add more here.  At least as I type this it's not jumping all over the place.  Thanks again for all of the help you folks have given me. 

ummmmm, NO...... Embarrassed  I'm not exactly sure how to put that there.  Would it just be the command I want or the script or what? 
« Last Edit: January 30, 2010, 10:53:28 pm by Deach » Logged

Inspiron 4000 Laptop, VL 6.0  600 mhz; 384 ram : Inspiron1100 VL 6.0
Inspiron B120 & B130 Laptop, VL 6.0  1. 4& 1.5  ghz; 1gig ram
IBM Thinkpad Laptop, VL 6.0  1.5 ghz;  1 gig ram
toothandnail
Tester
Vectorian
****
Posts: 2527


« Reply #5 on: January 30, 2010, 11:08:12 pm »

ummmmm, NO...... Embarrassed  I'm not exactly sure how to put that there.  Would it just be the command I want or the script or what? 

You could do either, but given that its really only two commands, I'd stick both of them in the bottom of rc.local, so just add this:

Code:
sleep 5
syndaemon -i 1 -d

That should work.....

Paul.
Logged
Deach
Vectorite
***
Posts: 168


« Reply #6 on: January 30, 2010, 11:25:55 pm »

I've actually eliminated the "sleep 5" for right now.  Do you think that is better than just making the rc.syndaemon file in rc.d?  I'm still sort of testing it, in my old distro I needed that sleep 5 or it wouldn't work.  Here I'm still checking both ways yet.  Thanks.

Edit:  I wanted to add this is a short script for disabling the touch pad while typing.  I know some distro's have various "things" that do that but this is what Ive found works the best for me. I just was getting tired of typing the command in terminal every time after start up...Thanks I'm gonna keep testing both with the sleep command and without it.  Thanks a million guys.
« Last Edit: January 30, 2010, 11:33:30 pm by Deach » Logged

Inspiron 4000 Laptop, VL 6.0  600 mhz; 384 ram : Inspiron1100 VL 6.0
Inspiron B120 & B130 Laptop, VL 6.0  1. 4& 1.5  ghz; 1gig ram
IBM Thinkpad Laptop, VL 6.0  1.5 ghz;  1 gig ram
Deach
Vectorite
***
Posts: 168


« Reply #7 on: January 31, 2010, 02:43:38 am »

ummmmm, NO...... Embarrassed  I'm not exactly sure how to put that there.  Would it just be the command I want or the script or what? 

You could do either, but given that its really only two commands, I'd stick both of them in the bottom of rc.local, so just add this:

Code:
sleep 5
syndaemon -i 1 -d

That should work.....

Paul.

Thanks Paul,  did it your way and it seems to work better.  I have left the sleep 5 in the command. 
Logged

Inspiron 4000 Laptop, VL 6.0  600 mhz; 384 ram : Inspiron1100 VL 6.0
Inspiron B120 & B130 Laptop, VL 6.0  1. 4& 1.5  ghz; 1gig ram
IBM Thinkpad Laptop, VL 6.0  1.5 ghz;  1 gig ram
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!