Skip to content

Commit

Permalink
checktrust-for-getty: Use checktrust command
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jul 9, 2020
1 parent 337fd79 commit b3d4d52
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions checktrust/checktrust-for-getty
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#! /usr/bin/bash

for host in wtf afk pummelfee; do
reply="$(netcat -w 1 $host 236 </dev/null)"
if [ "$reply" = "I trust you" -o "$reply" = "I don't trust you" ]; then
break
fi
done
if [ "$reply" = "I don't trust you" ]; then
if [ "$(/usr/sbin/checktrust)" = "not trusted" ]; then
mkdir -p /node/issue.d
cat > /node/issue.d/notrust.issue <<EOF
** WARNING: Loss of trust detected **
Expand Down

0 comments on commit b3d4d52

Please sign in to comment.