postinstall 1.25 KB
Newer Older
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 28 29 30 31 32 33 34 35 36
#!/bin/sh
#

if [ -f /tmp/openfireInstallBackup/openfire.xml ]; then
        /bin/mv /tmp/openfireInstallBackup/openfire.xml /opt/openfire/conf/openfire.xml
	/bin/chown daemon:daemon /opt/openfire/conf/openfire.xml
fi

if [ -f /tmp/openfireInstallBackup/keystore ]; then
        /bin/mv /tmp/openfireInstallBackup/keystore /opt/openfire/resources/security/keystore
	/bin/chown daemon:daemon /opt/openfire/resources/security/keystore
fi

if [ -f /tmp/openfireInstallBackup/truststore ]; then
        /bin/mv /tmp/openfireInstallBackup/truststore /opt/openfire/resources/security/truststore
	/bin/chown daemon:daemon /opt/openfire/resources/security/truststore
fi

if [ -f /tmp/openfireInstallBackup/client.truststore ]; then
        /bin/mv /tmp/openfireInstallBackup/client.truststore /opt/openfire/resources/security/client.truststore
	/bin/chown daemon:daemon /opt/openfire/resources/security/client.truststore
fi

if [ -d "/tmp/openfireInstallBackup" ]; then
	/bin/rm -rf /tmp/openfireInstallBackup
fi

if [ -x "/usr/sbin/svccfg" ]; then
	if [ -d "/opt/openfire/resources/solaris" ]; then
		/usr/sbin/svccfg import /opt/openfire/resources/solaris/openfire.xml
	fi
fi

if [ -x "/usr/sbin/svcadm" ]; then
	/usr/sbin/svcadm enable openfire
fi
37 38

/bin/chmod o-rwx /opt/openfire