#!/bin/bash # # lib/stx-integ # # ``plugin.sh`` calls the entry points in this order: # # - install_integ # - configure_integ # - init_integ # - start_integ # - stop_integ # - cleanup_integ _XTRACE_STX_INTEG=$(set +o | grep xtrace) set -o xtrace # Defaults # -------- STXINTEG_DIR=${GITDIR[$STX_INTEG_NAME]} # STX_INST_DIR should be a non-root-writable place to install build artifacts STX_INST_DIR=${STX_INST_DIR:-/usr/local} STX_BIN_DIR=${STX_BIN_DIR:-$STX_INST_DIR/bin} STX_SBIN_DIR=${STX_SBIN_DIR:-$STX_INST_DIR/sbin} # Set up so we don't use sudo for installs when not necessary STX_SUDO="sudo" [[ -w $STX_INST_DIR ]] && STX_SUDO="env" PYTHON_SITE_DIR=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") function cleanup_integ { # Cleanup the service stop_integ } function configure_integ { # Configure the service : } function init_integ { # Initialize and start the service : } function install_integ { # Install the service : } function start_integ { # Initialize and start the service : } function stop_integ { # Shut the service down : } $_XTRACE_STX_INTEG