summarylogtreecommitdiffstats
path: root/gog-the-witcher-2-assassins-of-kings
diff options
context:
space:
mode:
Diffstat (limited to 'gog-the-witcher-2-assassins-of-kings')
-rw-r--r--gog-the-witcher-2-assassins-of-kings26
1 files changed, 23 insertions, 3 deletions
diff --git a/gog-the-witcher-2-assassins-of-kings b/gog-the-witcher-2-assassins-of-kings
index d4696e4c8c2a..18ed60a11106 100644
--- a/gog-the-witcher-2-assassins-of-kings
+++ b/gog-the-witcher-2-assassins-of-kings
@@ -1,4 +1,24 @@
-#!/usr/bin/bash
-gogdir="/opt/gog/the-witcher-2-assassins-of-kings"
+#! /bin/bash
-"$gogdir"/start.sh
+pkgname="gog-the-witcher-2-assassins-of-kings"
+pkgdir="/opt/${pkgname}/"
+run="${pkgdir}/start.sh"
+
+if hash firejail; then
+ echo "Firejail detected; attempting to enforce a sandbox..."
+ if [[ -f "${XDG_CONFIG_HOME}/firejail/${pkgname}.profile" ]]; then
+ echo "Firejail profile for ${pkgname} found in ${XDG_CONFIG_HOME}/firejail/"
+ echo "Enforcing a sandbox!"
+ firejail "${run}"
+ elif [[ -f "/etc/firejail/${pkgname}.profile" ]]; then
+ echo "Firejail profile for ${pkgname} found in /etc/firejail/"
+ echo "Enforcing a sandbox!"
+ firejail "${run}"
+ else
+ echo "No Firejail profile detected!"
+ echo "Skipping Firejail sandbox..."
+ "${run}"
+ fi
+else
+ "${run}"
+fi