Hi Mypresus
When you make an extension, you create a directory structure to package, for example:
mkdir -p pkg/usr/local/bin
mkdir -p pkg/usr/local/etc/haproxy
It then gets packaged using squashfs-tools.tcz:
mksquashfs pkg haproxy.tcz -noappend
When tce-load installs the extension, it mounts it under /tmp/tcloop/ and links the files to the /usr/local file system.
It then runs the tce.installed script if it exists.
Typically what you would do is place a default configuration file in:
pkg/usr/local/etc/haproxy/haproxy.cfg
If the location of the .cfg is hardcoded to /etc, have the tce.installed script create a link to /usr/local/etc/haproxy.
If the end user wants to customize the .cfg file, they can make it editable by:
sudo busybox cp /usr/local/etc/haproxy/haproxy.cfg /usr/local/etc/haproxy/
Then make their changes, add usr/local/etc/haproxy/haproxy.cfg to /opt/.filetool.lst , and run a backup.
... When there is a change made to the .cfg, run the backup (this means a backup must be run on exit otherwise the .cfg changes will be lost). ...
Use the ControlPanel to call up the Backup/Restore application.
... The /opt/ files can be altered (but presumably not advised to do so) as a backup/restore will be performed on those files in mydata.tgz? ...
If something needs to be altered in /opt/ , that should be mentioned in the Comments: section of the .info file.
... If the pc is rebooted say by power outage it must have an automated login ...
The default user is tc and is logged in automatically when booting.
... (and Onboot entry) else the software is not started (or can a tce-load be done before login ?) and there will be no script as ~/.config will not be created. ...
When the system boots, It checks the tce directory for onboot.lst and loads all of the extensions listed in there. It
then runs all of the tce.installed scripts.
... Just a little note, there is no .config file in RPi-64 13.0.0 on a clean install is this an oversite or is the ~/.config being phased out?
I don't think that directory gets created until something actually needs it.
[EDIT]: Corrected path information in backup description. Rich