Run as an autostart systemd service (Linux)

The ReadMe as well as the template for running pdfToolbox as an autostart systemd service under Linux can also be found in the installation package in the following folder:

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:

sudo mkdir -p /opt/callas/dispatcher	

sudo chown -R nobody:daemon /opt/callas/dispatcher
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:

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
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
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
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.

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

Check if the service is working as expected:

sudo systemctl daemon-reload
sudo systemctl start callas-dispatcher 
systemctl status callas-dispatcher 
Click to copy

Controlling the service

Check the service status:

systemctl status callas-dispatcher
Click to copy

Stop the service:

sudo systemctl stop callas-dispatcher	
systemctl status callas-dispatcher
Click to copy

Start the service:

sudo systemctl start callas-dispatcher	
systemctl status callas-dispatcher
Click to copy

Restart the service:

sudo systemctl restart callas-dispatcher	
systemctl status callas-dispatcher
Click to copy

Set callas dispatcher service to auto start on reboot:

sudo systemctl enable callas-dispatcher
Click to copy

To disable the callas dispatcher service on next reboot:

sudo systemctl disable callas-dispatcher
Click to copy