Create a Daemon using Linux

This ReadMe as well as the template to install a Daemon using Linux can also be found inside the installation package in the following folder:


systemd ptb service usage/installation example

note: Requires root permissions

note: the systemd specific privateTemp setting *must not* be used inside the service description

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)

note: a --cachefolder option *must* be used, *even* if the user executing the service actually has a home directory

note: the <install_dir> must be owned by the user executing the service. For example if /opt/callas/pdfToolbox-CLI is used as <install_dir>, then the appropriate chown command would be

sudo chown -R nobody:daemon /opt/callas/pdfToolbox-CLI

note: the same applies to the cachefolder.


(1) cp systemd.ptb.service.template to ptb.service (locally)

(2) edit ptb.service and adjust the given path specs (e.g. INSTALL_DIR --> real installation directory)

(3) setup a cache folder (note: must be owned/writable by the executing user, e.g. by running 'sudo chown nobody:daemon <given_cache_folder>')

# copy the service description to the systemd service directory

sudo cp ptb.service to /lib/systemd/system

note: /lib/systemd/system/ptb.service must be a regular file and *not* a symbolic link

note: 'sudo systemctl daemon-reload' is needed whenever /lib/systemd/system/ptb.service is changed

# check if the service is working as expected ...

sudo systemctl daemon-reload
sudo systemctl start ptb
systemctl status ptb

sudo systemctl stop ptb
systemctl status ptb

sudo systemctl restart ptb
systemctl status ptb

# when everyting is working as excpected ...

# set ptb service to auto start on reboot

sudo systemctl enable ptb

now, when the system reboots next time it will automatically also start the pdfToolbox in --server mode.

# to disable the ptb service on next reboot...

sudo systemctl disable ptb


Send Your Comment

E-Mail me when someone replies to this comment