Sha256: b7cfa18aed347a168ccd76e880c231a31ab3a02211f0f883799b8a47cc68fdc0

Contents?: true

Size: 1004 Bytes

Versions: 500

Compression:

Stored size: 1004 Bytes

Contents

#!/bin/bash

set -e

if [ "$1" = "configure" ]; then

	# Create the "puppet" user
	if ! getent passwd puppet > /dev/null; then
		useradd --system --user-group --home-dir /var/lib/puppet \
			--no-create-home --shell /bin/false \
			--comment "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

500 entries across 500 versions & 2 rubygems

Version Path
puppet-6.24.0 ext/debian/puppet-common.postinst
puppet-6.24.0-x86-mingw32 ext/debian/puppet-common.postinst
puppet-6.24.0-x64-mingw32 ext/debian/puppet-common.postinst
puppet-6.24.0-universal-darwin ext/debian/puppet-common.postinst
puppet-7.9.0 ext/debian/puppet-common.postinst
puppet-7.9.0-x86-mingw32 ext/debian/puppet-common.postinst
puppet-7.9.0-x64-mingw32 ext/debian/puppet-common.postinst
puppet-7.9.0-universal-darwin ext/debian/puppet-common.postinst
puppet-6.23.0 ext/debian/puppet-common.postinst
puppet-6.23.0-x86-mingw32 ext/debian/puppet-common.postinst
puppet-6.23.0-x64-mingw32 ext/debian/puppet-common.postinst
puppet-6.23.0-universal-darwin ext/debian/puppet-common.postinst
puppet-7.8.0 ext/debian/puppet-common.postinst
puppet-7.8.0-x86-mingw32 ext/debian/puppet-common.postinst
puppet-7.8.0-x64-mingw32 ext/debian/puppet-common.postinst
puppet-7.8.0-universal-darwin ext/debian/puppet-common.postinst
puppet-7.7.0 ext/debian/puppet-common.postinst
puppet-7.7.0-x86-mingw32 ext/debian/puppet-common.postinst
puppet-7.7.0-x64-mingw32 ext/debian/puppet-common.postinst
puppet-7.7.0-universal-darwin ext/debian/puppet-common.postinst