-
-
Notifications
You must be signed in to change notification settings - Fork 269
/
apport
30 lines (23 loc) · 739 Bytes
/
apport
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
function f_apport {
echo "[$SCRIPT_COUNT] Disable apport, ubuntu-report and popularity-contest"
if command -v gsettings 2>/dev/null 1>&2; then
gsettings set com.ubuntu.update-notifier show-apport-crashes false
fi
if command -v ubuntu-report 2>/dev/null 1>&2; then
ubuntu-report -f send no
fi
if [ -f /etc/default/apport ]; then
sed -i 's/enabled=.*/enabled=0/' /etc/default/apport
systemctl stop apport.service
systemctl mask apport.service
fi
if dpkg -l | grep -E '^ii.*popularity-contest' 2>/dev/null 1>&2; then
$APT purge popularity-contest
fi
systemctl daemon-reload
if [[ $VERBOSE == "Y" ]]; then
systemctl status apport.service --no-pager
echo
fi
((SCRIPT_COUNT++))
}