forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script for linux daemon like ps2vfs

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
Nikel



Joined: 01 Feb 2005
Posts: 1
Location: Canary Islands

PostPosted: Tue Feb 01, 2005 9:44 pm    Post subject: Script for linux daemon like ps2vfs Reply with quote

Hi, Im new with this stuff and willing to cooperate in projects etc, (depending on my spare time). I have been using p2vfs to connect my ps2 to my computer and worked pretty well. As I have as a server a Linux box and wanted to use ps2vfs as a daemon I made the starting, stopping, restarting script to ease the task of doing it.

Well if you wantit or need it, there you go:
------------------------------------------------------------
#! /bin/sh
#
# ps2vfs This script will manage the ps2vfs server program like any othe /etc/init.d
# daemon script
#
# Written by Jose Fernandez <MrNikel@gmail.com>.
# Version: 0.1

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/java
OPTIONS="-jar ps2vfs.jar -nw plugins"
NAME=Ps2VFS
DESC="PlayStation 2 Virtual Filesystem Server"
DIR=/usr/local/ps2vfs



case "$1" in
start)
echo -n "Starting $DESC: $NAME"
start-stop-daemon -b -m --pidfile /tmp/pidPs2VFS -d $DIR --start -x $DAEMON -- $OPTIONS
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
start-stop-daemon -s 9 --pidfile /tmp/pidPs2VFS --stop --quiet --oknodo
echo "."
;;
reload|force-reload)
echo -n "Reloading $DESC: $NAME"
echo"Not Implemented yet"
echo "."
;;
restart)
echo -n "Restarting $DESC: $NAME"
start-stop-daemon -s 9 --pidfile /tmp/pidPs2VFS --stop --quiet --oknodo
sleep 1
start-stop-daemon -b -m --pidfile /tmp/pidPs2VFS -d $DIR --start -x $DAEMON -- $OPTIONS
echo "."
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0
------------------------------------------------------------------------

Hope you find this useful and see you...
Nikel.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group