{"action":"opened","issue":{"url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/1668","repository_url":"https://api.github.com/repos/mail-in-a-box/mailinabox","labels_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/1668/labels{/name}","comments_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/1668/comments","events_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/1668/events","html_url":"https://github.com/mail-in-a-box/mailinabox/issues/1668","id":516631213,"node_id":"MDU6SXNzdWU1MTY2MzEyMTM=","number":1668,"title":"[IDEA] Allow for custom scripts to be run during setup","user":{"login":"victorlap","id":1645632,"node_id":"MDQ6VXNlcjE2NDU2MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1645632?v=4","gravatar_id":"","url":"https://api.github.com/users/victorlap","html_url":"https://github.com/victorlap","followers_url":"https://api.github.com/users/victorlap/followers","following_url":"https://api.github.com/users/victorlap/following{/other_user}","gists_url":"https://api.github.com/users/victorlap/gists{/gist_id}","starred_url":"https://api.github.com/users/victorlap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorlap/subscriptions","organizations_url":"https://api.github.com/users/victorlap/orgs","repos_url":"https://api.github.com/users/victorlap/repos","events_url":"https://api.github.com/users/victorlap/events{/privacy}","received_events_url":"https://api.github.com/users/victorlap/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-11-02T15:34:42Z","updated_at":"2019-11-02T15:34:42Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Right now it is not possible to extend the default scripts or overwrite them with your own, without the changes being reversed during the next upgrade.\r\n\r\nIt would be nice to include some sort of extension points in the setup scripts. For example, if I wanted to change the roundcube config, I can add a file `/extend/webmail.sh` which mailinabox can run during setup.\r\n\r\nA change can look like this in any of the setup scripts, for example at the end of [setup/webmail.sh](https://github.com/mail-in-a-box/mailinabox/blob/master/setup/webmail.sh).\r\n\r\n```bash\r\nif [ ! -f extend/webmail.sh ]; then\r\n  source extend/webmail.sh\r\nfi\r\n```\r\n\r\nThen the `extend/webmail.sh` can look something like this:\r\n\r\n```bash\r\ntools/editconf.py $RCM_CONFIG \\\r\n\t\"\\$config['product_name'] = 'My custom roundcube name';\"\r\n```\r\n\r\nIf some people are interested in this, I am willing to take a shot at submitting a PR for this."}}
{"actor":{"display_login":"victorlap"}}