Added conf_file arguments to view scripts
This commit is contained in:
@@ -3,18 +3,21 @@
|
||||
|
||||
if [ "$1" = "" ]
|
||||
then
|
||||
"You must supply a URL as an argument"
|
||||
"usage: kiosk_viewpdf <url> <config file path>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source /etc/openkiosk.conf
|
||||
url="$1"
|
||||
conf_file="$2"
|
||||
|
||||
if echo "$1" | grep -q '^file:'
|
||||
source $conf_file
|
||||
|
||||
if echo "$url" | grep -q '^file:'
|
||||
then
|
||||
filepath=$(echo "$server_url"|cut -d"/" -f2-)
|
||||
xpdf -fullscreen -cont -z width $filepath
|
||||
else
|
||||
if ! wget -q -O /dev/shm/target.pdf $1
|
||||
if ! wget -q -O /dev/shm/target.pdf $url
|
||||
then
|
||||
kiosk_cleanup.sh
|
||||
xmessage -buttons "Ok:1" -center "Failed to retrieve pdf file."
|
||||
|
||||
Reference in New Issue
Block a user