9f010a3b76
- don't need apachedaemon, as this is same across ubuntu and debian - added the plugins in the correct place - created the link for webportal git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12173 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
48 lines
1.4 KiB
Bash
48 lines
1.4 KiB
Bash
#!/bin/sh
|
|
# postinst script for xcat-ui
|
|
#
|
|
# see: dh_installdeb(1)
|
|
|
|
set -e
|
|
|
|
# summary of how this script can be called:
|
|
# * <postinst> `configure' <most-recently-configured-version>
|
|
# * <old-postinst> `abort-upgrade' <new version>
|
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
|
# <new-version>
|
|
# * <postinst> `abort-remove'
|
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
|
# <failed-install-package> <version> `removing'
|
|
# <conflicting-package> <version>
|
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
# the debian-policy package
|
|
|
|
|
|
case "$1" in
|
|
configure)
|
|
apachedaemon=apache2
|
|
/bin/rm -f /etc/apache2/conf.d/xcat-ui.conf
|
|
/bin/ln -s /opt/xcat/ui/etc/apache2/conf.d/xcat-ui.conf /etc/apache2/conf.d/xcat-ui.conf
|
|
/etc/init.d/apache2 restart
|
|
# automatically put the encrypted passwd into the xcat passwd db
|
|
/opt/xcat/sbin/chtab key=xcat,username=root passwd.password=`grep root /etc/shadow|cut -d : -f 2`
|
|
|
|
echo "To use xCAT-UI, point your browser to http://"`hostname -f`"/xcat"
|
|
;;
|
|
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
;;
|
|
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
# generated by other debhelper scripts.
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|