#!/bin/sh SCRIPT_PATH=$(dirname "$0") SERVICE="acs.service" SERVICE_PATH=$SCRIPT_PATH/../$SERVICE TMP_SERVICE=`mktemp` LONG_ARGS="help,acs-path:,user:" ACS_PATH="" SERVICE_ARGS="run --no-animation --quiet" usage() { cat < $TMP_SERVICE elif [ ! -z "$ACS_PATH" ]; then sed -E "s@^ExecStart=.*@ExecStart=$ACS_PATH $SERVICE_ARGS@g" $SERVICE_PATH > $TMP_SERVICE else usage exit 1 fi setup_service && start_service clean_up