1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
post_install() { # add inetsim group if [ ! `getent passwd inetsim` ]; then groupadd -g 101 inetsim &>/dev/null fi # run inetsim setup script cd /opt/inetsim ./setup.sh } post_upgrade() { if (( $(vercmp $2 1.2.6-4) <= 0 )); then groupmod -g 101 inetsim chgrp -R inetsim /opt/inetsim fi }