Skip to content
Snippets Groups Projects
Commit b8cfc221 authored by David Hoese's avatar David Hoese
Browse files

Added some error checking to the 2 archive scripts.

Added a .bash_profile init script
Added an upstart/init script.
parent 74018a06
Branches
No related tags found
No related merge requests found
# 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
#!/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
......@@ -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}/"
......
......@@ -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}/"
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment