diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-12-03 17:33:13 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-12-03 17:33:13 +0800 |
commit | d1b57c1d68fa60a4a67c208f29b739ef0f20d5c5 (patch) | |
tree | cb7d281af1ae22efe00a2f10394d6680aab9dfbf /bin/mail/append_authorized_key.sh | |
parent | 152ecc894dd24cac6934a10f26f0fcce8445c2ea (diff) |
Update
Diffstat (limited to 'bin/mail/append_authorized_key.sh')
-rwxr-xr-x | bin/mail/append_authorized_key.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mail/append_authorized_key.sh b/bin/mail/append_authorized_key.sh index 950be90..3686959 100755 --- a/bin/mail/append_authorized_key.sh +++ b/bin/mail/append_authorized_key.sh | |||
@@ -13,7 +13,7 @@ MAIL="$(cat)" | |||
13 | test -f ~/.config/passphase || exit 1 | 13 | test -f ~/.config/passphase || exit 1 |
14 | PASSPHASE="$(cat ~/.config/passphase)" | 14 | PASSPHASE="$(cat ~/.config/passphase)" |
15 | 15 | ||
16 | # Only execute the following script when header matched | 16 | # Check passphase, or exit 0 |
17 | grep -qE "^Passphase: ${PASSPHASE}" <<<"$MAIL" || exit 0 | 17 | grep -qE "^Passphase: ${PASSPHASE}" <<<"$MAIL" || exit 0 |
18 | 18 | ||
19 | # Append comment and last line to ~/.ssh/authorized_keys | 19 | # Append comment and last line to ~/.ssh/authorized_keys |