Customization of the init/service script for deb and rpm installations

Starting with the installation packages in 2017 (i-net Clear Reports 2017, i-net PDFC 4 and i-net HelpDesk 8.1) there is a new, customizable service script for deb- and rpm based installations. The customizable scripts allow permanent storage of configuration changes even when updating to a newer version (the service script will be overwritten).

Depending on your system you can create on of the following configuration files:

/etc/default/<servicename>
/etc/sysconfig/<servicename>

The <servicename> is derived from the script name in /etc/init.d (clear-reports, pdfc or helpdesk). The following settings can be changed (see /etc/init.d/<servicename> for default values.):

# Changing the user the server is run with
DAEMON_USER="<username>"

# Changing the parameters the Java runtime is started with, e.g. -Dclearreports.config=User/Default
STARTARGUMENTS="$STARTARGUMENTS <additional params>"

# Changing the working directory - take care: the program files have to reside here!
WORKINGDIR="<working directory>"

# The PID file
PIDFILE="<PID file>"

# Changing the main java program. This may be required if you want a different Java VM
DAEMON_EXEC="<path to java>"

# Changing the main archive to execute. Will be set using the -cp param. You should not change this though.
MAINARCHIVE="<main archive jar file>"

# Changing the main class in the MAINARCHIVE file. You really should not change this though.
MAINCLASS="<main class in jar file>"