https://github.com/Paradigm4/shim
Tip revision: 0041e4ae5d05555fdfb77860b17d4d0bfb0ee5d9 authored by Rares Vernica (baron, fedora) on 10 November 2021, 18:03:57 UTC
Drop setup/action script, use bundled Bash scripts to setup SciDB
Drop setup/action script, use bundled Bash scripts to setup SciDB
Tip revision: 0041e4a
after-install.sh
#!/bin/bash
# shim
# package post installation script
# This script is run by the package management system after the shim
# package is installed.
/opt/scidb/XXX_SCIDB_VER_XXX/shim/setup-conf.sh
if test -n "$(which systemctl 2>/dev/null)"
then
# SystemD
cp /opt/scidb/XXX_SCIDB_VER_XXX/shim/shimsvc.service \
/lib/systemd/system/shimsvc.service
systemctl daemon-reload \
|| test "$EXTRA_SCIDB_LIBS_SYSTEMCTL_FAIL_OK" == "true"
systemctl enable shimsvc
systemctl start shimsvc \
|| test "$EXTRA_SCIDB_LIBS_SYSTEMCTL_FAIL_OK" == "true"
elif test -n "$(which update-rc.d 2>/dev/null)"
then
# Ubuntu
cp /opt/scidb/XXX_SCIDB_VER_XXX/shim/shimsvc.initd /etc/init.d/shimsvc
chmod 0755 /etc/init.d/shimsvc
update-rc.d shimsvc defaults
service shimsvc start
elif test -n "$(which chkconfig 2>/dev/null)"
then
# RHEL sysV
cp /opt/scidb/XXX_SCIDB_VER_XXX/shim/shimsvc.initd /etc/init.d/shimsvc
chmod 0755 /etc/init.d/shimsvc
chkconfig --add shimsvc && chkconfig shimsvc on
service shimsvc start
fi