You are not logged in.

#1 2010-09-21 23:35:30

Alexbit
Member
From: Italy
Registered: 2010-06-02
Posts: 60

How can I start a bounce of program at startup

Hi all,
I know that it can appear a very newbie question but... that's it!

I need to fireup at start up the following:

/opt/PostgresPlus/8.3/bin/./postgres
odccm
sync-engine -d
synce-kpm -i

odccm need a root account to start so I've think to put it under rc.local
Now I start separately postgres and sync* with two sh file.
The problem is that I always get two terminal windows at startup that remain on top shown postgres & synce-kpm activities.
Where I've to put those commands to let they startup and work silently in background?

Thanks for your precious courtesy!
Ale

Offline

#2 2010-09-21 23:41:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How can I start a bounce of program at startup

Maybe you can redirect the output to /dev/null or a log file?
Appending a '&' starts the app in the background:

some_app &

Last edited by karol (2010-09-21 23:43:53)

Offline

#3 2010-09-22 06:17:43

Alexbit
Member
From: Italy
Registered: 2010-06-02
Posts: 60

Re: How can I start a bounce of program at startup

karol wrote:

Maybe you can redirect the output to /dev/null or a log file?
Appending a '&' starts the app in the background:

some_app &

Well, the best thing is that system start those command silently at startup and put the output of each into a log file but...
I don't know can I do that (I need a step by step like guide... :-( )

Can you help me?
I've put odccm (who need root grant) under rc.local and it seems to work.
The above command list can be start as unprivileged user.

Thank you

Offline

#4 2010-09-22 06:32:38

ebirtaid
Member
From: USA
Registered: 2007-11-18
Posts: 52

Re: How can I start a bounce of program at startup

you can have them output to a log with, for instance

odccm &> /path/to/logfile

run the other apps with a line in rc.local

su - youruser -c appname

Last edited by ebirtaid (2010-09-22 06:33:50)

Offline

#5 2010-09-22 07:14:58

Alexbit
Member
From: Italy
Registered: 2010-06-02
Posts: 60

Re: How can I start a bounce of program at startup

great!
This is my modified rc.local:

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#

# PostgresPlus 8.3 Standard Server startup #
su - arcuser -c /opt/PostgresPlus/8.3/bin/./postgres &> /home/arcuser/Downloads/Settings/custom_log_from_rc_local/postgresplus.log

# Windows Mobile Sync Apps #
odccm &> /home/arcuser/Downloads/Settings/custom_log_from_rc_local/odccm.log
su - arcuser -c sync-engine &> /home/arcuser/Downloads/Settings/custom_log_from_rc_local/sync-engine.log
su - arcuser -c synce-kpm &> /home/arcuser/Downloads/Settings/custom_log_from_rc_local/synce-kpm.log

Now, I only have this error (got from odccm.log)

** ERROR **:
Failed to get bus name: Connection ":1.25" is not allowed to own the service "org.synce.odccm" due to security policies in the configuration file
aborting...

Last edited by Alexbit (2010-09-22 07:51:06)

Offline

Board footer

Powered by FluxBB