pidof for pgrep
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ FROM orogene:latest as oro
|
||||
# https://gitlab.alpinelinux.org/alpine/docker-abuild/-/blob/master/entrypoint.sh
|
||||
FROM joseluisq/static-web-server:2-debian
|
||||
RUN apt update && apt upgrade -y && \
|
||||
apt install -y git openssh-client bash curl make wget procps && \
|
||||
apt install -y git openssh-client bash curl make wget sysvinit-utils && \
|
||||
apt-get clean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
|
||||
RUN wget https://github.com/barnumbirr/zola-debian/releases/download/v0.17.2-1/zola_0.17.2-1_amd64_bullseye.deb && \
|
||||
dpkg -i zola_0.17.2-1_amd64_bullseye.deb && rm zola_0.17.2-1_amd64_bullseye.deb
|
||||
|
||||
+1
-2
@@ -54,10 +54,9 @@ trap "exit" EXIT
|
||||
|
||||
startSWSifNotRunning () {
|
||||
#static-web-server is /usr/local/bin/static-web-server and in path
|
||||
if pgrep -x "static-web-server" >/dev/null
|
||||
if pidof "static-web-server" >/dev/null
|
||||
then
|
||||
echo "webserver is running"
|
||||
pgrep -x "static-web-server"
|
||||
else
|
||||
echo "try to start webserver:"
|
||||
if [ -f "$OUTPUT_DIR/index.html" ]; then
|
||||
|
||||
Reference in New Issue
Block a user