aboutsummaryrefslogtreecommitdiff
path: root/firejail/firejail-refresh-links
blob: 627965b758de0e0aa5c9b66c2ed53e4f4b8d5bf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
#
# Refresh local firejail symlinks
#

# Parameters
BASENAME="`basename $0`"
DIRNAME="`dirname $0`"

# Ensure we are in the right folder
cd $DIRNAME

ls -1 /etc/firejail/*profile | \
  sed -e 's|/etc/firejail/||g' -e 's/.profile$//' | while read profile; do
    if which $profile &> /dev/null; then
      if [ ! -h "$profile" ]; then
        ln -s /usr/bin/firejail $profile
      fi
    fi
done