looking for programmer to write script

jack

Verified User
Joined
Jul 28, 2005
Messages
56
hello,

I'm looking for programmer can write two small scripts for me.
one script can make DA calculate the usage of my second harddrive.
It would be possible to flip the directadmin.conf setting for the "quota_partition" back and forth between /home and /home2, and re-run the quota on the new users.

Eg:
quota_partition=/home
let the "action=tally&value=all" run it's normal course. (see /etc/cron.d/directadmin_cron). With that, /home2 user will have incorrect usage as it's not checked.

next step (about 2 hours later), change quota_partition=/home2 in the directadmin.conf
run:
echo "action=tally&value=newreseller&type=reseller" >> /usr/local/directadmin/data/task.queue

Where newreseller is the reseller who owns all of the user accounts on /home2.

A few hours after that, restore quota_partition back to /home for the next days tally and general usage.

the other script can run once awhile change back the files on /home from uid Apache back to the users uid.

please email me with quote or PM me. thank you. [email protected]
 
Why not just simply copy directadmin.conf to directadmin.home1 and directadmin.home2 make the modifications required and use the following 2 scripts:

Create a file called tally1.sh with the following content
Code:
#!/bin/sh
cp /usr/local/directadmin/conf/directadmin.home1 /usr/local/directadmin/conf/directadmin.conf
echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue

Create a file called tally2.sh with the following content
Code:
#!/bin/sh
cp /usr/local/directadmin/conf/directadmin.home2 /usr/local/directadmin/conf/directadmin.conf
echo "action=tally&value=newreseller&type=reseller" >> /usr/local/directadmin/data/task.queue

Where newreseller is the reseller who owns all of the user accounts on /home2.

mark both scripts executable and replace the tally in the crontab with these scripts, about 2 hours apart.

If you want me to do this let me know...

Regards,
Onno Vrijburg
 
thank you much for your help.
i'm still concerning the second script, anyone can help me with will be very appreciated.
thanks again.
 
Back
Top