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 - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-28-2004, 12:57 PM   #1
st3reo
Member
 
Registered: Nov 2004
Location: East Side
Distribution: Red Hat
Posts: 49

Rep: Reputation: 15
startup stuff


Hey,

How do I add to startup things that I want to run from a shell.
Cause what I add in rc.local is run as root. and I want some programs to run from a shell, and I want them to automaticly start in case of reboot.

Can anyone help?
Thanks
 
Old 11-28-2004, 01:17 PM   #2
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
Use su user -c "script start"
 
Old 11-28-2004, 01:30 PM   #3
st3reo
Member
 
Registered: Nov 2004
Location: East Side
Distribution: Red Hat
Posts: 49

Original Poster
Rep: Reputation: 15
what do you mean by "script start"

could you detail a bit please?
 
Old 11-28-2004, 03:18 PM   #4
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
If you want a script to be run as a different user at boot time make a script that executes a script. Here is how I execute vncserver as my user in Debian. Put this script in rc.local

vi vncscript

#! bin/bash
su myuser -c "vncserver -localhost"


:wq

chmod 755 vncscript
 
Old 11-28-2004, 03:53 PM   #5
st3reo
Member
 
Registered: Nov 2004
Location: East Side
Distribution: Red Hat
Posts: 49

Original Poster
Rep: Reputation: 15
I'm still not sure I understand

So I have an IRC server on a user and in case of reboot I want it to auto start
Usualy to start the server I have to go to /home/user/ircu2.10.11.07/ircd and there execute ./ircd

So how would a script that does that look..ot what do I have to do?
 
Old 11-28-2004, 05:08 PM   #6
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
You could just add that line to rc.local

/home/user/ircu2.10.11.07/ircd/ircd

Or if this daemon can run as a different user you could make a simple script.
vi ircd.sh

#! /bin/bash

su user -c /home/user/ircu2.10.11.07/ircd/ircd


Then place this in /etc/rc.local
This is the most basic script. You can get as complex as you want.
 
Old 11-30-2004, 06:07 AM   #7
st3reo
Member
 
Registered: Nov 2004
Location: East Side
Distribution: Red Hat
Posts: 49

Original Poster
Rep: Reputation: 15
ok so I did that but it tells me this :

bash: /root/.bashrc: Permission denied

what did I do wrong? :/
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My Redhat Linux 9 machine won't startup but gives a startup error" njugs79 Linux - Newbie 2 03-23-2005 12:50 AM
why does eth01 fail on startup and delay startup? infantpenguin Linux - Newbie 3 01-28-2005 10:45 AM
When installing new stuff in suse 9.1, do you uninstall old stuff first? randon SUSE / openSUSE 1 12-25-2004 04:37 PM
make stuff run at startup (in a seperate console) Red Squirrel Linux - Newbie 7 03-04-2004 10:25 PM
killing stuff at startup phant0m Linux - Software 1 08-15-2003 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:00 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