# This is a default template for a post-install scriptlet. # Uncomment only required functions and remove any functions # you don't need (and this header). ## arg 1: the new package version #pre_install() { # do something here #} ## arg 1: the new package version post_install() { #!/bin/sh # Create the newrelic user and group useradd --system -M --home / --shell /sbin/nologin newrelic || true # Symlink for PHP extension ln -s /usr/lib/php/modules/newrelic-20090626-zts.so /usr/lib/php/modules/newrelic-zts.so ln -s /usr/lib/php/modules/newrelic-20090626.so /usr/lib/php/modules/newrelic.so # Kludge the permissions mkdir /var/log/newrelic chmod 1777 /var/log/newrelic inifile=/etc/php/conf.d/newrelic.ini # # When first installing the package, the license key will not be set. # Instead of throwing an error, we want to whine to the user and then exit cleanly. # if sed -e '/^[ ]*#/d' "${inifile}" 2> /dev/null | grep -q 'REPLACE_WITH_REAL_KEY' 2> /dev/null; then if [ -z "${NR_SILENT}" -a -z "${SILENT}" ]; then cat <