summarylogtreecommitdiffstats
path: root/mykey.install
blob: 5bf30d2437b82d7447521d3502bb895aca6577d2 (plain)
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
post_install() {
  cat <<EOF
Installation complete.

Recommended next steps:
    1. Run the unified auth setup:
       sudo mykey auth setup

    2. If you want MyKey to provide Secret Service for new secrets,
       disable any conflicting Secret Service provider, then enable
       the MyKey user service:
       systemctl --user enable --now mykey-secrets

       MyKey does not import third-party keyrings. Recreate secrets
       in MyKey after switching providers.

    3. Optionally enable the tray:
       mykey tray enable

    4. For help use:
       mykey --help
EOF
}

post_upgrade() {
  cat <<'EOF'
MyKey was upgraded.

Recommended next steps:
  - Review the current control surface:
    mykey --help
  - Re-run auth setup only if you intentionally want to change your MyKey auth configuration:
    sudo mykey auth setup
EOF
}

pre_remove() {
  if command -v systemctl >/dev/null 2>&1; then
    systemctl disable --now mykey-daemon >/dev/null 2>&1 || true
  fi
}

post_remove() {
  if command -v systemctl >/dev/null 2>&1; then
    systemctl daemon-reload >/dev/null 2>&1 || true
  fi

  cat <<'EOF'
MyKey package files were removed.

Runtime state under /etc/mykey, user data under ~/.local/share/mykey, and any
user-session enablement were not removed automatically. Review them manually
if you want a full teardown.
EOF
}