#!/bin/bash # This tool installs the client certificate in Firefox and Chromium. username="$1" userhome="/home/$username" certificate="$userhome/.config/clientcert.p12" runuser -u "$username" -- mkdir -p "$userhome/.config" mv "$userhome/clientcert.p12" "$certificate" chown "$username:$username" "$certificate" # Delete all Firefox data rm -rf "$userhome/.mozilla/" # Create an empty profile runuser -u "$username" -- mkdir -p "$userhome/.mozilla/firefox/main" # Tell Firefox to use this profile cat > "$userhome/.mozilla/firefox/profiles.ini" <