
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I followed this post to create a start up script so startExecServer.sh would be executed upon system restart.
http://askubuntu.com/questions/228304/how-do-i-run-a-script-at-start-up
I created 'start-silk' in /etc/init.d/ and chmod as the instruction.
#!/bin/sh
/usr/local/LinuxExecServer-16.0.0/startExecServer.sh
When I tried to launch start-silk manually by type: ./start-silk, I got this error:
/usr/local/LinuxExecServer-16.0.0/startExecServer.sh: 1: /usr/local/LinuxExecServer-16.0.0/startExecServer.sh: cannot open ./execServer.options: No such file
Error: Could not find or load main class com.segue.scc.internal.execserver.ExecServer
I can go to /usr/local/LinuxExecServer-16.0.0 and launch ./startExecServer.sh successfully
ExecServer was installed on Ubuntu 14.04.3 LTS
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Jason,
The way I got this working was through the start-up application feature in Ubuntu.
Once this is open then add a new start-up application, using the command for starting your shell script,
This will now run this shell script on every start of Ubuntu.
The script itself contains the following information
#!/bin/sh
echo "$(date) About to run Execution Server"
cd /home/matt/LinuxExecServer-16.0.0
sh ./startExecServer.sh
echo "$(date) Execution Server launched..., process list is $(ps -ef)"
This will change the directory to the location of the startExecServer.sh script and execute the file, logging some information about the processes that have started.
Every time you start your Ubuntu Execution Server now this will also start with the machine and start your execution server.
Regards,
Matthew

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi jdt2007,
This issue is caused whenever you try to run the script from a command prompt and you are outside the directory that the file is in.
The shell script is looking for these files locally as in ./execServer.options, so you will need to run the script from this directory as well, so that it can recognise the files.
For example if I do this:
cd ~
sh '/home/matt/Downloads/LinuxExecServer-16.0.0/startExecServer.sh'
This will return the same error as yourself:
Make sure that you are running the script from the correct directory on start-up or modify the startExecServer.sh to include full paths to the option set and jar files.
This should resolve your issues.
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks Matthew for pointing that out!
I created a symbolic link using this command: ln -s /usr/local/LinuxExecServer-16.0.0/ ~/LinuxExecServer
LinuxExecServer is created at '/home/silkadmin/' directory
Then update my script to:
----
#!/bin/sh
cd ~/LinuxExecServer
./startExecServer.sh
---
When I run this manually, it works. But when it runs upon restart, it can't 'cd ~/LinuxExecServer'. (I output the log into a file to check the error).
Any idea?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Jason,
The way I got this working was through the start-up application feature in Ubuntu.
Once this is open then add a new start-up application, using the command for starting your shell script,
This will now run this shell script on every start of Ubuntu.
The script itself contains the following information
#!/bin/sh
echo "$(date) About to run Execution Server"
cd /home/matt/LinuxExecServer-16.0.0
sh ./startExecServer.sh
echo "$(date) Execution Server launched..., process list is $(ps -ef)"
This will change the directory to the location of the startExecServer.sh script and execute the file, logging some information about the processes that have started.
Every time you start your Ubuntu Execution Server now this will also start with the machine and start your execution server.
Regards,
Matthew

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks Matthew! Instead of 'cd /home/matt/LinuxExecServer-16.0.0', I created a symbolic link like I mentioned above, then it works for me. Again, thanks for your help!