Ensure Whoopsie is masked

Description

Ensure that the whoopsie service is masked if it is required to be installed.

Rationale

Whoopsie collects the crash report generated by Apport and makes it possible to send them to Canonical.

Audit

isMasked() {
  isMasked=$(systemctl is-enabled "$1")
  if [[ "$isMasked" = "masked" ]]; then
    exit 0
  else
    exit 1
  fi
}

@test "Verify that whoopsie is masked" {
  run isMasked whoopsie.service
  [ "$status" -eq 0 ]
}

Remediation

shell

systemctl stop whoopsie.service
systemctl mask whoopsie.service

results matching ""

    No results matching ""