Added support for enabling kiosk mode and opening an URL at launch.
This commit is contained in:
parent
b18027ec44
commit
a50bede41a
5 changed files with 43 additions and 2 deletions
22
rootfs/etc/services.d/app/params
Executable file
22
rootfs/etc/services.d/app/params
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e # Exit immediately if a command exits with a non-zero status.
|
||||
set -u # Treat unset variables as an error.
|
||||
|
||||
# Set location of profile.
|
||||
echo "--profile"
|
||||
echo "/config/profile"
|
||||
|
||||
# Make sure we don't get ask to be the default browser.
|
||||
echo "--setDefaultBrowser"
|
||||
|
||||
# Check if kiosk mode is enabled.
|
||||
if [ "${FF_KIOSK:-0}" == 1 ]; then
|
||||
echo "--kiosk"
|
||||
fi
|
||||
|
||||
# URL to open.
|
||||
# NOTE: This should be the last argument.
|
||||
if [ -n "${FF_OPEN_URL:-}" ]; then
|
||||
echo "$FF_OPEN_URL"
|
||||
fi
|
|
@ -6,4 +6,4 @@ set -u # Treat unset variables as an error.
|
|||
export HOME=/config
|
||||
|
||||
/usr/bin/firefox --version
|
||||
exec /usr/bin/firefox --profile /config/profile --setDefaultBrowser >> /config/log/firefox/output.log 2>> /config/log/firefox/error.log
|
||||
exec /usr/bin/firefox "$@" >> /config/log/firefox/output.log 2>> /config/log/firefox/error.log
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue