HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //proc/self/cwd/wp-content/plugins/really-simple-ssl/lets-encrypt/integrations/plesk/functions.php
<?php
defined( 'ABSPATH' ) or die();

function rsssl_plesk_install(){
	if (rsssl_is_ready_for('installation')) {
		$cpanel = new rsssl_plesk();
		$domains = RSSSL_LE()->letsencrypt_handler->get_subjects();
		$response = $cpanel->installSSL($domains);
		if ( $response->status === 'success' ) {
			update_option('rsssl_le_certificate_installed_by_rsssl', 'cpanel:default');
		}
		return $response;
	} else {
		$status = 'error';
		$action = 'stop';
		$message = __("The system is not ready for the installation yet. Please run the wizard again.", "really-simple-ssl");
		return new RSSSL_RESPONSE($status, $action, $message);
	}
}

/**
 * Add the step to install SSL using Plesk
 * @param $steps
 *
 * @return mixed
 */
function rsssl_plesk_add_installation_step($steps){
	$plesk = new rsssl_plesk();
	if ( $plesk->credentials_available() ) {
		$index = array_search( 'installation', array_column( $steps['lets-encrypt'], 'id' ) );
		$index ++;
		$steps['lets-encrypt'][ $index ]['actions'] = array_merge(array(
			array(
				'description' => __("Installing SSL certificate using PLESK API...", "really-simple-ssl"),
				'action'=> 'rsssl_plesk_install',
				'attempts' => 1,
				'speed' => 'normal',
			)
		) , $steps['lets-encrypt'][ $index ]['actions'] );
	}

	return $steps;
}
add_filter( 'rsssl_steps', 'rsssl_plesk_add_installation_step' );