| #!/bin/sh |
| . /etc/utils.sh |
| |
| if ! is-html-tv-ui; then |
| echo "configured for sage" |
| exit 0 |
| fi |
| |
| case "$1" in |
| start) |
| if [ -e /rw/startupmods ]; then |
| echo Executing startupmods |
| . /rw/startupmods |
| fi |
| |
| ( |
| wait-until-created /tmp/startupvideo.done |
| rc_pipe_init |
| /app/oregano/runoregano 2>&1 | logos spicystart 0 20000000 & |
| ) & |
| |
| if [ -e /rw/poststartupmods ]; then |
| echo Executing poststartupmods |
| . /rw/poststartupmods |
| fi |
| ;; |
| stop) |
| pkillwait -x startupvideo # if it's running, prevents miniclient from starting up |
| pkillwait -f '(babysit.*)(runoregano|dart)' |
| pkillwait -x 'runoregano|dart' |
| stop_sagesrv |
| pkillwait -x waitpower |
| pkillwait -x netflix |
| pkillwait -x content_shell |
| pkillwait -x vudu |
| rc_pipe_deinit |
| ;; |
| restart) |
| $0 stop; $0 start |
| ;; |
| *) |
| echo "Usage: $0 {start|stop|restart}" |
| exit 1 |
| esac |