postinst is in cobbler-web 2.2.2-0ubuntu33.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 26 27 | #!/bin/sh
set -e
if [ "$1" = "configure" ] ; then
# Setup apache
if [ -e /etc/cobbler/cobbler_web.conf -a \
! -e /etc/apache2/conf.d/cobbler_web.conf ]; then
ln -s /etc/cobbler/cobbler_web.conf /etc/apache2/conf.d/cobbler_web.conf
fi
chown www-data:www-data /var/lib/cobbler/webui_sessions
chmod 0700 /var/lib/cobbler/webui_sessions
chown www-data:www-data /var/lib/cobbler/webui_cache
chmod 0700 /var/lib/cobbler/webui_sessions
# moved from cobbler.links
ln -sf /usr/share/cobbler/webroot/cobbler_webui_content /var/www/cobbler_webui_content
# Need to restart apache to pickup web configs
if [ -f /etc/init.d/apache2 ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d apache2 restart || true
else
/etc/init.d/apache2 restart || true
fi
fi
fi
|