#!/bin/sh
export PATH=/opt/lnxall_app/bin:/opt/lnxall_app/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
# TODO: Add post-installation instruction here, SUCH as restart service
bmser_lib_install() {
	cd /opt/lnxall_app
	if [ ! -f platspec/bmser_lib.service ] ; then
		: no need to install
		return 0
	fi

	local tfile=/usr/lib/systemd/system/bmser_lib.service
	diff -q platspec/bmser_lib.service ${tfile} >/dev/null 2>/dev/null
	if [ $? -ne 0 ] ; then
		cp -v -f platspec/bmser_lib.service ${tfile}
		systemctl daemon-reload
	fi
	systemctl enable bmser_lib.service
	systemctl restart bmser_lib.service
	return 0
}
bmser_lib_install
exit $?
