Als Autostart systemd Service ausführen (Linux)

Die ReadMe Datei sowie das Template zum Ausführen von pdfToolbox als Autostart systemd Service unter Linux finden Sie ebenfalls im Installationspaket im folgenden Ordner:

etc/systemd

systemd callas service usage/installation example

Note: Requires root permissions.

Note: The service description must *not* contain a privateTemp attribute.

Note: The whole <install_dir> path including all higher level directories need to have at least read-and-execute permissions.

Recommendation: Unpack the installer below a non-userspecific directory (such as e.g. /opt/callas).

Note: A --cachefolder option *must* be used, *even* if the user executing the service actually has a home directory. That is because per default a subdirectory of '/usr/share/callas software' is used as the storage folder and creating the needed directory structure would require permissions to run with the root user account.

Note: The <install_dir> and the <cache folder> must be owned by the user executing the service.

Recommendation: Choose a top level folder to contain the <install_dir> and the <cache folder>. Then change ownership for the whole top level folder, e.g. for pdfToolbox running in dispatcher mode:

<p>sudo mkdir -p /opt/callas/dispatcher	

sudo chown -R nobody:daemon /opt/callas/dispatcher</p>
Click to copy

Recommendation: to make future updates easier it is recommended to have a download folder, e.g. /opt/callas/dispatcher/download. A symlink would then point to the concrete pdfToolbox version to be used:

<p>sudo -u nobody bash	
cd /opt/callas/dispatcher
mkdir downloads
cd downloads
wget https://www.callassoftware.com/extranet/callas_pdfToolboxCLIandServer/callas_pdfToolboxCLI_x64_Linux_14-3-616.tar.gz
tar xvpf callas_pdfToolboxCLI_x64_Linux_14-3-616.tar.gz
cd ..
ln -s downloads/callas_pdfToolboxCLI_x64_Linux_14-3-616 callas_pdfToolbox_CLI</p>
Click to copy

Preparation

  1. Use one of the prepared service templates such as ...
    • callas-dispatcher.service
    • callas-hotfolder.service
    • callas-satellite.service
  2. Adjust the service description to fit your needs (e.g. change real installation directory and/or specifiy a --licenseserver option)
  3. Setup a cache folder (Note: The cache folder must be owned/writable by the executing user, e.g. by running 'sudo -R chown nobody:daemon <given_cache_folder>')
  4. Activate the license. This needs to be done with the user account that is executing the service and the specified --cachefolder
<p>sudo -u nobody bash	
cd downloads/callas_pdfToolboxCLI_x64_Linux_14-3-616
./pdfToolbox	--keycode myname mycompany mylicense.pdf	--cachefolder=/opt/callas/dispatcher/cache
./pdfToolbox	--activate myactivation.pdf	--cachefolder=/opt/callas/dispatcher/cache</p>
Click to copy

Installation

Copy the service description to the systemd service directory (as an example we are going to use the callas-dispatcher.service)

Note: /lib/systemd/system/callas-dispatcher.service must be a regular file and *not* a symbolic link.

Note: A 'sudo systemctl daemon-reload' is needed whenever /lib/systemd/system/callas-dispatcher.service is changed.

<p>sudo cp callas-dispatcher.service to /lib/systemd/system	</p>
Click to copy

Check if the service is working as expected:

<p>sudo systemctl daemon-reload
sudo systemctl start callas-dispatcher 
systemctl status callas-dispatcher </p>
Click to copy

Controlling the service

Check the service status:

<p>systemctl status callas-dispatcher</p>
Click to copy

Stop the service:

<p>sudo systemctl stop callas-dispatcher	
systemctl status callas-dispatcher</p>
Click to copy

Start the service:

<p>sudo systemctl start callas-dispatcher	
systemctl status callas-dispatcher</p>
Click to copy

Restart the service:

<p>sudo systemctl restart callas-dispatcher	
systemctl status callas-dispatcher</p>
Click to copy

Set callas dispatcher service to auto start on reboot:

<p>sudo systemctl enable callas-dispatcher</p>
Click to copy

To disable the callas dispatcher service on next reboot:

<p>sudo systemctl disable callas-dispatcher</p>
Click to copy