Changes

From Amahi Wiki
Jump to: navigation, search
1,591 bytes added ,  15:35, 9 April 2014
*Test run pyHME
<pre>python /usr/share/pyhme/start.py</pre>
 
Verify that things are working correctly on the Tivo, go to Now Playing List and look for the shares. If they appear and you can browse to them, you are almost done!
 
You can manually start the pyHME service by:
<pre>service pyhme start</pre>
 
 
=====Enable pyHME at Boot=====
<pre>nano /etc/init.d/pyhme</pre>
 
Paste the following:
<pre>
#!/bin/bash
# chkconfig: 2345 99 05
# description: pyHME server
### INIT INFO
# Provides: pyhme
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-description: pyHME server
# Description: Start and stop the pyHME server.
### END INIT INFO
RETVAL=0
start() {
echo -n "Starting pyHME: "
pgrep -f start.py
RETVAL=$?
[ $RETVAL -eq 0 ] && echo "pyHME already running: Exiting" && exit 1
# this call actually starts pyHME.
cd /usr/share/pyhme
python start.py > /dev/null 2>&1 &
RETVAL=$?
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}
stop() {
echo -n "Stopping pyHME: "
pkill -f start.py
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}
checkstatus() {
if [ ! `pgrep -f python` ]; then
echo -n $"pyHME is stopped"
echo
else
echo "pyHME is running."
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
checkstatus
;;
 
restart|reload)
stop
sleep 1
start
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $RETVAL
</pre>
 
 
Make the pyHME script executable:
<pre>chmod u+x /etc/init.d/pyhme</pre>
 
Enable pyhme at boot.
<pre>chkconfig pyhme on</pre>
 
Exit and Save
==Configure Web App (needs update)==
23

edits