| Revision 3132,
580 bytes
checked in by squidly, 15 months ago
(diff) |
|
ajout classe m_export + script export_account afin de générer un export de compte. Correction de bugs divers.
|
-
Property svn:executable set to
*
-
Property svn:mergeinfo set to
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | . /etc/alternc/local.sh |
|---|
| 3 | # Set disk quota to an user |
|---|
| 4 | # Won't work over NFS |
|---|
| 5 | |
|---|
| 6 | MID=$1 |
|---|
| 7 | SIZE=$2 |
|---|
| 8 | AWK=/usr/bin/awk |
|---|
| 9 | QUOTA=/usr/sbin/setquota |
|---|
| 10 | if [ $# -ne 2 ] || [[ ! "$MID" =~ ^[0-9]+$ ]] || [[ ! "$SIZE" =~ ^[0-9]+$ ]]; then |
|---|
| 11 | echo "Usage: quota_edit <uid> <size>" |
|---|
| 12 | echo "Edit the quota of the AlternC account having uid <uid> the the available space to <size>" |
|---|
| 13 | exit 1 |
|---|
| 14 | fi |
|---|
| 15 | |
|---|
| 16 | DATA_PART=`df "${ALTERNC_LOC}/html" 2>/dev/null | $AWK 'NR==2 { print $1; }'` |
|---|
| 17 | `sudo $QUOTA -r -g $MID $SIZE $SIZE 0 0 $DATA_PART 2>/dev/null || echo "Group quota are not enabled on /var/alternc." >&2` |
|---|
Note: See
TracBrowser
for help on using the repository browser.