-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,17 +1,24 @@ | ||
# Copyright (C) Inverse inc. | ||
[Unit] | ||
Description=PacketFence LDAP Explorer Daemon | ||
Description=PacketFence LDAP Explorer Service | ||
Wants=packetfence-base.target packetfence-config.service packetfence-iptables.service | ||
After=packetfence-base.target packetfence-config.service packetfence-iptables.service | ||
Before=packetfence-httpd.portal.service | ||
Before=packetfence-docker-iptables.service | ||
Requires=packetfence-docker-iptables.service | ||
PartOf=packetfence-docker-iptables.service | ||
|
||
[Service] | ||
StartLimitBurst=3 | ||
StartLimitInterval=60 | ||
Type=notify | ||
Environment=LOG_LEVEL=INFO | ||
ExecStart=/usr/local/pf/sbin/pfhttpd -conf /usr/local/pf/conf/caddy-services/pfldapexplorer.conf -log-name=pfldapexplorer | ||
TimeoutStopSec=60 | ||
NotifyAccess=all | ||
LimitNOFILE=8192 | ||
ExecStartPre=/bin/perl -I/usr/local/pf/lib -I/usr/local/pf/lib_perl/lib/perl5 '-Mpf::services::manager::pfldapexplorer' -e 'pf::services::manager::pfldapexplorer->new()->generateConfig()' | ||
ExecStart=/usr/local/pf/sbin/pfldapexplorer-docker-wrapper | ||
ExecStop=/bin/bash -c "docker stop pfldapexplorer; echo Stopped" | ||
Restart=on-failure | ||
Slice=packetfence.slice | ||
PIDFile=/usr/local/pf/var/run/pfldapexplorer-systemd-notify.pid | ||
|
||
[Install] | ||
WantedBy=packetfence.target | ||
WantedBy=packetfence.target |
This file contains 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,20 @@ | ||
ARG KNK_REGISTRY_URL | ||
ARG IMAGE_TAG | ||
FROM ${KNK_REGISTRY_URL}/pfbuild-debian-bullseye:${IMAGE_TAG} | ||
RUN mkdir -p /usr/local/pf/ | ||
WORKDIR /usr/local/pf/ | ||
|
||
COPY go/go.mod /usr/local/pf/go/ | ||
COPY go/go.sum /usr/local/pf/go/ | ||
RUN cd /usr/local/pf/go/ && go mod download | ||
|
||
COPY ./go /usr/local/pf/go | ||
COPY ./lib /usr/local/pf/lib | ||
COPY ./config.mk /usr/local/pf/config.mk | ||
RUN cd /usr/local/pf/go/ && make pfhttpd | ||
|
||
FROM ${KNK_REGISTRY_URL}/pfdebian:${IMAGE_TAG} | ||
WORKDIR /usr/local/pf/ | ||
COPY ./config.mk /usr/local/pf/config.mk | ||
COPY --from=0 /usr/local/pf/go/pfhttpd /usr/local/pf/sbin/pfhttpd | ||
ENTRYPOINT /usr/local/pf/sbin/pfhttpd -conf /usr/local/pf/conf/caddy-services/pfldapexplorer.conf -log-name pfldapexplorer |
This file contains 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,12 @@ | ||
!/bin/bash | ||
|
||
source /usr/local/pf/containers/systemd-service | ||
|
||
name=pfldapexplorer | ||
|
||
args=`base_args $name` | ||
args="$args -v /usr/local/pf/conf:/usr/local/pf/conf -p 100.64.0.1:22226:22226 -p 127.0.0.1:22226:22226" | ||
|
||
cd /usr/local/pf/ | ||
|
||
run $name "$args" |