-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfiguration.sh
More file actions
60 lines (54 loc) · 1.76 KB
/
Copy pathconfiguration.sh
File metadata and controls
60 lines (54 loc) · 1.76 KB
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
#!/bin/bash
#------------------------#
# Version
#------------------------#
VERSION="1.1.7.19.04.2026"
LAUNCHCTL_BIN="${STOP_SAURON_LAUNCHCTL_BIN:-/bin/launchctl}"
#------------------------#
# Users
#------------------------#
LOCAL_USER="${LOCAL_USER:-$USER}"
SUDO_USER="${SUDO_USER:-$LOCAL_USER}"
#------------------------#
# State
#------------------------#
STATE_DIR="${STOP_SAURON_STATE_DIR:-.}"
#------------------------#
# Logfiles
#------------------------#
USER_LOG_FOLDER=".stop-sauron"
USER_LOG_FILE="${STATE_DIR}/debug.log"
PLIST_DEAMON_CONF="${STATE_DIR}/plist-deamon.backup.conf"
PLIST_DEAMON_BACKUP="${STATE_DIR}/plist-deamon.backup.conf.bak"
PLIST_AGENT_CONF="${STATE_DIR}/plist-agent.backup.conf"
PLIST_AGENT_BACKUP="${STATE_DIR}/plist-agent.backup.conf.bak"
#------------------------#
# Plist paths
#------------------------#
if [[ -n "${STOP_SAURON_PLIST_PATHS:-}" ]]; then
IFS=':' read -r -a plistPathArray <<< "$STOP_SAURON_PLIST_PATHS"
else
plistPathArray=(
# "~/Library/LaunchAgents" # Per-user agents provided by the user.
"/Library/LaunchAgents" # Per-user agents provided by the administrator.
"/Library/LaunchDaemons" # System wide daemons provided by the administrator.
"/System/Library/LaunchAgents" # Mac OS X Per-user agents.
"/System/Library/LaunchDaemons" # Mac OS X System wide daemons.
)
fi
#------------------------#
# Software packages
#------------------------#
if [[ -n "${STOP_SAURON_APPLICATIONS:-}" ]]; then
IFS=':' read -r -a applicationsArray <<< "$STOP_SAURON_APPLICATIONS"
else
applicationsArray=(
"com.airwatch"
"com.fireeye"
"com.mcafee"
"com.zscaler"
"com.cylance"
"com.crowdstrike"
"com.rapid7"
)
fi