add icinga downtime scheduling script, add whois script, optimize mailbox usage
This commit is contained in:
parent
23d5fc6e4d
commit
6c054f63ca
3 changed files with 92 additions and 3 deletions
18
whois.sh
Executable file
18
whois.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Checks if the specific domain is available
|
||||
|
||||
|
||||
domain=$1
|
||||
check=$(whois -h whois.nic.ch -p 4343 $domain | head -1 | awk -F':' {'print $1'})
|
||||
|
||||
|
||||
case "$check" in
|
||||
0)
|
||||
# already registered
|
||||
;;
|
||||
1)
|
||||
echo "free!" | mail -s "$domain is free!" oli@lugh.ch ;;
|
||||
*)
|
||||
echo "unhandled, see https://www.nic.ch/reg/cm/wcm-page/faqs/technical/whoisis.jsp" ;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue