PS3 Media Server Gentoo init script

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

PS3 Media Server Gentoo init script

Postby Onishin » Thu Jun 25, 2009 7:30 pm

My script pour init.d for gentoo

/etc/init.d/pms
Code: Select all
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
   before net
   use logger dns
   provide pms
}

start() {
   ebegin "Starting PMS Plastation Multimedia Serveur"
   install -o root -g root -m 755 -d $PIDDIR
   start-stop-daemon --start --chdir "$PMS_HOME" --background --chuid "$PMSUSER:$PMSGROUP" --make-pidfile --pidfile "$PMSDPID" --quiet --exec "$JAVA" -- $JAVA_OPTS
   eend $?
}

stop() {
   ebegin "Stopping PMS Plastation Multimedia Serveur"
   start-stop-daemon --stop --quiet --pidfile $PMSDPID
   eend $?
}



/etc/conf.d/pms
Code: Select all
PMSUSER=onishin
PMSGROUP=onishin
JAVA=`which java`
PMS_HOME=/opt/pms
PMS_JAR="$PMS_HOME/pms.jar"
JAVA_OPTS="-Xmx768M -Djava.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -jar $PMS_JAR $@"
PIDDIR="$PMS_HOME"
PMSDPID=$PIDDIR/pms.pid
Onishin
 
Posts: 2
Joined: Thu Jun 25, 2009 7:22 pm

Re: PS3 Media Server Gentoo init script

Postby AlphaMaven » Mon Sep 14, 2009 4:24 pm

The above scripts didn't work for me. Here are my updated scripts:

/etc/init.d/pms
Code: Select all
#!/sbin/runscript

depend() {
   before net
   use logger dns
   provide pms
}

start() {
   ebegin "Starting PMS Playstation Multimedia Server"
   install -o root -g root -m 755 -d $PIDDIR
   start-stop-daemon \
        --start \
        --user "$PMSUSER" \
        --make-pidfile \
        --pidfile "$PMSDPID" \
        --chdir /opt/pms/ \
        --exec /opt/pms/PMS.sh \
        --background \
        --stdout /var/log/pms/stdout.txt \
        --stderr /var/log/pms/stderr.txt
   eend $?
}

stop() {
   ebegin "Stopping PMS Playstation Multimedia Server"
   start-stop-daemon \
        --stop \
        --quiet \
        --pidfile $PMSDPID
   eend $?
}


/etc/conf.d/pms
Code: Select all
PMSUSER=pms
PMSGROUP=pms
PIDDIR="/opt/pms"
PMSDPID=$PIDDIR/pms.pid
AlphaMaven
 
Posts: 3
Joined: Tue Sep 08, 2009 7:39 pm


Return to Linux/Unix Support

Who is online

Users browsing this forum: No registered users and 4 guests