mirror of
https://github.com/linuxserver/docker-opera.git
synced 2026-02-05 20:58:33 +08:00
24 lines
689 B
Bash
Executable File
24 lines
689 B
Bash
Executable File
#! /bin/bash
|
|
|
|
# Cleanup
|
|
if ! pgrep opera > /dev/null;then
|
|
rm -f $HOME/.config/opera/Singleton*
|
|
fi
|
|
|
|
BIN=/usr/bin/opera-real
|
|
LANG=$(echo $LC_ALL| sed 's/\.UTF-8//g'| sed 's/_/-/g')
|
|
LANG_SHORT=$(echo $LANG | awk -F'-' '{print $1}')
|
|
if [ -f /usr/lib/x86_64-linux-gnu/opera/localization/${LANG_SHORT}.pak ]; then
|
|
LANG_CLI="--lang=${LANG_SHORT}"
|
|
fi
|
|
if [ -f /usr/lib/x86_64-linux-gnu/opera/localization/${LANG}.pak ]; then
|
|
LANG_CLI="--lang=${LANG}"
|
|
fi
|
|
|
|
# Run normally on privved containers or modified un non priv
|
|
if grep -q 'Seccomp:.0' /proc/1/status; then
|
|
${BIN} --password-store=basic ${LANG_CLI} "$@"
|
|
else
|
|
${BIN} --password-store=basic --no-sandbox --test-type ${LANG_CLI} "$@"
|
|
fi
|