-
-
Notifications
You must be signed in to change notification settings - Fork 303
SAML Support for docker #463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LoveSkylark
wants to merge
10
commits into
librenms:master
Choose a base branch
from
LoveSkylark:saml
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9336988
adding xmlwriter
LoveSkylark 53921a2
Merge branch 'librenms:master' into saml
LoveSkylark d751ffa
add plugin installer
LoveSkylark 24b2130
text cleanup
LoveSkylark 297f375
Merge branch 'saml' of https://github.com/LoveSkylark/librenms-docker…
LoveSkylark eb9cb55
Merge branch 'saml' of https://github.com/LoveSkylark/librenms-docker…
LoveSkylark f595900
Php 8.3 update
LoveSkylark 95c891b
Merge branch 'librenms:master' into saml
LoveSkylark 1aedf4b
Create 09-plugin-add.sh
LoveSkylark df892f8
Merge branch 'saml' of https://github.com/LoveSkylark/librenms-docker…
LoveSkylark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/with-contenv sh | ||
# shellcheck shell=sh | ||
set -e | ||
|
||
INSTALL_PLUGINS=${INSTALL_PLUGINS:-0} | ||
SIDECAR_DISPATCHER=${SIDECAR_DISPATCHER:-0} | ||
SIDECAR_SYSLOGNG=${SIDECAR_SYSLOGNG:-0} | ||
SIDECAR_SNMPTRAPD=${SIDECAR_SNMPTRAPD:-0} | ||
|
||
# Exit if any sidecar is enabled | ||
if [ "$SIDECAR_DISPATCHER" = "1" ] || [ "$SIDECAR_SYSLOGNG" = "1" ] || [ "$SIDECAR_SNMPTRAPD" = "1" ]; then | ||
exit 0 | ||
fi | ||
|
||
# Exit if plugins are not needed | ||
if [ "$INSTALL_PLUGINS" = "0" ]; then | ||
exit 0 | ||
fi | ||
|
||
echo ">> Plugin configuration detected" | ||
|
||
echo "Fixing permissions..." | ||
chown librenms:librenms \ | ||
"${LIBRENMS_PATH}"/composer.* \ | ||
"${LIBRENMS_PATH}/logs/librenms.log" \ | ||
"${LIBRENMS_PATH}/scripts/composer_wrapper.php" | ||
|
||
chown -R librenms:librenms \ | ||
"${LIBRENMS_PATH}/scripts" \ | ||
"${LIBRENMS_PATH}/vendor" \ | ||
"${LIBRENMS_PATH}/bootstrap" | ||
|
||
# Install plugins | ||
lnms plugin:add "$INSTALL_PLUGINS" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/with-contenv sh | ||
# shellcheck shell=sh | ||
set -e | ||
|
||
INSTALL_PLUGINS=${INSTALL_PLUGINS:-0} | ||
|
||
# Continue only if plugins are needed | ||
if [ "$INSTALL_PLUGINS" = "0" ]; then | ||
exit 0 | ||
fi | ||
|
||
echo ">>" | ||
echo ">> Plugin configuration detected" | ||
echo ">>" | ||
|
||
# Fix perms | ||
echo "Fixing perms..." | ||
chown librenms:librenms \ | ||
${LIBRENMS_PATH}/composer.* \ | ||
${LIBRENMS_PATH}/logs/librenms.log \ | ||
${LIBRENMS_PATH}/scripts/composer_wrapper.php | ||
chown -R librenms:librenms \ | ||
${LIBRENMS_PATH}/scripts \ | ||
${LIBRENMS_PATH}/vendor \ | ||
${LIBRENMS_PATH}/bootstrap | ||
|
||
# Create service | ||
IFS=, read -ra PLUGINS <<< "$INSTALL_PLUGINS" | ||
|
||
for plugin in "${PLUGINS[@]}"; do | ||
echo "Installing plugin: $plugin" | ||
|
||
if ! lnms plugin:installed "$plugin"; then | ||
if ! lnms plugin:add "$plugin"; then | ||
echo "Error installing $plugin" >&2 | ||
exit 1 | ||
fi | ||
echo "Installed $plugin" | ||
else | ||
echo "$plugin already installed" | ||
fi | ||
|
||
done |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command does not exist :)