Sha256: 0c88333d65ddf6381c41a0daa735bb72b2e3248e2ae562a6018ff109955455b1

Contents?: true

Size: 1015 Bytes

Versions: 39

Compression:

Stored size: 1015 Bytes

Contents

#!/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

#DEBHELPER#

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
puppet-3.8.7 ext/debian/puppet-common.postinst
puppet-3.8.7-x86-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.7-x64-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.6 ext/debian/puppet-common.postinst
puppet-3.8.6-x86-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.6-x64-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.5 ext/debian/puppet-common.postinst
puppet-3.8.5-x86-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.5-x64-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.4 ext/debian/puppet-common.postinst
puppet-3.8.4-x86-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.4-x64-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.3 ext/debian/puppet-common.postinst
puppet-3.8.3-x86-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.3-x64-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.2 ext/debian/puppet-common.postinst
puppet-3.8.2-x86-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.2-x64-mingw32 ext/debian/puppet-common.postinst
puppet-3.8.1 ext/debian/puppet-common.postinst
puppet-3.8.1-x86-mingw32 ext/debian/puppet-common.postinst