Gonna make a startup script so DSHub starts on Boot in linux envoirments and acts like a service instead of starting it like an app (if its possible)
currently working on this
Discussion
Anonymous
-
2008-02-10
Logged In: YES
user_id=1695600
Originator: YES
#! /bin/sh
# Startup Script for DSHub
# open a term and write "which java" without quotes
# the path should pop up like this /usr/bin/java
# then enter that path to your startup script below.
# don't forget to enter path for DSHub also
case "$1" in
start)
echo -n "Starting new-service"
#To run it as root:
/your/path/to/java -jar /your/path/to/DSHub.jar -nogui
#Or to run it as some other user:
/bin/su - username -c /your/path/to/java -jar /your/path/to/DSHub.jar -nogui
echo "."
;;
stop)
echo -n "Stopping new-service"
#To run it as root:
/your/path/to/java -jar /your/path/to/DSHub.jar -quit
#Or to run it as some other user:
/bin/su - username -c /your/path/to/java -jar /your/path/to/DSHub.jar -quit
echo "."
;;
Logged In: YES
user_id=1695600
Originator: YES
#! /bin/sh
# Startup Script for DSHub
# open a term and write "which java" without quotes
# the path should pop up like this /usr/bin/java
# then enter that path to your startup script below.
# don't forget to enter path for DSHub also
case "$1" in
start)
echo -n "Starting new-service"
#To run it as root:
/your/path/to/java -jar /your/path/to/DSHub.jar -nogui
#Or to run it as some other user:
/bin/su - username -c /your/path/to/java -jar /your/path/to/DSHub.jar -nogui
echo "."
;;
stop)
echo -n "Stopping new-service"
#To run it as root:
/your/path/to/java -jar /your/path/to/DSHub.jar -quit
#Or to run it as some other user:
/bin/su - username -c /your/path/to/java -jar /your/path/to/DSHub.jar -quit
echo "."
;;
*)
echo "Usage: /sbin/service new-service {start|stop}"
exit 1
esac
exit 0
Logged In: YES
user_id=1695600
Originator: YES
Needs parameters -nogui and -quit for it to work so that is my request later on