Skip to content

Instantly share code, notes, and snippets.

@mikepage
Last active October 2, 2025 08:55
Show Gist options
  • Select an option

  • Save mikepage/6bb099e688558c57f31b3fcb087759a5 to your computer and use it in GitHub Desktop.

Select an option

Save mikepage/6bb099e688558c57f31b3fcb087759a5 to your computer and use it in GitHub Desktop.
#!/bin/bash
for file in /etc/virtual/limit_*; do
usern=$(echo "$file"|cut -d '_' -f2)
# Skip limit_unknown
if [ "$usern" = "unknown" ]; then
continue
fi
if [ -d "/usr/local/directadmin/data/users/${usern}" ]; then
echo 250 > "$file"
echo "Updated limit for $usern at $file"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment