Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for root operations in continuation scripts #227

Merged
merged 1 commit into from Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions 1.8.3/alpine/entrypoint.sh
Expand Up @@ -116,6 +116,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -125,8 +129,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 1.8.3/debian/entrypoint.sh
Expand Up @@ -127,6 +127,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -136,8 +140,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.0.0/alpine/entrypoint.sh
Expand Up @@ -116,6 +116,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -125,8 +129,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.0.0/debian/entrypoint.sh
Expand Up @@ -127,6 +127,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -136,8 +140,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.1.0/alpine/entrypoint.sh
Expand Up @@ -116,6 +116,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -125,8 +129,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.1.0/debian/entrypoint.sh
Expand Up @@ -127,6 +127,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -136,8 +140,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.2.0/alpine/entrypoint.sh
Expand Up @@ -116,6 +116,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -125,8 +129,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.2.0/debian/entrypoint.sh
Expand Up @@ -127,6 +127,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -136,8 +140,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.3.0/alpine/entrypoint.sh
Expand Up @@ -116,6 +116,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -125,8 +129,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.3.0/debian/entrypoint.sh
Expand Up @@ -127,6 +127,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -136,8 +140,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.4.0/alpine/entrypoint.sh
Expand Up @@ -116,6 +116,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -125,8 +129,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.4.0/debian/entrypoint.sh
Expand Up @@ -127,6 +127,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -136,8 +140,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.5.0-snapshot/alpine/entrypoint.sh
Expand Up @@ -116,6 +116,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -125,8 +129,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.5.0-snapshot/debian/entrypoint.sh
Expand Up @@ -127,6 +127,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -136,8 +140,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.5.0.M1/alpine/entrypoint.sh
Expand Up @@ -116,6 +116,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -125,8 +129,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions 2.5.0.M1/debian/entrypoint.sh
Expand Up @@ -127,6 +127,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -136,8 +140,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -496,6 +496,14 @@ fi
```


### Give pcap permissions to the java process

[50-setpcap-on-java](https://github.com/openhab/openhab-docker/blob/master/contrib/cont-init.d/50-setpcap-on-java)

```shell
setcap 'cap_net_bind_service=+ep' /usr/lib/java-8/bin/java
```

## Contributing

[Contribution guidelines](https://github.com/openhab/openhab-docker/blob/master/CONTRIBUTING.md)
Expand Down
7 changes: 5 additions & 2 deletions entrypoint-alpine.sh
Expand Up @@ -116,6 +116,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -125,8 +129,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down
7 changes: 5 additions & 2 deletions entrypoint-debian.sh
Expand Up @@ -127,6 +127,10 @@ case ${OPENHAB_VERSION} in
;;
esac

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
sync

# Run s6-style init continuation scripts if existent
if [ -d /etc/cont-init.d ]
then
Expand All @@ -136,8 +140,7 @@ then
done
fi

# Set openhab folder permission
chown -R openhab:openhab "${APPDIR}"
# sync again after continuation scripts have been run
sync

# Use server mode with the default command when there is no pseudo-TTY
Expand Down