sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o uid=33 -o gid=33 -o allow_other fluidbook@kingkong.cubedesigners.com:/home/fluidbook/data/docs /usfiles
fi
-mkdir -p /application/protected/fluidbookpublication
-if mountpoint -q "/application/protected/fluidbookpublication"; then
+mkdir -p /application/protected/fluidbookpublication/docs
+if mountpoint -q "/application/protected/fluidbookpublication/docs"; then
:
else
- sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -p 58745 -o uid=33 -o gid=33 -o allow_other toolbox@toolbox.fluidbook.com:/application/protected/fluidbookpublication /application/protected/fluidbookpublication
+ sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o uid=33 -o gid=33 -o allow_other root@godzilla.cubedesigners.com:/application/protected/fluidbookpublication/docs /application/protected/fluidbookpublication/docs
fi
mkdir -p /application/usstorage
use Cubist\Util\Files\Files;
class ProcessFile extends \Fluidbook\Tools\Jobs\ProcessFile {
- protected const DISTANT_ROOTS = ['/application/fluidbook/docs/', '/application/protected/fluidbookpublication/docs/'];
+ protected const DISTANT_ROOT = '/application/fluidbook/docs/';
protected const LOCAL_ROOT = '/files/';
- protected const US_DISTANT_ROOTS = ['/application/usstorage/docs/'];
+ protected const US_DISTANT_ROOT = '/application/usstorage/docs/';
protected const US_LOCAL_ROOT = '/usfiles/';
/**
public function getOut() {
if ($this->getRegion() === 'UE') {
- foreach (self::DISTANT_ROOTS as $dr) {
- return str_replace($dr, self::LOCAL_ROOT, $this->getDistantOut());
- }
+ return str_replace(self::DISTANT_ROOT, self::LOCAL_ROOT, $this->getDistantOut());
} else {
- foreach (self::US_DISTANT_ROOTS as $dr) {
- return str_replace($dr, self::US_LOCAL_ROOT, $this->getDistantOut());
- }
-
+ return str_replace(self::US_DISTANT_ROOT, self::US_LOCAL_ROOT, $this->getDistantOut());
}
}
public function process() {
if ($this->getRegion() === 'UE') {
- return str_replace(self::LOCAL_ROOT, self::DISTANT_ROOTS[0], $this->getPath($this->isForce()));
+ return str_replace(self::LOCAL_ROOT, self::DISTANT_ROOT, $this->getPath($this->isForce()));
} else {
- return str_replace(self::US_LOCAL_ROOT, self::US_DISTANT_ROOTS[0], $this->getPath($this->isForce()));
+ return str_replace(self::US_LOCAL_ROOT, self::US_DISTANT_ROOT, $this->getPath($this->isForce()));
}
}
public function getPdf(): string|null {
$res = Files::firstThatExists($this->getOut() . '/crop.pdf', $this->getOut() . '/fixed.pdf', $this->getOut() . '/original.pdf');
- if (null === $res) {
+ if(null===$res) {
echo 'no pdf in ' . $this->getOut();
}
return $res;