|
||||||||||||||||||||||||||||||||||||||||||||||||
|
3.4.3 UsageSeptember 13th, 2025 Make Bash Installer is a configuration file driven tool. As such, the command line usage takes a single argument. # make-bash-installer <CONFIG_FILE> By convention, the config file is called appconf. However it can be any filename you wish. 3.4.3.1 Configuration file formatThe configuration files contains a list of instructions. Each instruction is on a single line and instructions are always executed top to bottom in order. Running the instructions top to bottom is important. It ensures that dependencies can be met such as creating a directory and then installing files into it. The application config file is divided into four columns that have meaning as described in the table below which changes depending on the context defined in the first column.
Column 1 file namesFile names can be absolute or relative. If relative, they are relative to the location of the Column 2 file name syntaxThe installation path for directories and file names is absolute. However, that can get a little verbose. A file or directory can be prefixed with the "@" character to indicate it should be installed into the last directory that was created. For example: DIR /opt/myApp apache:mysql 0750 DIR @config apache:mysql 0750 start.sh @start apache:mysql 0550 stop.sh @stop apache:mysql 0550 The instructions above create the following in order:
Column 3 owner:group syntaxOften, files will have the same ownership. It can be cumbersome to type out the same user and group name many times. Therefore, this column can be populated with the "@" character to indicate that the owner and group are the same as the last file or directory. For example: DIR /opt/myApp apache:mysql 0750 DIR @config @ 0750 start.sh @start @ 0550 stop.sh @stop @ 0550 In this example, all files and directories will be created owned by the user apache and the group mysql. Column 4 permissions syntaxPermissions must be written as a numerical octet. Often, files will have the same permissions. DIR /opt/myApp apache:mysql 0750 DIR @config @ @ start.sh @start @ 0550 stop.sh @stop @ @ In this example, both directories are created with octet 0750, and both files with octet 0550. Example fileThe following is a made up, but perfectly valid, file. # OBJECT SAVE AS/RUN/TAR/USERS OWNERS/GROUPS/PATH PERMISSIONS/ID %UNINSTALLER AC-firewall GROUP myGroup 456 USER myUser myGroup,root DIR /home/myUser myUser 0700 bashrc @.bashrc @ @ DIR /etc/firewall-test root:root 0755 /etc/iptables @iptables @ 0550 /etc/ipconf @iptables.conf @ @ corefiles.tar TAR ../resources MAKETAR /var config_services RUN Let us interpret that in plain language.
3.4.3.2 UninstallersThe %UNINSTALLER special directive is great, but it has the following limitations:
This directive is really useful for simple software that was added to the system using a Make Bash Installer program. But is not suitable for rolling back changes. If you need to perform complex uninstalls, you should create a dedicated script for that instead and pack it in with the other files defined in the appconf file. 3.4.3.3 LoggingMake Bash Installer does not produce installation logs. But it does output all operations to standard output, which can be easily redirected to create an installation log. Make Bash Installer is itself packed using the make-bash-installer command. Here is what the output looks like during installation: # ./install_make-bash-installer_3.4.1 Starting 'install_make-bash-installer_3.4.1' installation at 2021-11-11 14:33:58 Created file '/bin/make-bash-installer' Installation 'install_make-bash-installer_3.4.1' complete at 2021-11-11 14:33:58 As you can see, it just creates one file. Complex applications will output every step which also allows the user to see what stage an installation fails at.
|
|||||||||||||||||||||||||||||||||||||||||||||||