Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |
wiki:creating_extensions [2024/08/24 18:10] – [Abbreviated steps] rhermsen | wiki:creating_extensions [2024/08/25 13:09] (current) – [Adding Custom Startup Scripts] rhermsen |
---|
If your software needs a startup script then create the folder for it | If your software needs a startup script then create the folder for it |
<code bash>mkdir -p /tmp/package/usr/local/tce.installed</code> | <code bash>mkdir -p /tmp/package/usr/local/tce.installed</code> |
Next, create script as **/tmp/package/usr/local/tce.installed/package_name** if you would like to do something when the package is first installed or again mounted on boot. | Next, create script as **/tmp/package/usr/local/tce.installed/package_name** if you would like to do something when the package is first installed or again mounted on boot. The first line of the script should be <code bash>#!/bin/sh</code> |
A good pattern to follow would be to first rename **/tmp/package/usr/local/etc/package_name.conf** to **package_name.conf.sample**, and for your script to check always whether /usr/local/etc/package_name.conf exists, and if no, copy over /usr/local/etc/package_name.conf.sample into it. This is so that the application's configuration files are fully writable in the natural path, without having to resort to weird paths that you determine on your own. | A good pattern to follow would be to first rename **/tmp/package/usr/local/etc/package_name.conf** to **package_name.conf.sample**, and for your script to check always whether /usr/local/etc/package_name.conf exists, and if no, copy over /usr/local/etc/package_name.conf.sample into it. This is so that the application's configuration files are fully writable in the natural path, without having to resort to weird paths that you determine on your own. |
e.g.: | e.g.: |