Created
August 2, 2018 01:45
-
-
Save sokolenkoDEV/9c304928b46f5aae551240a7678b9d33 to your computer and use it in GitHub Desktop.
isp manager 5 check users who enabled backups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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