Files
VPS-scripts_Web-V2/Docs/docs/Dev-Adding-Modules.md
Bram Prieshof 81b7e93678 Main:All Added per CMS config for sub-modules
If CMS is installed and a sub-module requires to be configured per CMS,
this is handeled by new 'CMSHook-(pre)conf.sh'
this has been added to Dev Docs

Updated postfix sub-module to use new CMSHook
Added 'itype' var for detection of install script type
Now also storeing  'Allways on modules' in installer as EnabledAons
2021-02-10 15:23:22 +01:00

2.6 KiB

Module modes

A module can be external(in other/external git repo) or internal(SubModules/).
In both cases the file structure is expected as shown below

List of possible Files and expected Structure

  • conf.sh
  • preconf.sh
  • generic.pkg.list
  • apt.pkg.list
  • dnf.pkg.list
  • <webserver>-conf.sh
  • <webserver>-preconf.sh
  • <Webserver>-generic.pkg.list
  • <Webserver>-apt.pkg.list
  • <Webserver>-dnf.pkg.list
  • config/*
  • CMSHook-preconf.sh
  • CMSHook-conf.sh

The internal module location

SubModules/<ModuleName>

File Explanation

File Name Description
preconf.sh Pre config/apt install commands runs for all web servers
conf.sh Configuration runs for all webservers
generic.pkg.list packagelist for this webserver and php for all distro's
apt.pkg.list packagelist for this webserver and php for distro's that use apt
dnf.pkg.list packagelist for this webserver and php for distro's that use dnf/yum
<Webserver>-preconf.sh Pre config/apt install commands runs for specified webserver
<Webserver>-conf.sh Configuration runs for specified webserver
<Webserver>-generic.pkg.list packagelist for specified webserver for all distro's
<Webserver>-apt.pkg.list packagelist for specified webserver for distro's that use apt
<Webserver>-dnf.pkg.list packagelist for specified webserver for distro's that use dnf/yum
config/* Directory for config files
CMSHook-conf.sh Will run as addtional preconf when CSM is installed
CMSHook-conf.sh Will run after a CSM is installed

Defining in the menu

Add the following to ModulesMenu.list

For each webserver a list define seperate.

Rules for modulenames in menu for all modules

  • a “:” needs to be appended
  • the repo name must not contain capital leters

Rules for modulenames in menu for external modules

  • the name need a “/” pre and appended

Example internal module name: "mynicetest-module"
Example external module name: "/external-nice-module/"

For Whiptail

add under the previous “Options+” make sure to add to all supported webservers

<WebserverName>Options+=("<ModuleName>:" "<Module Description>." OFF)

For legacy

add to the “<WebserverName>Options” variable after the last entry
Make sure the the entry is quoted, otherwise the installer will break

Extra step for external modules

For external modules the raw git url shoud be added to “extModules.list” Example: https://git.ictmaatwerk.com/<user>/<reponame>/raw/branch/master/