summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-04-03 22:07:51 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-04-03 22:07:51 +0200
commitfeb9b2e1043fb4c1aea53d575405ab0028d90d2b (patch)
tree47d0ad8a8becef2b1b0486c82cb1f3d070169c7e
parentf55bbe10b7f76d7283ec8eb66d29265cb1c00cc7 (diff)
downloaditzks-systems-feb9b2e1043fb4c1aea53d575405ab0028d90d2b.tar.gz
itzks-systems-feb9b2e1043fb4c1aea53d575405ab0028d90d2b.tar.bz2
itzks-systems-feb9b2e1043fb4c1aea53d575405ab0028d90d2b.zip
etc/mklocaluser.d/60-itzks-systems-roamingworkstation_prep-firefox: Fix script when running on Debian Edu bullseye.
-rwxr-xr-xetc/mklocaluser.d/60-itzks-systems-roamingworkstation_prep-firefox40
1 files changed, 28 insertions, 12 deletions
diff --git a/etc/mklocaluser.d/60-itzks-systems-roamingworkstation_prep-firefox b/etc/mklocaluser.d/60-itzks-systems-roamingworkstation_prep-firefox
index f779883..2af6555 100755
--- a/etc/mklocaluser.d/60-itzks-systems-roamingworkstation_prep-firefox
+++ b/etc/mklocaluser.d/60-itzks-systems-roamingworkstation_prep-firefox
@@ -5,19 +5,35 @@ set -e
GROUP=$(id -g "$USER")
HOMEDIR="/home/$USER"
-mkdir -p "$HOMEDIR/.mozilla/firefox/debian-edu.default"
-if [ ! -e "$HOMEDIR/.mozilla/firefox/profiles.ini" ]; then
- cp "/usr/share/debian-edu-config/profiles.ini.ff" "$HOMEDIR/.mozilla/firefox/profiles.ini"
+# this is maily for Debian buster or rather Firefox versions that don't support
+# the policies.json file
+
+if [ -e "/usr/share/debian-edu-config/profiles.ini.ff" ]; then
+ mkdir -p "$HOMEDIR/.mozilla/firefox/debian-edu.default"
+ if [ ! -e "$HOMEDIR/.mozilla/firefox/profiles.ini" ]; then
+ cp "/usr/share/debian-edu-config/profiles.ini.ff" "$HOMEDIR/.mozilla/firefox/profiles.ini"
+ fi
+fi
+
+if [ -e "/usr/share/debian-edu-config/installs.ini" ]; then
+ if [ ! -e "$HOMEDIR/.mozilla/firefox/installs.ini" ]; then
+ cp "/usr/share/debian-edu-config/installs.ini" "$HOMEDIR/.mozilla/firefox/installs.ini"
+ fi
fi
-if [ ! -e "$HOMEDIR/.mozilla/firefox/installs.ini" ]; then
- cp "/usr/share/debian-edu-config/installs.ini" "$HOMEDIR/.mozilla/firefox/installs.ini"
+
+if [ -d "$HOMEDIR/.mozilla"]; then
+ chmod -R u+w,go-rwx "$HOMEDIR/.mozilla/"
+ chown -R $USER:$GROUP "$HOMEDIR/.mozilla/"
+fi
+
+if [ -e "/usr/share/debian-edu-config/profiles.ini" ]; then
+ mkdir -p "$HOMEDIR/.thunderbird/debian-edu.default"
+ if [ ! -e "$HOMEDIR/.thunderbird/profiles.ini" ]; then
+ cp "/usr/share/debian-edu-config/profiles.ini" "$HOMEDIR/.thunderbird/profiles.ini"
+ fi
fi
-chmod -R u+w,go-rwx "$HOMEDIR/.mozilla/"
-chown -R $USER:$GROUP "$HOMEDIR/.mozilla/"
-mkdir -p "$HOMEDIR/.thunderbird/debian-edu.default"
-if [ ! -e "$HOMEDIR/.thunderbird/profiles.ini" ]; then
- cp "/usr/share/debian-edu-config/profiles.ini" "$HOMEDIR/.thunderbird/profiles.ini"
+if [ -d "$HOMEDIR/.thunderbird"]; then
+ chmod -R u+w,go-rwx "$HOMEDIR/.thunderbird/"
+ chown -R $USER:$GROUP "$HOMEDIR/.thunderbird/"
fi
-chmod -R u+w,go-rwx "$HOMEDIR/.thunderbird/"
-chown -R $USER:$GROUP "$HOMEDIR/.thunderbird/"