blob: 9a414246b3fbaa48ad9ff532e7c106aff538ee3e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
#!/usr/bin/env bash
OUT=$(echo "ls" | lftp -u test_ftp,test_ftp eldiron.immae.eu | grep it_works | wc -l)
if [ "$OUT" -eq 1 ]; then
echo "ftp connection OK - access to ftp is working"
exit 0
else
echo "ftp connection CRITICAL - no access to ftp"
exit 2
fi
|