summarylogtreecommitdiffstats
path: root/va-11-hall-a-gog
blob: 649d5c4a7b0a0f8f74b5948be503dbc731f75ff3 (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
25
26
#!/bin/sh

pkgname="va-11-hall-a-gog"
pkgdir="/opt/${pkgname}"
run="${pkgdir}/start.sh"
run_firejail="firejail --profile=/etc/firejail/${pkgname}.profile ${run}"


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!"
        eval "${run_firejail}"
    elif [[ -f "/etc/firejail/${pkgname}.profile" ]]; then
        echo "Firejail profile for ${pkgname} found in /etc/firejail/"
        echo "Enforcing a sandbox!"
        eval "${run_firejail}"
    else
        echo "No Firejail profile detected!"
        echo "Skipping Firejail sandbox..."
        eval "${run}"
    fi
else
	${run}
fi