refactored to be an init.d script with start and stop commands that setup and teardown the connection