From: paul Date: Mon, 20 Jun 2016 12:24:06 +0000 (+0000) Subject: put statusfile into /tmp X-Git-Url: http://git.plutz.net/?p=serve0;a=commitdiff_plain;h=0f55cabbc9beca8fce0bddc74f48d4d0fd52250b put statusfile into /tmp svn path=/trunk/; revision=135 --- diff --git a/actions/playctl.sh b/actions/playctl.sh index 183bee6..b532e36 100755 --- a/actions/playctl.sh +++ b/actions/playctl.sh @@ -18,6 +18,7 @@ fifofile="${_DATA}/mplayer.fifo" statusfile="${_DATA}/mplayer.status" +statusfile="/tmp/mplayer.status" volfile="${_DATA}/mplayer.volume" printf '\rBREAK\r' >> "$statusfile" diff --git a/actions/watch.sh b/actions/watch.sh index 48f465f..e473ac4 100755 --- a/actions/watch.sh +++ b/actions/watch.sh @@ -59,6 +59,7 @@ case "${_COOKIE[watch]}" in playmeta="${_DATA}/mplayer.meta" fifofile="${_DATA}/mplayer.fifo" statusfile="${_DATA}/mplayer.status" + statusfile="/tmp/mplayer.status" volume="$(validate "$(cat "${_DATA}/mplayer.volume")" '[1-9]?[0-9]|100' 20)" [ \! -p "$fifofile" ] && rm -f "$fifofile" && mkfifo -m 600 "$fifofile" @@ -86,6 +87,8 @@ case "${_COOKIE[watch]}" in # --volume="$volume" \ # "$playuri" >"$statusfile" 2>/dev/null & + chmod 600 "$statusfile" + redirect "?p=playctl&${watch_link}" ;; *) redirect "?p=view&${watch_link}" diff --git a/pages/playctl.sh b/pages/playctl.sh index 79122fd..c57e338 100755 --- a/pages/playctl.sh +++ b/pages/playctl.sh @@ -23,6 +23,7 @@ info="${_GET[i]}" location="$(invalidate "${_GET[l]}" '(.*/)?\.\.(/.*)?|' /)" directory="${location%/*}" statusfile="$_DATA/mplayer.status" +statusfile="/tmp/mplayer.status" [ -n "$info" ] && video="${_DATA}/videos/$info" \ || video="${treeroot%/}/${location#/}"