Copy and save the shell script below in your xTuple Connect Batch Manager admin user's home directory as startbm.command
. This is the shell script that will be launched when the admin user is automatically logged in.
You will need to edit the first six parameters to match your environment.
#!/bin/bash # Autostart of BatchManager for OSX # Name this file 'startbm.command' and should be located under your users home directory # To start the BatchManager in OSX upon Login, create a Login Item for a user that will # login upon system startup. # Navigate to System -> Accounts -> Login Items, and add 'startbm.command' to the list. ################################################### ## EDIT NEXT SIX LINES TO MATCH YOUR ENVIRONMENT ## ################################################### BM_PATH='/Applications/BatchManager.app/Contents/MacOS/' DB_SERVER='192.168.0.100' DB_NAME='mydemodb' DB_PORT='5432' DB_USERNAME='myuser' DB_PASSWD='mypassword' ################################# ## DO NOT EDIT BELOW THIS LINE ## ################################# DB_URL=psql://$DB_SERVER/$DB_NAME:$DB_PORT $BM_PATH/BatchManager -databaseURL=$DB_URL -username=$DB_USERNAME -passwd=$DB_PASSWD & exit
Once the shell script has been modified and saved to the correct location, your next step is to attach the script to the admin user's login items. To attach the script to the admin user's login items, follow these steps:
Select the "System Preferences" icon
Select the "Accounts" option under the System section
Then, set up the user for automatic login, as shown in the following screen:
Finally, follow these last steps:
Highlight the user in the "My Account" column
Select the "Login Items" tab
Select the "+" symbol
Then browse to locate and then add the startbm.command
file from the user's home directory
The following screen illustrates this process:
Once you have completed these steps, you are done! The xTuple Connect Batch Manager will now restart automatically whenever the machine it is running on is rebooted.