Merged
Conversation
Contributor
vanosg
commented
Jan 2, 2023
Diff for 08c2d16:diff --git a/_bashbrew-cat b/_bashbrew-cat
index d9f50ba..04b7d08 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -8,5 +8,5 @@ Directory: 1.9
Tags: develop
Architectures: amd64, arm32v6, arm64v8
-GitCommit: e94ae9c0f36d8d21a76020c936d954572ceac7f8
+GitCommit: 2738d384c741c4710aba220373c83d8641889846
Directory: develop
diff --git a/eggdrop_develop/Dockerfile b/eggdrop_develop/Dockerfile
index a009bb6..a658375 100644
--- a/eggdrop_develop/Dockerfile
+++ b/eggdrop_develop/Dockerfile
@@ -6,8 +6,8 @@ RUN adduser -S eggdrop
# grab su-exec for easy step-down from root
RUN apk add --no-cache 'su-exec>=0.2'
-ENV EGGDROP_SHA256 297c0dacb6c3ea03b260d863be9f0f34099f5ed6d4f4ba07b7493b0f66c2cbae
-ENV EGGDROP_COMMIT 6f4309cdfb82cf0763c27d30a3db75dc96e4a8ab
+ENV EGGDROP_SHA256 caafc1ad001e2e77793dca37998cb94d88efadb4ec9c3de44c1004b04f15aa6e
+ENV EGGDROP_COMMIT 2a6a36888f5aa2204d84a9e6282d35e5421c2c8a
RUN apk --update add --no-cache bash openssl
RUN apk --update add --no-cache --virtual egg-deps wget ca-certificates make tar gnupg build-base openssl-dev \
diff --git a/eggdrop_develop/docker.tcl b/eggdrop_develop/docker.tcl
index 16a466d..fab155c 100644
--- a/eggdrop_develop/docker.tcl
+++ b/eggdrop_develop/docker.tcl
@@ -25,3 +25,33 @@ proc nag_owner {hand idx} {
putlog "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
}
}
+
+### Add user from host env variable
+if {![countusers]} {
+ if {[info exists ::env(EGGOWNER)]} {
+ if {![info exists ::env(EGGOWNER_PASS)]} {
+ putlog "* ERROR: Owner handle specified, but password environment variable missing."
+ die "Quitting. Set EGGOWNER_PASS to fix"
+ } else {
+ adduser $::env(EGGOWNER)
+ setuser $::env(EGGOWNER) PASS $::env(EGGOWNER_PASS)
+ chattr $::env(EGGOWNER) +n
+ putlog "* Added handle '$::env(EGGOWNER)' as the owner of this Eggdrop"
+ }
+ } else {
+ if {[info exists ::env(EGGOWNER)]} {
+ putlog "* EGGOWNER variable set, but userfile already contains users. Owner not added."
+ }
+ }
+}
+
+### Add channels from host env variable
+foreach eggchan [split $::env(CHANNELS) ","] {
+ if {[string index $eggchan 0] ne "#"} {
+ continue
+ }
+ if {[lsearch -exact [channels] $eggchan] < 0} {
+ channel add $eggchan
+ putlog "* Adding $eggchan to Eggdrop"
+ }
+}
diff --git a/eggdrop_develop/entrypoint.sh b/eggdrop_develop/entrypoint.sh
index 3c0e126..0629dbc 100755
--- a/eggdrop_develop/entrypoint.sh
+++ b/eggdrop_develop/entrypoint.sh
@@ -87,9 +87,11 @@ EOS
-e "/set realname \"\/msg LamestBot hello\"/c\set realname \"Docker Eggdrop!\"" \
-e '/edit your config file completely like you were told/d' \
-e '/Please make sure you edit your config file completely/d' eggdrop.conf
- echo "if {[catch {source scripts/docker.tcl} err]} {" >> ${CONFIG}
- echo " putlog \"INFO: Could not load docker.tcl file\"" >> ${CONFIG}
- echo "}" >> ${CONFIG}
+ echo "server add ${SERVER}" >> eggdrop.conf
+ echo "if {[catch {source scripts/docker.tcl} err]} {" >> eggdrop.conf
+ echo " putlog \"INFO: Could not load docker.tcl file\"" >> eggdrop.conf
+ echo " putlog \"Error: \$err\"" >> eggdrop.conf
+ echo "}" >> eggdrop.conf
mv /home/eggdrop/eggdrop/eggdrop.conf /home/eggdrop/eggdrop/data/${CONFIG}
else
if [ -e /home/eggdrop/eggdrop/eggdrop.conf ]; thenRelevant Maintainers:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.