pidof for pgrep

This commit is contained in:
Sven Jorns
2023-07-11 04:44:06 +03:00
parent 9c643844df
commit f43314c405
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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