Remove keepalived_script script user, to run scripts with root user

This commit is contained in:
Bertrand Gouny 2017-08-15 17:14:39 +02:00
parent 94c66d7319
commit ae2cfe0ec4
3 changed files with 1 additions and 3 deletions

View File

@ -2,6 +2,7 @@
## 1.3.6 ## 1.3.6
- Keepalived version 1.3.6 - Keepalived version 1.3.6
- Remove keepalived_script script user, to run scripts with root user
## 1.3.5-1 ## 1.3.5-1
- Fix startup.sh and finish.sh ip address removal - Fix startup.sh and finish.sh ip address removal

View File

@ -6,8 +6,6 @@ MAINTAINER Bertrand Gouny <bertrand.gouny@osixia.net>
# Keepalived version # Keepalived version
ARG KEEPALIVED_VERSION=1.3.6 ARG KEEPALIVED_VERSION=1.3.6
RUN addgroup -S keepalived_script && adduser -D -S -G keepalived_script keepalived_script
# Download, build and install Keepalived # Download, build and install Keepalived
RUN apk --no-cache add \ RUN apk --no-cache add \
curl \ curl \

View File

@ -17,7 +17,6 @@ if [ ! -e "$FIRST_START_DONE" ]; then
if [ -n "$KEEPALIVED_NOTIFY" ]; then if [ -n "$KEEPALIVED_NOTIFY" ]; then
sed -i "s|{{ KEEPALIVED_NOTIFY }}|notify \"$KEEPALIVED_NOTIFY\"|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf sed -i "s|{{ KEEPALIVED_NOTIFY }}|notify \"$KEEPALIVED_NOTIFY\"|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
chown keepalived_script:keepalived_script $KEEPALIVED_NOTIFY
chmod +x $KEEPALIVED_NOTIFY chmod +x $KEEPALIVED_NOTIFY
else else
sed -i "/{{ KEEPALIVED_NOTIFY }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf sed -i "/{{ KEEPALIVED_NOTIFY }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf