UserParameter=pgsql.replication.count[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -c "SELECT count(*) FROM pg_stat_replication"
UserParameter=pgsql.user.count[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -c "SELECT COUNT(DISTINCT chat_id) FROM active_list2;"
#!/bin/bash
menu[0]='1.Текущий пользователь'
menu[1]='2.Данные о каталоге'
menu[2]='3.Запущенные процессы'
menu[3]='4.Выход'
menu () {
for i in ${menu[@]}; do
echo "$i"
done
read -p "Выберите номер процесса:" choice
if (( choice == 1 )); then
echo $(users)
elif (( choice == 2 )); then
echo $(ls)
elif (( choice == 3 )); then
echo $(ps)
elif (( choice == 4 )); then
exit
fi
}
while true
do
menu
done
For lease expires -19418 day left
grep -iE 'expir.*date|expir.*on'
expdate=$(whois "$domain" | grep -iE 'expir.*date|expir.*on|expires|free-date' | head -1 | grep -oE '[^ ]+$')