-
-
Save anonymous/b24eaae405ab581fcb2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@dessalines001:~/docker-helper-scripts/lib/docker/puppetmaster# diff /var/lib/dpkg/info/puppet-common.postinst /usr/share/puppet/ext/debian/puppet-common.postinst | |
35c35 | |
< | |
--- | |
> #DEBHELPER# | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
if [ "$1" = "configure" ]; then | |
# Create the "puppet" user | |
if ! getent passwd puppet > /dev/null; then | |
adduser --quiet --system --group --home /var/lib/puppet \ | |
--no-create-home \ | |
--gecos "Puppet configuration management daemon" \ | |
puppet | |
fi | |
# Set correct permissions and ownership for puppet directories | |
for dir in /var/{run,lib,log}/puppet; do | |
if ! dpkg-statoverride --list "$dir" >/dev/null 2>&1; then | |
dpkg-statoverride --update --add puppet puppet 0750 "$dir" | |
fi | |
done | |
# Create folders common to "puppet" and "puppetmaster", which need | |
# to be owned by the "puppet" user | |
install --owner puppet --group puppet --directory \ | |
/var/lib/puppet/state | |
install --owner puppet --group puppet --directory \ | |
/var/lib/puppet/reports | |
# Handle | |
if [ -d /etc/puppet/ssl ] && [ ! -e /var/lib/puppet/ssl ] && grep -q 'ssldir=/var/lib/puppet/ssl' /etc/puppet/puppet.conf; then | |
mv /etc/puppet/ssl /var/lib/puppet/ssl | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment