File: puppet-common.postinst

package info (click to toggle)
puppet 2.6.2-5%2Bsqueeze9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,728 kB
  • ctags: 8,726
  • sloc: ruby: 110,196; sh: 934; lisp: 263; xml: 122; sql: 103; makefile: 90; python: 84
file content (25 lines) | stat: -rw-r--r-- 639 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

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  \
			--gecos "Puppet configuration management daemon" \
			puppet
	fi

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