1 ## arg 1: the new package version
4 echo "Adding munge system group... "
7 echo "Adding munge system user... "
8 useradd -r -c "Munge Daemon" -d /var/log/munge -g munge munge
10 echo "Locking Munge User Account..."
11 passwd -l munge &>/dev/null
14 if [ ! -e /etc/munge/munge.key -a -c /dev/urandom ]; then
15 echo "Creating random munge key : /etc/munge/munge.key"
16 /bin/dd if=/dev/urandom bs=1 count=1024 >/etc/munge/munge.key 2>/dev/null
17 /bin/chmod 0400 /etc/munge/munge.key
19 echo "Warning: did not create /etc/munge/munge.key since /dev/urandom is not found"
23 /bin/chown munge.munge -R /etc/munge
24 /bin/chown munge.munge -R /var/log/munge
25 /bin/chown munge.munge -R /var/lib/munge
26 /bin/chown munge.munge -R /run/munge
31 /bin/chown munge.munge -R /etc/munge
32 /bin/chown munge.munge -R /var/log/munge
33 /bin/chown munge.munge -R /var/lib/munge
34 /bin/chown munge.munge -R /run/munge
35 if [ -e /etc/munge/munge.key ]; then
36 /bin/chmod 0400 /etc/munge/munge.key
40 ## arg 1: the old package version
42 echo "Removing munge system user/group "
46 # vim:set ts=2 sw=2 et: