Comments (8)
Hi @preske87
I'm currently away, but will be back next week. There are too many variations to handle for what a user might do, so the assumption was that if anything was under /etc/icinga2, the user had already created the correct configurations. The basic check is here: https://github.com/jjethwa/icinga2/blob/master/content/opt/setup/50-icinga2#L17 You could modify the check to ignore your custom directory or modify the icinga2 helper script to copy over the contents of /etc/icinga_custom once the defaults are copied over. I'd be happy to review a PR, but I think the best option would be to use the Director module as it's already included and has a variety of options for importing configs. Let me know what you think.
from icinga2.
Hi @jjethwa ,
thank you for the invitation. I wanted to take the liberty to create a new branch and raise a pull request from there. But github tells me I am not allowed to create a new branch :(
Thus my idea:
Create a new file /content/opt/setup/69-post-installation-custom
with following content
#!/bin/bash
if [ ! -z "$CUSTOM_POST_INSTALLATION_SCRIPT" ]
then
echo "Executing "$CUSTOM_POST_INSTALLATION_SCRIPT
bash $CUSTOM_POST_INSTALLATION_SCRIPT
else
echo "Environment variable CUSTOM_POST_INSTALLATION_SCRIPT is not set, will not execute any post installation script"
fi
Extend the table with the environment variables in README.md
with this line
| `CUSTOM_POST_INSTALLATION_SCRIPT`| *unset* | Allows to specify a bash script, which is e.g. mapped through volume, which is executed at the end of the setup. Through this script it is e.g. possible to establish symlinks or copy files into default directories. |
When defining the container then, one can set this variable and have any freedom to execute code after the setup. That's I think the most flexible solution.
I happy you accept it.
from icinga2.
Hi @preske87
That looks good, I can test it when I get back. You can create a fork of the repo, make changes to the fork, then send a PR over to this repo so you get the credit 😃
from icinga2.
Thank you @jjethwa ,
there is the PR: #295
from icinga2.
Thanks @preske87 I'll review it asap next week 😄
from icinga2.
Hi @preske87
Thanks again for the PR, just merged it and a build is running now. The latest tag should be available for testing in 15-30 minutes. Really appreciate it 😄
from icinga2.
Hurray, after #297 it works properly
from icinga2.
Thanks, @preske87 you rock! 😃
from icinga2.
Related Issues (20)
- having issues with mail HOT 3
- Adding Vsphere Module HOT 5
- Cant restart an exited container HOT 11
- Your MySQL Database Server is running currently inside the icinga2 container. In future, the MySQL will be located in a separate container by default. HOT 22
- Corrupt File? HOT 5
- No Graphs from graphite for 12 hours or more (Days, Weeks, Months and Years) HOT 6
- Permissions building the image HOT 2
- Additional App HOT 1
- DockerFile issue: Access denied for user root (using password NO) HOT 16
- have issue with check_http HOT 9
- Director supervisor script should not run when director is disabled HOT 7
- mail notification problem HOT 7
- Environment variable to specify icinga2 `log-level` HOT 7
- Class 'Icinga\Util\Translator' not found HOT 4
- permission error on /var/cache/icinga2 folder under Windows HOT 1
- Errors after upgrade HOT 2
- Documentation mismatch HOT 1
- Dockerfile: deb http://packages.icinga.org/debian does not exist anymore (?) HOT 2
- MySQL user 'root' has no password HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icinga2.