• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Script to enable desktop and domain alias for domain users

JLChafardet

Regular Pleskian
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 -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

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,
 
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?
 
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.
 
I guess you use something I don't. Setting it for all my clients is all I needed to do.
 
Back
Top