diff --git a/circus_init.conf b/circus_init.conf new file mode 100644 index 0000000000000000000000000000000000000000..2ec0460900d167436b047aedbe68790100ff4c58 --- /dev/null +++ b/circus_init.conf @@ -0,0 +1,13 @@ +# init/upstart file to start circus daemon +# Currently runs circus as root. Attempts to run as sparc user from upstart failed. +# Copy file to /etc/init/circus.conf +# Important upstart commands: +# $ initctl status circus +# $ stop circus +# $ start circus + +start on started sshd +stop on runlevel[016] + +respawn +exec /opt/circus-env/bin/circusd /etc/circus.ini diff --git a/init.sh b/init.sh new file mode 100644 index 0000000000000000000000000000000000000000..9d71fb75ad41f84b520c7e81442eb95967bb89a9 --- /dev/null +++ b/init.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Environment script to be loaded from .bash_profile. Add the following lines to "~sparc/.bash_profile": +# if [ -f ~/repos/git/sparchive/init.sh ]; then +# . ~/repos/git/sparchive/init.sh +# fi + +export PATH=$HOME/repos/git/sparchive/scripts:$PATH +alias circusctl="/opt/circus-env/bin/circusctl --endpoint=ipc:///var/circus/endpoint" \ No newline at end of file diff --git a/scripts/archive_aeri.sh b/scripts/archive_aeri.sh index db350acacd23da9b8ed761da5f81b47c81333297..7d19cbb129b6750624d7afcf16fc7488c6c0fc26 100755 --- a/scripts/archive_aeri.sh +++ b/scripts/archive_aeri.sh @@ -13,7 +13,7 @@ RSYNC_OPTIONS="-L --partial --inplace --append --archive -vv --progress --timeou # Shouldn't need ssh inside the SPARC, let's just do anonymous # FIXME: Get correct mount point log_msg "Pulling data from AERI: ${AERI_USER}@${AERI_HOST}" -rsync $RSYNC_OPTIONS ${AERI_USER}@${AERI_HOST}:/cygdrive/c/ftp/AE$DATE $AERI_BASE_DIR/ +rsync $RSYNC_OPTIONS ${AERI_USER}@${AERI_HOST}:/cygdrive/c/ftp/AE$DATE $AERI_BASE_DIR/ || log_fatal_msg "Rsync failed" # Push the new data #log_msg "Pushing data to SSEC: ${AERI_BASE_DIR} -> ${PUSH_USER}@${PUSH_HOST}:${PUSH_BASE_DIR}/" diff --git a/scripts/archive_hsrl.sh b/scripts/archive_hsrl.sh index fcb63cde2c6b26307e565efe8247bc6df8a03961..79df6fde6340da50a334a2374463ca36fd431c20 100755 --- a/scripts/archive_hsrl.sh +++ b/scripts/archive_hsrl.sh @@ -14,7 +14,7 @@ RSYNC_OPTIONS="-L --partial --inplace --append --archive -vv --progress --timeou # Shouldn't need ssh inside the SPARC, let's just do anonymous # FIXME: Get correct mount point log_msg "Pulling data from HSRL: ${HSRL_USER}@${HSRL_HOST}" -rsync $RSYNC_OPTIONS ${HSRL_USER}@${HSRL_HOST}:/cygdrive/c/ftp/AE$DATE $HSRL_BASE_DIR/ +rsync $RSYNC_OPTIONS ${HSRL_USER}@${HSRL_HOST}:/cygdrive/c/ftp/AE$DATE $HSRL_BASE_DIR/ || log_fatal_msg "Rsync failed" # Push the new data #log_msg "Pushing data to SSEC: ${HSRL_BASE_DIR} -> ${PUSH_USER}@${PUSH_HOST}:${PUSH_BASE_DIR}/" diff --git a/scripts/sparc_archive_env.sh b/scripts/sparc_archive_env.sh index e4116f6eb2b16f675b34ce74a5d0f56ff99ea684..8f1c60c1d8dcc699fe569de600a0701b3d14df1e 100755 --- a/scripts/sparc_archive_env.sh +++ b/scripts/sparc_archive_env.sh @@ -9,6 +9,10 @@ if [ -z "$SPARC_REV" ]; then log_msg() { echo "$0 : `date -u +%Y-%m-%dT%H:%M:%S` : $1" } + log_fatal_msg() { + echo "$0 : `date -u +%Y-%m-%dT%H:%M:%S` : FATAL : $1" + exit 1 + } log_msg "Loading SPARC environment" # Base directory of all archived data