Default-Start contains no runlevels, aborting
At the top of your /usr/local/bin/haltusbpower.sh
script add something like this:
#!/bin/bash
### BEGIN INIT INFO
# Provides: haltusbpower
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Halts USB power...
### END INIT INFO
I had the same error message but it included a message about missing LSB tags and overrides
.
I looked in htop and had multiple processes tailing the log from when I tested the service using /usr/local/bin/./MyService.sh start
and /usr/local/bin/./MyService.sh stop
. Once I killed these processes it was successful.
The start and stop test command was taken from http://www.jcgonzalez.com/ubuntu-16-java-service-wrapper-example