mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-21 06:18:58 +08:00
Added shell script for easily setting env variables
This commit is contained in:
@@ -3,30 +3,24 @@
|
||||
|
||||
SLEEP_INTERVAL = 1
|
||||
|
||||
#520 is the real limit
|
||||
VALUE_MAX_LIMIT = 512
|
||||
|
||||
from time import sleep
|
||||
import csv
|
||||
|
||||
import requests
|
||||
import json
|
||||
|
||||
VALUE_MAX_LIMIT = 512
|
||||
|
||||
from coinrpc.coinrpc import namecoind_blocks, namecoind_name_new, check_registration
|
||||
from coinrpc.coinrpc import namecoind_name_update, namecoind_name_show
|
||||
|
||||
from pymongo import Connection
|
||||
conn = Connection()
|
||||
db = conn['namecoin']
|
||||
#-----------------------------------
|
||||
from pymongo import MongoClient
|
||||
db = MongoClient['namecoin']
|
||||
queue = db.queue
|
||||
codes = db.codes
|
||||
remoteusers = db.remoteusers
|
||||
|
||||
from pymongo import MongoClient
|
||||
import os
|
||||
|
||||
LOAD_BALANCER = os.environ['LOAD_BALANCER']
|
||||
|
||||
MONGODB_URI = os.environ['MONGODB_URI']
|
||||
HEROKU_APP = os.environ['HEROKU_APP']
|
||||
from config import MONGODB_URI, HEROKU_APP
|
||||
remote_client = MongoClient(MONGODB_URI)
|
||||
users = remote_client[HEROKU_APP].user
|
||||
|
||||
@@ -335,7 +329,6 @@ def check_new_registrations(IS_LIVE=False):
|
||||
if IS_LIVE:
|
||||
user['dispatched'] = True
|
||||
user['accepted'] = True
|
||||
remoteusers.insert(user)
|
||||
users.save(user)
|
||||
|
||||
print '-' * 5
|
||||
|
||||
36
blockstack_cli/blockstack_registrar/config.py
Normal file
36
blockstack_cli/blockstack_registrar/config.py
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python
|
||||
#-----------------------
|
||||
# Copyright 2014 Halfmoon Labs, Inc.
|
||||
# All Rights Reserved
|
||||
#-----------------------
|
||||
|
||||
'''
|
||||
configuration file
|
||||
'''
|
||||
|
||||
try:
|
||||
from config_local import *
|
||||
except:
|
||||
|
||||
import os
|
||||
|
||||
DEBUG = True
|
||||
|
||||
#--------------------------------------------------
|
||||
NAMECOIND_READONLY = True
|
||||
|
||||
NAMECOIND_USE_HTTPS = True
|
||||
|
||||
NAMECOIND_PORT = os.environ['NAMECOIND_PORT']
|
||||
NAMECOIND_SERVER = os.environ['NAMECOIND_SERVER']
|
||||
NAMECOIND_USER = os.environ['NAMECOIND_USER']
|
||||
NAMECOIND_PASSWD = os.environ['NAMECOIND_PASSWD']
|
||||
WALLET_PASSPHRASE = os.environ['WALLET_PASSPHRASE']
|
||||
#--------------------------------------------------
|
||||
|
||||
MONGODB_URI = os.environ['MONGODB_URI']
|
||||
HEROKU_APP = os.environ['HEROKU_APP']
|
||||
|
||||
LOAD_BALANCER = os.environ['LOAD_BALANCER']
|
||||
|
||||
|
||||
35
blockstack_cli/blockstack_registrar/tools/setup_env.sh
Executable file
35
blockstack_cli/blockstack_registrar/tools/setup_env.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
#-----------------------
|
||||
# Copyright 2014 Halfmoon Labs, Inc.
|
||||
# All Rights Reserved
|
||||
#-----------------------
|
||||
|
||||
echo "Enter NAMECOIND_SERVER:"
|
||||
read input
|
||||
export NAMECOIND_SERVER=$input
|
||||
|
||||
echo "Enter NAMECOIND_PORT:"
|
||||
read input
|
||||
export NAMECOIND_PORT=$input
|
||||
|
||||
echo "Enter NAMECOIND_USER:"
|
||||
read input
|
||||
export NAMECOIND_USER=$input
|
||||
|
||||
echo "Enter NAMECOIND_PASSWD:"
|
||||
read input
|
||||
export NAMECOIND_PASSWD=$input
|
||||
|
||||
echo "Enter WALLET_PASSPHRASE:"
|
||||
read input
|
||||
export WALLET_PASSPHRASE=$input
|
||||
|
||||
echo "Enter LOAD_BALANCER:"
|
||||
read input
|
||||
export LOAD_BALANCER=$input
|
||||
|
||||
echo "Enter MONGODB_URI:"
|
||||
read input
|
||||
export MONGODB_URI=$input
|
||||
|
||||
echo "Done"
|
||||
Reference in New Issue
Block a user