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