You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2018/06/14 18:05:16 UTC
[trafficcontrol] 04/20: setup db
This is an automated email from the ASF dual-hosted git repository.
dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 4b9b5895b3edd3f05aeae3f488b742cf1382dde4
Author: Dan Kirkwood <da...@gmail.com>
AuthorDate: Fri Jun 1 18:26:50 2018 +0000
setup db
---
infrastructure/cdn-in-a-box/traffic_ops/config.sh | 4 +---
infrastructure/cdn-in-a-box/traffic_ops/run.sh | 16 ++++++----------
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/config.sh b/infrastructure/cdn-in-a-box/traffic_ops/config.sh
index a7217fd..dfccc23 100755
--- a/infrastructure/cdn-in-a-box/traffic_ops/config.sh
+++ b/infrastructure/cdn-in-a-box/traffic_ops/config.sh
@@ -45,6 +45,7 @@ done
key=/server.key
crt=/server.crt
+useradd -M trafops
openssl req -newkey rsa:2048 -nodes -keyout $key -x509 -days 365 -out $crt -subj "/C=$CERT_COUNTRY/ST=$CERT_STATE/L=$CERT_CITY/O=$CERT_COMPANY"
chown trafops:trafops $key $crt
@@ -116,6 +117,3 @@ cat <<-EOF >/opt/traffic_ops/app/conf/production/database.conf
"type": "Pg"
}
EOF
-
-cat /opt/traffic_ops/app/conf/cdn.conf
-cat /opt/traffic_ops/app/conf/production/database.conf
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/run.sh b/infrastructure/cdn-in-a-box/traffic_ops/run.sh
index 14cc836..b56d6f4 100755
--- a/infrastructure/cdn-in-a-box/traffic_ops/run.sh
+++ b/infrastructure/cdn-in-a-box/traffic_ops/run.sh
@@ -55,12 +55,12 @@ while true; do
sleep 3
done
-start() {
- TO_DIR=/opt/traffic_ops/app
- export PERL5LIB=$TO_DIR/lib:$TO_DIR/local/lib/perl5
- cd $TO_DIR && $TO_DIR/local/bin/hypnotoad script/cdn
- exec tail -f /var/log/traffic_ops/traffic_ops.log
-}
+TO_DIR=/opt/traffic_ops/app
+export PERL5LIB=$TO_DIR/lib:$TO_DIR/local/lib/perl5
+cd $TO_DIR && ./db/admin.pl -env production reset
+
+cd $TO_DIR && $TO_DIR/local/bin/hypnotoad script/cdn
+exec tail -f /var/log/traffic_ops/traffic_ops.log
init() {
TRAFFIC_OPS_URI="https://localhost"
@@ -101,7 +101,3 @@ init() {
echo "INITIALIZED=1" >> /etc/environment
}
-
-source /etc/environment
-#if [ -z "$INITIALIZED" ]; then init; fi
-start
--
To stop receiving notification emails like this one, please contact
dewrich@apache.org.