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 |
Use su user -c "script start"
|
what do you mean by "script start"
could you detail a bit please? |
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 |
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? |
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. |
ok so I did that but it tells me this :
bash: /root/.bashrc: Permission denied what did I do wrong? :/ |
All times are GMT -5. The time now is 03:13 AM. |