For those who are interested, I found a way:
systemctl --user --machine user@ is-active getmail-adr@user.account-at-gmx.net.service
The working file looks like this:
PHP
<?php
/*
* After copying the file to /usr/share/openmediavault/engined/module run
* > monit restart omv-engined
* > omv-mkworkbench all
* on the shell
*/
class OMVModuleGetmail extends \OMV\Engine\Module\ServiceAbstract
implements \OMV\Engine\Module\IServiceStatus
{
public function getName()
{
return "getmail6";
}
public function getStatus()
{
$cmd = new \OMV\System\Process("systemctl --user --machine user@ is-active getmail-adr@user.account-at-gmx.net.service");
$cmd->setQuiet(true);
$cmd->execute($output, $exitStatus);
return array(
"name" => $this->getName(),
"title" => gettext("Getmail"),
"enabled" => true,
"running" => (0 == $exitStatus) ? true : false
);
}
}
Display More