[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shell startup script



Hum, You tried start the script with nohup?

Hugs,
Allan Carvalho

2010/4/12 Leonardo Carneiro - Veltrac <lscarneiro@veltrac.com.br>:
> Hi Allan and everyone. Tks for your tips, but i have already done that. The
> problem happens when i have the need to manually run the script, like
> /etc/init.d/redmine start.
>
>
>
> Allan Carvalho wrote:
>>
>> Put your script on the /etc/init.d directory, so, run the update-rc.d
>> with the name of your script, this command will put the script at the
>> startup of the system.
>>
>> Hugs,
>> Allan Carvalho
>>
>> 2010/4/12 Leonardo Carneiro - Veltrac <lscarneiro@veltrac.com.br>:
>>
>>>
>>> Hi, i did it a small shell script to start one service at boot:
>>>
>>>  #!/bin/bash
>>>
>>>  case "$1" in
>>>      start)
>>>          echo "Starting Redmine"
>>>          /etc/init.d/postgresql-8.3 start
>>>          ruby /opt/redmine/script/server -e production &
>>>          echo $! > /tmp/redmine.pid
>>>      ;;
>>>      stop)
>>>          echo "Shutting down Redmine."
>>>          kill -9 `cat /tmp/redmine.pid`
>>>          rm /tmp/redmine.pid
>>>      ;;
>>>      restart)
>>>          $0 stop
>>>          $0 start
>>>      ;;
>>>      *)
>>>          echo "Usage: $0 {start|stop|restart}"
>>>          exit 1
>>>  esac
>>>  exit 0
>>>
>>>
>>> If i run the command to start the service and close my session, the
>>> program
>>> stops. How can i make the program ( ruby /opt/redmine/script/server -e
>>> production & ) to run even after i close my session? Tks in advance.
>>>
>>> --
>>> Leonardo Carneiro
>>>
>>>
>>> --
>>> To UNSUBSCRIBE, email to debian-user-portuguese-REQUEST@lists.debian.org
>>> with a subject of "unsubscribe". Trouble? Contact
>>> listmaster@lists.debian.org
>>> Archive: [🔎] 4BC31A9D.8060403@veltrac.com.br">http://lists.debian.org/[🔎] 4BC31A9D.8060403@veltrac.com.br
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-portuguese-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
> Archive: [🔎] 4BC31E03.4080904@veltrac.com.br">http://lists.debian.org/[🔎] 4BC31E03.4080904@veltrac.com.br
>
>


Reply to: