This is similar as above. But we need one settings directory and one init script per instance.
So we have /home/ptokax directory and user ptokax who owns it (created with a and b above).
a. Create new subdirectory (for this example i'm using px1) with command: mkdir /home/ptokax/px1
b. Move PtokaX config files to /home/ptokax/px1/
c. Set ownership to PtokaX user for that directory and it's content with command: chown -R ptokax:ptokax /home/ptokax/px1
d. Copy init script from PtokaX source to /etc/init.d/ directory
When you have PtokaX with SQLite or without database then use this command: cp init_script /etc/init.d/px1
When you have PtokaX with PostgreSQL then use this command: cp init_script_postgres /etc/init.d/px1
When you have PtokaX with MySQL or MariaDB then use this command: cp init_script_mysql /etc/init.d/px1
e. Open init script in text editor with this command (i'm using Vi because is available on most Unixes preinstalled): vi px1
Change PtokaX settings path PTOKAX_PATH=/home/$PTOKAX_USER/ to PTOKAX_PATH=/home/$PTOKAX_USER/px1/ and PtokaX PID file PTOKAX_PID=/home/$PTOKAX_USER/PtokaX.pid to PTOKAX_PID=/home/$PTOKAX_USER/px1/PtokaX.pid
f. Move to /etc/init.d directory with command: cd /etc/init.d
Make our init script executable with command: chmod +x px1
And install this init script with command: update-rc.d px1 defaults
g. Now PtokaX using px1 directory and init script should start with system start. If you want, then you can test if PtokaX can start with this script using command: /etc/init.d/px1 start
h. Repeat and use another directory/init script name instead of px1 for every PtokaX instance.