Run as an autostart systemd service (Linux)
The ReadMe as well as the template for running pdfaPilot 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 pdfaPilot running in dispatcher mode:
<p>sudo mkdir -p /opt/callas/dispatcher
sudo chown -R nobody:daemon /opt/callas/dispatcher</p>
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 pdfaPilot version to be used:
<p>sudo -u nobody bash
cd /opt/callas/dispatcher
mkdir downloads
cd downloads
wget https://www.callassoftware.com/extranet/callas_pdfaPilotCLIandServer/callas_pdfaPilotCLI_x64_Linux_12-3-369.tar.gz
tar xvpf callas_pdfaPilotCLI_x64_Linux_12-3-369.tar.gz
cd ..
ln -s downloads/callas_pdfaPilotCLI_x64_Linux_12-3-369 callas_pdfaPilot_CLI</p>
Preparation
-
Use one of the prepared service templates such as ...
- callas-dispatcher.service
- callas-hotfolder.service
- callas-satellite.service
-
Adjust the service description to fit your needs (e.g. change real installation directory and/or specifiy a
--licenseserver
option) - 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>')
-
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_pdfaPilotCLI_x64_Linux_12-3-369
./pdfaPilot --keycode myname mycompany mylicense.pdf --cachefolder=/opt/callas/dispatcher/cache
./pdfaPilot --activate myactivation.pdf --cachefolder=/opt/callas/dispatcher/cache</p>
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>
Check if the service is working as expected:
<p>sudo systemctl daemon-reload
sudo systemctl start callas-dispatcher
systemctl status callas-dispatcher </p>
Controlling the service
Check the service status:
<p>systemctl status callas-dispatcher</p>
Stop the service:
<p>sudo systemctl stop callas-dispatcher
systemctl status callas-dispatcher</p>
Start the service:
<p>sudo systemctl start callas-dispatcher
systemctl status callas-dispatcher</p>
Restart the service:
<p>sudo systemctl restart callas-dispatcher
systemctl status callas-dispatcher</p>
Set callas dispatcher service to auto start on reboot:
<p>sudo systemctl enable callas-dispatcher</p>
To disable the callas dispatcher service on next reboot:
<p>sudo systemctl disable callas-dispatcher</p>