diff --git a/Dockerfile b/Dockerfile index 3e015cd..db0ad3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -228,7 +228,6 @@ RUN apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/edge/testing gos RUN groupadd guacd && \ useradd -s /bin/false -g guacd guacd RUN chown guacd:guacd -R ${PREFIX_DIR} -RUN chown guacd:guacd -R ${GUACAMOLE_HOME} # Install tomcat RUN mkdir ${CATALINA_HOME} @@ -302,11 +301,13 @@ RUN set -xe \ ############################################################################### # Finishing Container configuration +RUN chown tomcat:tomcat -R ${GUACAMOLE_HOME} + ENV PATH=/usr/lib/postgresql/${PG_MAJOR}/bin:$PATH ENV GUACAMOLE_HOME=/config/guacamole ENV CATALINA_PID=${CATALINA_HOME}/tomcat.pid ENV POSTGRES_PID=/config/postgresql/postmaster.pid -ENV GUACD_PID=/config/guacamole/guacd.pid +ENV GUACD_PID=${PREFIX_DIR}/guacd.pid # Copy files COPY filefs / diff --git a/filefs/usr/local/bin/_startup.sh b/filefs/usr/local/bin/_startup.sh index 6190d04..156d9d3 100644 --- a/filefs/usr/local/bin/_startup.sh +++ b/filefs/usr/local/bin/_startup.sh @@ -25,7 +25,7 @@ if [ -d "/config/guacamole/" ]; then fi cp -rn /app/guacamole /config mkdir -p /root/.config/freerdp/known_hosts -chown -R guacd:guacd /config/guacamole +chown -R tomcat:tomcat /config/guacamole chown -R tomcat:tomcat /opt/tomcat # Might help to fix issues with bug on tomcat logs # Own postgres folder if exist (change to alpine) diff --git a/scripts/guacd/wrapper_supervisor.sh b/scripts/guacd/wrapper_supervisor.sh index ded15f0..d540a66 100644 --- a/scripts/guacd/wrapper_supervisor.sh +++ b/scripts/guacd/wrapper_supervisor.sh @@ -10,7 +10,7 @@ function shutdown() date echo "Starting Guacd" -/opt/guacamole/sbin/guacd -b 0.0.0.0 -L $GUACD_LOG_LEVEL -p /config/guacamole/guacd.pid -f +/opt/guacamole/sbin/guacd -b 0.0.0.0 -L $GUACD_LOG_LEVEL -p $GUACD_PID -f sleep 5