Skip to content

Commit

Permalink
1.28.1 swampinabox build
Browse files Browse the repository at this point in the history
  • Loading branch information
Carolyn Stienen authored and Carolyn Stienen committed Dec 13, 2016
1 parent 532d5c9 commit d34ef87
Show file tree
Hide file tree
Showing 264 changed files with 7,038 additions and 10,745 deletions.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions Common/checktimeout.pl
@@ -1,4 +1,10 @@
#!/usr/bin/env perl

# This file is subject to the terms and conditions defined in
# 'LICENSE.txt', which is part of this source code distribution.
#
# Copyright 2012-2016 Software Assurance Marketplace

use strict;
use warnings;
use Time::Local;
Expand Down
5 changes: 5 additions & 0 deletions Common/flushprivs.sql
@@ -1,2 +1,7 @@
# This file is subject to the terms and conditions defined in
# 'LICENSE.txt', which is part of this source code distribution.
#
# Copyright 2012-2016 Software Assurance Marketplace

select host,user,password from user;
flush privileges;
5 changes: 5 additions & 0 deletions Common/swamp-shutdown-service
@@ -1,5 +1,10 @@
#!/bin/bash

# This file is subject to the terms and conditions defined in
# 'LICENSE.txt', which is part of this source code distribution.
#
# Copyright 2012-2016 Software Assurance Marketplace

# chkconfig: 3 99 25
# description: swamp bundling of viewer persistent data on shutdown

Expand Down
5 changes: 5 additions & 0 deletions Common/vrunchecktimeout
@@ -1,3 +1,8 @@
# This file is subject to the terms and conditions defined in
# 'LICENSE.txt', which is part of this source code distribution.
#
# Copyright 2012-2016 Software Assurance Marketplace

TOMCATLOGDIR="/opt/tomcat/logs"
RUNOUT=/mnt/out/run.out
EVENTOUT="/dev/ttyS1"
Expand Down
97 changes: 0 additions & 97 deletions DenimGroup/checktimeout.pl

This file was deleted.

55 changes: 0 additions & 55 deletions DenimGroup/swamp-threadfix-service

This file was deleted.

38 changes: 24 additions & 14 deletions DenimGroup/threadfix_viewerdb.sh
Expand Up @@ -4,34 +4,44 @@
# Copyright 2012-2016 Software Assurance Marketplace

RUNOUT=/mnt/out/run.out
echo "`date`: mysqldump to /mnt/out/threadfix.sql"
echo "`date`: mysqldump to /mnt/out/threadfix.sql" >> $RUNOUT 2>&1
EVENTOUT="/dev/ttyS1"
echo "VIEWERDBBACKUP" > $EVENTOUT
echo "`date +"%Y/%m/%d %H:%M:%S"`: mysqldump to /mnt/out/threadfix.sql"
echo "`date +"%Y/%m/%d %H:%M:%S"`: mysqldump to /mnt/out/threadfix.sql" >> $RUNOUT 2>&1
mysqldump --user='threadfix' --password='kEmliabqqXL7SLWWXuny' --databases threadfix > /mnt/out/threadfix.sql 2>> $RUNOUT
dresult=$?
dresultfile=''
if [ "$dresult" != 0 ]; then
echo "`date`: mysqldump failed: $dresult"
echo "`date`: mysqldump failed: $dresult" >> $RUNOUT 2>&1
echo "VIEWERDBDUMPFAIL" > $EVENTOUT
echo "`date +"%Y/%m/%d %H:%M:%S"`: mysqldump failed: $dresult"
echo "`date +"%Y/%m/%d %H:%M:%S"`: mysqldump failed: $dresult" >> $RUNOUT 2>&1
if [ -r /mnt/out/threadfix.sql ]; then
echo "`date`: moving /mnt/out/threadfix.sql to /mnt/out/threadfix.sql.error"
echo "`date`: moving /mnt/out/threadfix.sql to /mnt/out/threadfix.sql.error" >> $RUNOUT 2>&1
echo "`date +"%Y/%m/%d %H:%M:%S"`: moving /mnt/out/threadfix.sql to /mnt/out/threadfix.sql.error"
echo "`date +"%Y/%m/%d %H:%M:%S"`: moving /mnt/out/threadfix.sql to /mnt/out/threadfix.sql.error" >> $RUNOUT 2>&1
mv /mnt/out/threadfix.sql /mnt/out/threadfix.sql.error
dresultfile="threadfix.sql.error"
fi
else
echo "`date`: mysqldump completed to /mnt/out/threadfix.sql"
echo "`date`: mysqldump completed to /mnt/out/threadfix.sql" >> $RUNOUT 2>&1
echo "VIEWERDBDUMPSUCCESS" > $EVENTOUT
echo "`date +"%Y/%m/%d %H:%M:%S"`: mysqldump completed to /mnt/out/threadfix.sql"
echo "`date +"%Y/%m/%d %H:%M:%S"`: mysqldump completed to /mnt/out/threadfix.sql" >> $RUNOUT 2>&1
dresultfile="threadfix.sql"
fi

echo "`date`: bundling threadfix.sql into /mnt/out/threadfix_viewerdb.tar.gz"
echo "`date`: bundling threadfix.sql into /mnt/out/threadfix_viewerdb.tar.gz" >> $RUNOUT 2>&1
echo "`date +"%Y/%m/%d %H:%M:%S"`: bundling threadfix.sql into /mnt/out/threadfix_viewerdb.tar.gz"
echo "`date +"%Y/%m/%d %H:%M:%S"`: bundling threadfix.sql into /mnt/out/threadfix_viewerdb.tar.gz" >> $RUNOUT 2>&1
if [[ "$dresultfile" == "" ]]; then
echo "`date`: no results to bundle results: d[$dresult]"
echo "`date`: no results to bundle results: d[$dresult]" >> $RUNOUT 2>&1
echo "VIEWERDBNOBUNDLE" > $EVENTOUT
echo "`date +"%Y/%m/%d %H:%M:%S"`: no results to bundle results: d[$dresult]"
echo "`date +"%Y/%m/%d %H:%M:%S"`: no results to bundle results: d[$dresult]" >> $RUNOUT 2>&1
else
tar --directory=/mnt/out -czf /mnt/out/threadfix_viewerdb.tar.gz $dresultfile
tresult=$?
echo "`date`: bundling completed into /mnt/out/threadfix_viewerdb.tar.gz with results: d[$dresult] t[$tresult]"
echo "`date`: bundling completed into /mnt/out/threadfix_viewerdb.tar.gz with results: d[$dresult] t[$tresult]" >> $RUNOUT 2>&1
if [ "$tresult" != 0 ]; then
echo "VIEWERDBBUNDLEFAIL" > $EVENTOUT
else
echo "VIEWERDBBUNDLESUCCESS" > $EVENTOUT
fi
echo "`date +"%Y/%m/%d %H:%M:%S"`: bundling completed into /mnt/out/threadfix_viewerdb.tar.gz with results: d[$dresult] t[$tresult]"
echo "`date +"%Y/%m/%d %H:%M:%S"`: bundling completed into /mnt/out/threadfix_viewerdb.tar.gz with results: d[$dresult] t[$tresult]" >> $RUNOUT 2>&1
fi

0 comments on commit d34ef87

Please sign in to comment.