• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Call custom shell command with callSbin from within extension

wlanrouterking

New Pleskian
Server operating system version
AlmaLinux 8
Plesk version and microupdate number
Plesk Obsidian 18.0.48
I am currently developing a extension for plesk. I need to use shell scripts for creating files with root privileges. The test command already exists and i created a symlink from /usr/local/psa/admin/bin/test-command.sh to the mod wrapper in /usr/local/psa/admin/sbin/mod_wrapper. When i try to execute the command right now i am getting the following error:
test-command.sh: execve failed for /usr/local/psa/admin/sbin/modules//bin/test-command.sh: No such file or directory System error 2

First question is: Why there is a double slash and the bin directory in front of the shell script?
How does the mapping of the sbin directory work?
i mapped the sbin directory in my project to /usr/local/psa/admin/sbin/modules/test-extension and i execute the command in my IndexController like:
pm_ApiCli::callSbin('test-command.sh', [$param1, $param2]);

I couldnt find any good sources in google explaining the concept of shell scripts in plesk.
Would be great if someone could help me with this issue.
 
Back
Top