-
Notifications
You must be signed in to change notification settings - Fork 0
/
configureFirefox.sh
84 lines (61 loc) · 2.24 KB
/
configureFirefox.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
############################ template.sh ###########################
# Author Name | [email protected]
# Copyright 2003 Author Name
# Use Loginwindow Manager (http:https://www.bombich.com/software/lwm.html)
# to make this shell script run each time a user logs in or out.
####################################################################
### Description ###
#
# This script clears out User directories, except the current user
# which must be the first argument fed to the script.
# Local administrative users must begin with local or they too
# will be deleted
#
### Properties ###
#
# These items must be modified to suit your environment before
# implementing this script! You do not need to make any other
# modifications to this file than these properties.
#
## The end users of this script should not have to read past this line
## to safely and correctly implement this script. Make sure you explain
## very well what appropriate values are for the properties.
### Debug/testing sanity check ###
####################################################
###
### Configure firefox to use a Firefox CCK payload
###
###
####################################################
directory="/Library/Application Support/Firefox CCK/"
ffdir="/Applications/Firefox.app/Contents/MacOS/distribution"
if [ -d "$directory" ] ; then
echo "$directory" 'exists'
else
mkdir -p "$directory"
fi
if [ -d "$ffdir" ] ; then
echo "$ffdir" 'exists'
else
mkdir -p "$ffdir"
ln -s "$directory" "$ffdir/bundles"
fi
####################################################
###
### Configure firefox to use a Firefox CCK payload
###
###
####################################################
applicationIni="/Applications/Firefox.app/Contents/MacOS/application.ini"
overrideIni="/Applications/Firefox.app/Contents/MacOS/override.ini"
/bin/cp $applicationIni $overrideIni
sed -i -e 's/EnableProfileMigrator=1/EnableProfileMigrator=false/g' "$overrideIni"
sed -i -e 's/EnableExtensionManager=1/EnableExtensionManager=false/g' "$overrideIni"
## Create override.ini file and overwrite the file if it already exists
#echo "[XRE]" > $overrideIni
#echo "EnableProfileMigrator=false" >> $overrideIni
#echo "[/align]" >> $overrideIni
chmod 755 $overrideIni
### Always exit with 0 status
exit 0