Skip to content

Commit

Permalink
Move postinst and postrm handling of shared users and directories to …
Browse files Browse the repository at this point in the history
…puppet-common
  • Loading branch information
ssm committed Feb 14, 2010
1 parent e8eab7e commit 556d6b8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion debian/puppet.postinst → debian/puppet-common.postinst
@@ -1,11 +1,22 @@
#!/bin/sh -e
#!/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
Expand Down
File renamed without changes.

0 comments on commit 556d6b8

Please sign in to comment.