aboutsummaryrefslogtreecommitdiff
path: root/firejail/firejail-refresh-links
diff options
context:
space:
mode:
Diffstat (limited to 'firejail/firejail-refresh-links')
-rwxr-xr-xfirejail/firejail-refresh-links20
1 files changed, 20 insertions, 0 deletions
diff --git a/firejail/firejail-refresh-links b/firejail/firejail-refresh-links
new file mode 100755
index 0000000..627965b
--- /dev/null
+++ b/firejail/firejail-refresh-links
@@ -0,0 +1,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