aboutsummaryrefslogtreecommitdiff
path: root/firejail/firejail-refresh-links
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-09-02 12:10:00 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-09-02 12:10:00 -0300
commitdb5f04a6abdf2ae9afc7d9946984f328c5027ab0 (patch)
tree704b8f7cbf36190400dccdcd8fcbbd659d99879a /firejail/firejail-refresh-links
parent6630c3c0a73c40f3da0ea2cb3e667f5ec7399852 (diff)
downloadapps-db5f04a6abdf2ae9afc7d9946984f328c5027ab0.tar.gz
apps-db5f04a6abdf2ae9afc7d9946984f328c5027ab0.tar.bz2
Adds firejail symlinks
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