summarylogtreecommitdiffstats
path: root/gog-dont-starve
blob: 6ff8f500da397da5372e18526925a4cb1a9f25a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/bash

pkgname='gog-dont-starve'
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