HEX
Server: Apache/2.4.67 (Debian)
System: Linux hosting103 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User: muzikaecom (1013)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/local/share/hostingplatform/scripts/getHostingPackageCron
#!/usr/bin/env php
<?php
require_once("/usr/local/share/hostingplatform/esrpc.php");

$server = new ESRPCConnection();
$worker = new Worker($server->get());
$server->setTarget($worker);
$server->connect();
$server->serve();

class Worker {
	var $api;

	function __construct($api) {
		$this->api = $api;
	}

	function getHostingPackageCron($packagename) {
		$crontab = shell_exec("/usr/bin/sudo -u " . escapeshellcmd($packagename) . " /usr/bin/crontab -l");
		if($crontab == "no crontab for " . $packagename) {
			unset($crontab);
		}
		return $crontab;
	}
}