Couldn't find /usr/local/sbin/PMS_FOLDER/PMS.sh
let me just post my script...
- Code: Select all
#Modify path as per your need..here is default for me..
PATH=/usr/local/sbin/PMS_FOLDER:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin
DESC="PS3 UPnP Media Server"
NAME=PMS.sh
#Don't forget to put proper PMS folder name here.
DAEMON=/usr/local/sbin/PMS_FOLDER/PMS.sh
# replace userid with the one ,with which access you want to run PMS..This user and group # should exist in /etc/passwd and /etc/group...
PMSUSER=1000
PMSGROUP=1000
# Exit if the package is not installed
if [ ! -x "$DAEMON" ]; then
{
echo "Couldn't find $DAEMON"
exit 99
}
fi
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
cd PMS_FOLDER
start-stop-daemon --start --quiet --chuid $PMSUSER:$PMSGROUP --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --chuid $PMSUSER:$PMSGROUP --exec $DAEMON \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --signal 2 --retry 5 --quiet --name java
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
return "$RETVAL"
}
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) log_end_msg 0 ;;
2) log_end_msg 1 ;;
esac
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) log_end_msg 0 ;;
2) log_end_msg 1 ;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop}" >&2
exit 3
;;
esac
:
my folder is at /usr/local/sbin/PMS_FOLDER
the folder has a valid conf, i edited the last line of the PMS.sh with
- Code: Select all
cd /usr/local/sbin/PMS_FOLDER/
exec "$JAVA" $JAVA_OPTS -Xmx768M -Djava.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -jar "$PMS_JAR" "$@" &
i have no idea where i'm going wrong but i'm sure it's something stupid
