HOW TO: create a startup item easily for OS X Tiger

When the above is of interest to you it is most likely that you already read the following article I wrote for Servoy Magazine http://www.servoymagazine.com/home/2004/11/article_how_to_.html. However, that is pretty complicated… Some succeeded and some failed using the tip.

Since Tiger the creation of startup items changed and should be more simple. I explicitely use the word should since it is yet another thing to learn :? . However, there is light in the darkness…

Because the logicboard of my server said goodbye to me 2 weeks ago I decided to use this mishap to rearrange my server and make sure all services (sorry for the word you OS X nerds :) ) work correct.

A few months ago I had run into an application that could help me to create startup items and BINGO. Creating a startup item with this tool for OS X Tiger is really easy… The name of the app is Lingon, it is a sourceforge project by Peter Borg and you can get it at http://lingon.sourceforge.net/. Go get it and try it. It is really great… I created a startup item for Servoy Server within 2 minutes :D

Hope you can benefit from this tip

Great tip, Marcel!

IT2Be:
A few months ago I had run into an application that could help me to create startup items and BINGO. Creating a startup item with this tool for OS X Tiger is really easy… The name of the app is Lingon, it is a sourceforge project by Peter Borg and you can get it at http://lingon.sourceforge.net/. Go get it and try it. It is really great… I created a startup item for Servoy Server within 2 minutes :smiley:

Hope you can benefit from this tip

If it’s as good as Peter Borg’s other product (Smultron, my favourite text editor), I’m sure it is an excellent software.

Thanks for the tip, Marcel

Any more details? We have tried Smultron, but can’t get Servoy 3.0 to start

Had a problem with the servoy_server.sh file, fixed now.
The lingon bit worked fine.

Sorry got it mixed up with Smultron – it is all Swedish to me!

swingman:
Great tip, Marcel!

Did you manage to get this to start with Sybase as the repository ? In my attempts unless developer is started first OR you can get Sybase to start first, then delay a bit the process fails !

If there is any chance you could post your process it would be super helpful for those of us with less technical expertise !!

Cheers
Gordon

Hi Marcel
I have tried to impliment your sugesstions to start the server on mac, however i still only get the database starting and not the server.
Can you give me any other things to do or check out?
Thanks
Marcus

IT2Be:
When the above is of interest to you it is most likely that you already read the following article I wrote for Servoy Magazine http://www.servoymagazine.com/home/2004/11/article_how_to_.html. However, that is pretty complicated… Some succeeded and some failed using the tip.

Since Tiger the creation of startup items changed and should be more simple. I explicitely use the word should since it is yet another thing to learn :? . However, there is light in the darkness…

Because the logicboard of my server said goodbye to me 2 weeks ago I decided to use this mishap to rearrange my server and make sure all services (sorry for the word you OS X nerds :) ) work correct.

A few months ago I had run into an application that could help me to create startup items and BINGO. Creating a startup item with this tool for OS X Tiger is really easy… The name of the app is Lingon, it is a sourceforge project by Peter Borg and you can get it at http://lingon.sourceforge.net/. Go get it and try it. It is really great… I created a startup item for Servoy Server within 2 minutes :D

Hope you can benefit from this tip

Nope, it is a year ago and I use another server now.
Maybe somebody else?

It’s quite easy. Use launchdaemon, there are some GUI tools for that or you can do it by command line like I like to do.

Create this file in /Library/LaunchAgents

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>servoyserver</string>
        <key>OnDemand</key>
        <false/>
        <key>ProgramArguments</key>
        <array>
                <string>/Applications/Servoy/servoy_server.sh</string>
        </array>
</dict>
</plist>

If you use iAnywhere make sure to start it in servoy_server.sh too by adding this to the top:

cd /Applications/Servoy; export DYLD_LIBRARY_PATH=/Applications/Servoy/sybase_db; /Applications/Servoy/sybase_db/dbsrv9 @/Applications/Servoy/sybase_db/sybase.config&

Adjust the 9 above if you are using 10

Then install the agent by typing:

launchctl load servoy.plist

adjust name of servoy.plist depending on how you called the file created in step 1 and if necessary add path to it.

Hi Jan
I tried your way and get the following messages in terminal:
launchctl: propertyList is NULL
launchctl: no plist was returned for: servoy.plist
launchctl: no plist was returned for: servoy.plist
nothing found to load

