1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Script to enable desktop and domain alias for domain users

Discussion in 'Plesk for Linux - 8.x and Older' started by JLChafardet, Apr 4, 2006.

  1. JLChafardet

    JLChafardet Regular Pleskian

    26
    57%
    Joined:
    Feb 20, 2004
    Messages:
    379
    Likes Received:
    0
    Location:
    Caracas - Venezuela
    this is a little script i just wrote, to let you all (ofcourse i wrote it to save my time) save time if you want to enable the desktop feature and domain alias to your domains.

    [root@swordfish ~]# cat desktop_alias_enabler.sh
    #!/bin/bash
    ls -la /home/httpd/vhosts/|grep ^d|grep -v " \."|cut -c 57- > /root/domains.txt
    for line in `cat /root/domains.txt`
    do
    /usr/local/psa/bin/./domuser.sh -u $line -manage_dashboard true
    /usr/local/psa/bin/./domuser.sh -u $line -dashboard true
    /usr/local/psa/bin/./domuser.sh -u $line -manage_domain_aliases true
    done

    [root@swordfish ~]#

    PHP:
    #!/bin/bash
    ls -la /home/httpd/vhosts/|grep ^d|grep -" \."|cut -c 57- > /root/domains.txt
    for line in `cat /root/domains.txt`
    do
    /
    usr/local/psa/bin/./domuser.sh -u $line -manage_dashboard true
    /usr/local/psa/bin/./domuser.sh -u $line -dashboard true
    /usr/local/psa/bin/./domuser.sh -u $line -manage_domain_aliases true
    done
    Please do the following:

    nano desktop_alias_enabler.sh
    copy and paste the script above pasted
    CTRL+X
    Y
    ENTER
    chmod +x desktop_alias_enabler.sh

    sh desktop_alias_enabler.sh

    I hope you all find it as usefull as it was for me (saved me HOURS) of work.

    Regards,
     
  2. JLChafardet

    JLChafardet Regular Pleskian

    26
    57%
    Joined:
    Feb 20, 2004
    Messages:
    379
    Likes Received:
    0
    Location:
    Caracas - Venezuela
    well any comments/fixes/enhancements on this script are really apreciated
     
  3. Snapdragon

    Snapdragon Guest

    0
     
    Why would you go through the trouble of using the API when you can just select all your clients with one check box, hit Group Operations, click the Enable radio button on Domain Alias Management, click the radio button on Desktop Management, and hit OK?
     
  4. JLChafardet

    JLChafardet Regular Pleskian

    26
    57%
    Joined:
    Feb 20, 2004
    Messages:
    379
    Likes Received:
    0
    Location:
    Caracas - Venezuela
    good point for "clients"

    but not for domains.

    my script enables the function in a domain basis, try to do what you just told me to do, via "group operations".

    cheers.
     
  5. Snapdragon

    Snapdragon Guest

    0
     
    I guess you use something I don't. Setting it for all my clients is all I needed to do.
     
Loading...