Updated VERSION.txt and renamed executables
This commit is contained in:
26
usr/local/bin/kiosk_viewpdf
Executable file
26
usr/local/bin/kiosk_viewpdf
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# kiosk_viewpdf
|
||||
|
||||
if [ "$1" = "" ]
|
||||
then
|
||||
"You must supply a URL as an argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source /etc/openkiosk.conf
|
||||
|
||||
if echo "$1" | 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
|
||||
then
|
||||
kiosk_cleanup.sh
|
||||
xmessage -buttons "Ok:1" -center "Failed to retrieve pdf file."
|
||||
exit 1
|
||||
else
|
||||
xpdf -fullscreen -cont -z width /dev/shm/target.pdf
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user