Thanks for assistance
Regards
Marcus

jaleman:
It’s quite easy. Use launchdaemon, there are some GUI tools for that or you can do it by command line like I like to do.

Create this file in /Library/LaunchAgents

<?xml version="1.0" encoding="UTF-8"?>
Label servoyserver OnDemand ProgramArguments /Applications/Servoy/servoy_server.sh > ``` > > > > If you use iAnywhere make sure to start it in servoy_server.sh too by adding this to the top: > > > > ``` > cd /Applications/Servoy; export DYLD_LIBRARY_PATH=/Applications/Servoy/sybase_db; /Applications/Servoy/sybase_db/dbsrv9 @/Applications/Servoy/sybase_db/sybase.config& > ``` > > > > Adjust the 9 above if you are using 10 > > Then install the agent by typing: > > launchctl load servoy.plist > > adjust name of servoy.plist depending on how you called the file created in step 1 and if necessary add path to it.

Where did you create the file?
What subdir are you in when you type the command?
what command do you exactly type?

I created the file in /Library/LaunchAgents
I typed the commend in the same directory
I cut and paste the command you gave: launchctl load servoy.plist

jaleman:
Where did you create the file?
What subdir are you in when you type the command?
what command do you exactly type?

Sounds like you have made a typo in the file then. Eg if you forget to close one of the xml tags you would expect that output. I’ve tried it by pasting my example above on my local mac and it works perfect.

Hi Jan

Will check for typos.

I installed 3.5 yesterday and tried to get the server to start witht he guidlines of this thred. This did not work.
I then uninstalled this and installed 3.1.6 and running servoy_server.sh from the terminal now works fine.
Did something change in 3.5 requiring a different setup?

On another note i have not been able to setup a service on windows as well.I followed the server docs guidlines and cannot get it working.
Do you have any recommedations on this?

Thanks

jaleman:
Sounds like you have made a typo in the file then. Eg if you forget to close one of the xml tags you would expect that output. I’ve tried it by pasting my example above on my local mac and it works perfect.

The only difference between 3.1 and 3.5 is the database. Make sure to have a 3.5 final or you might be mixing an ASA 9 and 10 engine. The instructions I have posted in this thread work guaranteed with 3.1 and 3.5 on any proper Mac with 10.4 or higher.

For your windows service problems the same applies: WHAT exactly do you do? What errors do you get? What windows? What Java etc? Please note that we test Servoy extensively before we put a version out on all different types of systems and it really helps if you are detailed if a problem occurrs so we can help you to fix it!

When you are working with Windows, Servoy 3.5 and Sybase 10 and you created services for Servoy and Sybase they don’t ‘run’ out of the box anymore.

With earlier versions the service name (Adaptive Server Anywhere) for Sybase was alphabatically positioned before Servoy (Servoy Application Service). Since Sybase is needed for Servoy to run (when you use sybase as your friend).

The new Sybase 10 has another service name (SQL Anywhere) when you create it using Sybase Cental and comes after the Servoy services.

I took a shortcut and, with the Servoy docs in my hands, I recreated the name for the Servoy services to ‘Windows Servoy Service’ and it starts well again.

IT2Be:
When you are working with Windows, Servoy 3.5 and Sybase 10 and you created services for Servoy and Sybase they don’t ‘run’ out of the box anymore.

With earlier versions the service name (Adaptive Server Anywhere) for Sybase was alphabatically positioned before Servoy (Servoy Application Service). Since Sybase is needed for Servoy to run (when you use sybase as your friend).

The new Sybase 10 has another service name (SQL Anywhere) when you create it using Sybase Cental and comes after the Servoy services.

I took a shortcut and, with the Servoy docs in my hands, I recreated the name for the Servoy services to ‘Windows Servoy Service’ and it starts well again.

Excellent point but you can also set the dependency (as pointed out in our documentation) to make sure sybase runs. In fact you should do that anyway: if you have a large database the alphabet coincidence trick will not work anymore as sybase will not be up by the time it starts firing up servoy. If you set the dependency it will wait starting Servoy until sybase says: I’m READY go for it (the syntax might be slightly different as I think they talk binary to each other)

Excellent point but you can also set the dependency

I know, and I realized that I would be highly dependent of the startup time of the database.
In fact that is why I called it a shortcut.
Issue was for me however that I could not get the dependency thing going. For whatever reason it did not work. Can’t remember why though :(