[SOLVED] Re: Execute startup script as <user>

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mats-Gøran Karlsen
Date: Sunday, April 11, 2010 - 5:10 am

On 10. apr. 2010, at 17.16, Christian Weisgerber wrote:

as


The problem seemed to be related to another execution of a script  in rc.local
which needed to be executed and put into
the backround in order for the startup process to continue reading rc.local:

------snippet
if [ -f /etc/coherence/coherence.conf ]; then
       if [ X"${coherence}" = X"YES" -a -x /usr/local/bin/coherence ]; then
         # wrontg! echo -n ' coherence';     nohup /usr/local/bin/coherence -c
/etc/coherence/coherence.conf > /dev/null 2>& 1 &
	 echo -n ' coherence';     nohup /usr/local/bin/coherence -c
/etc/coherence/coherence.conf > /dev/null 2>& 1 &
       fi
fi
------

After figuring this out i ditched my noobish transmission startup script and
went about doing things as obviously are meant to be done:

moved my rc.conf changes into rc.conf.local and changed to the following in
rc.local

---snippet

if [ -f /etc/transmission/rc.transmission ]; then
       if [ X"${transmission}" = X"YES" -a -x
/usr/local/bin/transmission-daemon ]; then
          echo -n ' transmission'; su -l transmission -c
"/usr/local/bin/transmission-daemon \
                                        -g
/home/transmission/.config/transmission-daemon"
       fi
fi

-------


Thanks for all the helpful input guys:)


----
Mats
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Execute startup script as &lt;user&gt;, Mats-Gøran Karlsen, (Sat Apr 10, 3:38 am)
Re: Execute startup script as &lt;user&gt;, Jussi Peltola, (Sat Apr 10, 4:34 am)
Re: Execute startup script as &lt;user&gt;, Owain Ainsworth, (Sat Apr 10, 7:11 am)
Re: Execute startup script as &lt;user&gt;, Christian Weisgerber, (Sat Apr 10, 8:16 am)
Re: Execute startup script as &lt;user&gt;, Abel Abraham Camaril ..., (Sat Apr 10, 8:27 pm)
[SOLVED] Re: Execute startup script as <user>, Mats-Gøran Karlsen, (Sun Apr 11, 5:10 am)