Hello there, I have several questions regarding developing ISPConfig plugins. 1. Say I need to run a job periodically as cronjob, how can I (cleanly) create a custom cronjob for ISPConfig? For example, to fetch external data sources periodically or send periodic emails. 2. Is there a clean way to modify the existing data structure without causing issues? For example, if I wanted to add a new field to the mail_user table, or should I rather create external referential tables? 3. Are there ways to hook and modify default behavior? For example, if I wanted to change the generated Dovecot config file (modifying the SQL queries) or hook into the user authentication flow Thank you and have a great day
Place it in /usr/local/ispconfig/server/lib/classes/cron.d/ like the other cron plugins. Just add your custom fields to the table, it does not matter for ISPConfig as ISPConfig is modifying tables on updates, it does not overrides or replaces them. Just take care to chose a name for the database field which makes it unlikely to cause a conflict with future updates by e.g. prepending your plugin name to the field name. You can override any config file template, search forum for 'conf-custom', you will find many threads that explain this. Besides that, ISPConfig is completely modular, so you can also override any existing server plugin or attach your own plugins in addition to the existing ones on server events.