Skip to content

Instantly share code, notes, and snippets.

@sokolenkoDEV
Created August 2, 2018 01:45
Show Gist options
  • Save sokolenkoDEV/9c304928b46f5aae551240a7678b9d33 to your computer and use it in GitHub Desktop.
Save sokolenkoDEV/9c304928b46f5aae551240a7678b9d33 to your computer and use it in GitHub Desktop.
isp manager 5 check users who enabled backups
#!/bin/bash
for USER in `/usr/local/mgr5/sbin/mgrctl -m ispmgr user | sed 's/name=\(\w*\).*/\1/g'`; do
BACKUP_ENABLED=`/usr/local/mgr5/sbin/mgrctl -m ispmgr backup2.settings su=$USER | grep -c "enabled=on"`
if [[ "$BACKUP_ENABLED" -ne "0" ]]; then
echo "$USER"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment