I'm trying to start some processes when my raspberry pi boots. But for some reason it doesn't work as expected. The idea is to start Xvfb and some jar file. 

So, I created a script 

```
Xvfb :99 > /var/log/xvfb.log 2>&1
java -jar /home/pi/selenium-server/selenium-server-standalone-2.42.2.jar > /var/log/selenium.log 2>&1

echo "Servers started" >> /var/log/start_server.log
date >> /var/log/start_server.log

```

And then with a cronjob I start this script: `@reboot /var/bootscripts/start_servers`

But for some reason, the jar file isn't 'started' at all. Is it because I sent everything to log files?

**Update**

Okay, I found some information about writing a start script, so I modified my script.

```
#! /bin/sh
# /etc/init.d/blah
#

# Run always
> /var/log/xvfb.log                     # clear log
date >> /var/log/test-server.log        # write date to log

> /var/log/xvfb.log                     # clear log
date >> /var/log/xvfb.log               # write date to log
Xvfb :99 > /var/log/xvfb.log 2>&1       # write output to log

> /var/log/selenium.log                 # clear log
date >> /var/log/selenium.log           # write date to log
java -jar /home/pi/selenium-server/selenium-server-standalone-2.42.2.jar > /var/log/seleni$

echo "Servers started" >> /var/log/test-server.log

# Carry out specific functions when asked to by the system
# to do
case "$1" in
  start)
    echo "Starting script blah "
    echo "Could do more here"
    ;;
  stop)
    echo "Stopping script blah"
    echo "Could do more here"
    ;;
  *)
    echo "Usage: /etc/init.d/blah {start|stop}"
    exit 1
    ;;
esac

exit 0

```

It is not completly finished (# to do), but I first wanted to test the commands that should run always. Well, xvfb starts (log is perfect), but the java server doesn't. The selenium.log file isn't created (so it doesn't reach that piece of code I suppose).

If I see to test-server.log I only see the date, so the echo command doesn't work as well, or better said: it doesn't reach the command.