mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-17 04:35:14 +01:00
Log files management instead of only relying on docker logs
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
trace()
|
||||
{
|
||||
if [ -n "${TRACING}" ]; then
|
||||
echo "[$(date +%Y-%m-%dT%H:%M:%S%z)] $$ $*" 2>>/var/log/gatekeeper.log 1>&2
|
||||
fi
|
||||
if [ -n "${TRACING}" ]; then
|
||||
local str="[$(date +%Y-%m-%dT%H:%M:%S%z)] $$ $*"
|
||||
echo "${str}" 1>&2
|
||||
echo "${str}" >> /cnlogs/gatekeeper.log
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
"gatekeeper_edit_apiproperties": "If you know what you are doing, it is possible to manually edit the API endpoints/groups authorization. (Not recommended)",
|
||||
"gatekeeper_apiproperties": "You are about to edit the api.properties file. The format of the file is pretty simple: for each action, you will find what access group can access it. <font color='# 0000ff'>Admin</font> group can do what <font color='# 0000ff'>Spender</font> group can, and <font color='# 0000ff'>Spender</font> group can do what <font color='# 0000ff'>Watcher</font> group can. <font color='# 0000ff'>Internal</font> group is for the endpoints accessible only within the Docker network, like the backoffice tasks used by the Cron container. The access groups for each API id/key are found in the <font color='# 0000ff'>keys.properties</font> file.",
|
||||
"gatekeeper_cns": "I use <font underline='true'>domain names</font> and/or <font underline='true'>IP addresses</font> to create valid TLS certificates. For example, if <font color='# 0000ff'>https://cyphernodehost/getbestblockhash</font> and <font color='# 0000ff'>https://192.168.7.44/getbestblockhash</font> will be used, enter <font color='# 0000ff'>cyphernodehost, 192.168.7.44</font> as a possible domains. <font color='# 0000ff'>127.0.0.1, localhost, gatekeeper</font> will be automatically added to your list. Make sure the provided domain names are in your DNS or client's hosts file and is reachable.",
|
||||
"logs_datapath": "The Cyphernode's log files will be stored in a container's mounted directory. Please provide the <font underline='true'>local mounted path</font> to that directory. <font color='#ff0000'>If running on OSX, check mountable directories in Docker's File Sharing configs.</font>",
|
||||
"logs_datapath_custom": "Provide the <font underline='true'>full path name</font> where Cyphernodes log files will be saved.",
|
||||
"traefik_datapath": "The Traefik's files will be stored in a container's mounted directory. Please provide the <font underline='true'>local mounted path</font> to that directory. <font color='#ff0000'>If running on OSX, check mountable directories in Docker's File Sharing configs.</font>",
|
||||
"traefik_datapath_custom": "Provide the <font underline='true'>full path name</font> where the Traefik's files will be saved.",
|
||||
"tor_datapath": "The Tor's files will be stored in a container's mounted directory. Please provide the <font underline='true'>local mounted path</font> to that directory. <font color='#ff0000'>If running on OSX, check mountable directories in Docker's File Sharing configs.</font>",
|
||||
|
||||
@@ -359,6 +359,7 @@ module.exports = class App {
|
||||
|
||||
const pathProps = [
|
||||
'gatekeeper_datapath',
|
||||
'logs_datapath',
|
||||
'traefik_datapath',
|
||||
'tor_datapath',
|
||||
'proxy_datapath',
|
||||
|
||||
@@ -10,10 +10,11 @@ const schemas = {
|
||||
'0.1.0': require('../schema/config-v0.1.0.json'),
|
||||
'0.2.0': require('../schema/config-v0.2.0.json'),
|
||||
'0.2.2': require('../schema/config-v0.2.2.json'),
|
||||
'0.2.3': require('../schema/config-v0.2.3.json')
|
||||
'0.2.3': require('../schema/config-v0.2.3.json'),
|
||||
'0.2.4': require('../schema/config-v0.2.4.json')
|
||||
};
|
||||
|
||||
const versionHistory = [ '0.1.0', '0.2.0', '0.2.2', '0.2.3' ];
|
||||
const versionHistory = [ '0.1.0', '0.2.0', '0.2.2', '0.2.3', '0.2.4' ];
|
||||
const defaultSchemaVersion=versionHistory[0];
|
||||
const latestSchemaVersion=versionHistory[versionHistory.length-1];
|
||||
|
||||
@@ -42,7 +43,8 @@ module.exports = class Config {
|
||||
this.migrations = {
|
||||
'0.1.0->0.2.0': this.migrate_0_1_0_to_0_2_0,
|
||||
'0.2.0->0.2.2': this.migrate_0_2_0_to_0_2_2,
|
||||
'0.2.2->0.2.3': this.migrate_0_2_2_to_0_2_3
|
||||
'0.2.2->0.2.3': this.migrate_0_2_2_to_0_2_3,
|
||||
'0.2.3->0.2.4': this.migrate_0_2_3_to_0_2_4
|
||||
};
|
||||
|
||||
this.setData( { schema_version: latestSchemaVersion } );
|
||||
@@ -227,4 +229,12 @@ module.exports = class Config {
|
||||
this.data.schema_version = '0.2.3';
|
||||
}
|
||||
|
||||
async migrate_0_2_3_to_0_2_4() {
|
||||
const currentVersion = this.data.schema_version;
|
||||
if( currentVersion != '0.2.3' ) {
|
||||
return;
|
||||
}
|
||||
this.data.schema_version = '0.2.4';
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -30,6 +30,44 @@ module.exports = {
|
||||
value: "docker"
|
||||
}]
|
||||
},
|
||||
{
|
||||
when: installerDocker,
|
||||
type: 'list',
|
||||
name: 'logs_datapath',
|
||||
default: utils.getDefault( 'logs_datapath' ),
|
||||
choices: [
|
||||
{
|
||||
name: utils.setupDir()+"/cyphernode/logs",
|
||||
value: utils.setupDir()+"/cyphernode/logs"
|
||||
},
|
||||
{
|
||||
name: utils.defaultDataDirBase()+"/cyphernode/logs",
|
||||
value: utils.defaultDataDirBase()+"/cyphernode/logs"
|
||||
},
|
||||
{
|
||||
name: utils.defaultDataDirBase()+"/.cyphernode/logs",
|
||||
value: utils.defaultDataDirBase()+"/.cyphernode/logs"
|
||||
},
|
||||
{
|
||||
name: utils.defaultDataDirBase()+"/logs",
|
||||
value: utils.defaultDataDirBase()+"/logs"
|
||||
},
|
||||
{
|
||||
name: "Custom path",
|
||||
value: "_custom"
|
||||
}
|
||||
],
|
||||
message: prefix()+'Where do you want to store your log files?'+utils.getHelp('logs_datapath'),
|
||||
},
|
||||
{
|
||||
when: (props)=>{ return installerDocker(props) && (props.logs_datapath === '_custom') },
|
||||
type: 'input',
|
||||
name: 'logs_datapath_custom',
|
||||
default: utils.getDefault( 'logs_datapath_custom' ),
|
||||
filter: utils.trimFilter,
|
||||
validate: utils.pathValidator,
|
||||
message: prefix()+'Custom path for log files?'+utils.getHelp('logs_datapath_custom'),
|
||||
},
|
||||
{
|
||||
when: installerDocker,
|
||||
type: 'list',
|
||||
|
||||
695
cyphernodeconf_docker/schema/config-v0.2.4.json
Normal file
695
cyphernodeconf_docker/schema/config-v0.2.4.json
Normal file
@@ -0,0 +1,695 @@
|
||||
{
|
||||
"definitions": {},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "http://cyphernode.io/config-v0.2.4.json",
|
||||
"type": "object",
|
||||
"title": "Cyphernode config file structure v0.2.4",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schema_version",
|
||||
"setup_version",
|
||||
"features",
|
||||
"net",
|
||||
"use_xpub",
|
||||
"installer_mode",
|
||||
"run_as_different_user",
|
||||
"docker_mode",
|
||||
"docker_versions",
|
||||
"adminhash",
|
||||
"bitcoin_rpcuser",
|
||||
"bitcoin_rpcpassword",
|
||||
"bitcoin_prune",
|
||||
"bitcoin_datapath",
|
||||
"bitcoin_mode",
|
||||
"bitcoin_expose",
|
||||
"gatekeeper_expose",
|
||||
"gatekeeper_keys",
|
||||
"gatekeeper_sslcert",
|
||||
"gatekeeper_sslkey",
|
||||
"gatekeeper_cns",
|
||||
"gatekeeper_clientkeyspassword",
|
||||
"gatekeeper_datapath",
|
||||
"gatekeeper_port",
|
||||
"proxy_datapath",
|
||||
"logs_datapath",
|
||||
"traefik_datapath",
|
||||
"traefik_http_port",
|
||||
"traefik_https_port"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"run_as_different_user": {
|
||||
"enum": [
|
||||
true
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"username"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"use_xpub": {
|
||||
"enum": [
|
||||
true
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"xpub",
|
||||
"derivation_path"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"bitcoin_prune": {
|
||||
"enum": [
|
||||
true
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"bitcoin_prune_size"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"features": {
|
||||
"contains": {
|
||||
"enum": [
|
||||
"tor"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"tor_datapath",
|
||||
"torifyables",
|
||||
"clearnet"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"features": {
|
||||
"contains": {
|
||||
"enum": [
|
||||
"lightning"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"lightning_announce",
|
||||
"lightning_expose",
|
||||
"lightning_implementation",
|
||||
"lightning_datapath",
|
||||
"lightning_nodename",
|
||||
"lightning_nodecolor"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"features": {
|
||||
"contains": {
|
||||
"enum": [
|
||||
"otsclient"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"otsclient_datapath"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"0.2.4"
|
||||
],
|
||||
"default": "0.3.0",
|
||||
"examples": [
|
||||
"0.2.4"
|
||||
]
|
||||
},
|
||||
"setup_version": {
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"v0.2.0"
|
||||
]
|
||||
},
|
||||
"docker_versions": {
|
||||
"$id": "#/properties/dockerVersions",
|
||||
"type": "object",
|
||||
"title": "All versions of the docker containers",
|
||||
"default": {},
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"$id": "#/properties/features",
|
||||
"type": "array",
|
||||
"title": "The optional features of this cyphernode",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$id": "#/properties/features/items",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tor",
|
||||
"lightning",
|
||||
"otsclient"
|
||||
],
|
||||
"title": "The feature",
|
||||
"default": "",
|
||||
"examples": [
|
||||
"tor",
|
||||
"lightning",
|
||||
"otsclient"
|
||||
]
|
||||
}
|
||||
},
|
||||
"torifyables": {
|
||||
"$id": "#/properties/torifyables",
|
||||
"type": "array",
|
||||
"title": "The Torified features of this cyphernode",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$id": "#/properties/torifyables/items",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tor_traefik",
|
||||
"tor_bitcoin",
|
||||
"tor_lightning",
|
||||
"tor_otsoperations",
|
||||
"tor_otswebhooks",
|
||||
"tor_addrwatcheswebhooks",
|
||||
"tor_txidwatcheswebhooks"
|
||||
],
|
||||
"title": "The Torified feature",
|
||||
"default": "",
|
||||
"examples": [
|
||||
"tor_traefik",
|
||||
"tor_bitcoin",
|
||||
"tor_lightning",
|
||||
"tor_otsoperations",
|
||||
"tor_otswebhooks",
|
||||
"tor_addrwatcheswebhooks",
|
||||
"tor_txidwatcheswebhooks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"clearnet": {
|
||||
"$id": "#/properties/clearnet",
|
||||
"type": "array",
|
||||
"title": "The clearnet-allowed Torified features of this cyphernode",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$id": "#/properties/clearnet/items",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"clearnet_bitcoin",
|
||||
"clearnet_lightning"
|
||||
],
|
||||
"title": "The clearnet-allowed Torified feature",
|
||||
"default": "",
|
||||
"examples": [
|
||||
"clearnet_bitcoin",
|
||||
"clearnet_lightning"
|
||||
]
|
||||
}
|
||||
},
|
||||
"net": {
|
||||
"$id": "#/properties/net",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"testnet",
|
||||
"mainnet",
|
||||
"regtest"
|
||||
],
|
||||
"title": "The net cyphernode is running on",
|
||||
"default": "testnet",
|
||||
"examples": [
|
||||
"testnet"
|
||||
]
|
||||
},
|
||||
"use_xpub": {
|
||||
"$id": "#/properties/use_xpub",
|
||||
"type": "boolean",
|
||||
"title": "Use xpub key?",
|
||||
"default": false,
|
||||
"examples": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"xpub": {
|
||||
"$id": "#/properties/xpub",
|
||||
"type": "string",
|
||||
"title": "Default xpub to derive addresses from",
|
||||
"pattern": "^(\\w+)$"
|
||||
},
|
||||
"derivation_path": {
|
||||
"$id": "#/properties/derivation_path",
|
||||
"type": "string",
|
||||
"title": "Default derivation path",
|
||||
"default": "0/n",
|
||||
"examples": [
|
||||
"0/n"
|
||||
]
|
||||
},
|
||||
"installer_mode": {
|
||||
"$id": "#/properties/installer_mode",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"docker"
|
||||
],
|
||||
"title": "Install mode",
|
||||
"default": "docker",
|
||||
"examples": [
|
||||
"docker"
|
||||
]
|
||||
},
|
||||
"run_as_different_user": {
|
||||
"$id": "#/properties/run_as_different_user",
|
||||
"type": "boolean",
|
||||
"title": "Run as different user",
|
||||
"default": true,
|
||||
"examples": [
|
||||
true
|
||||
]
|
||||
},
|
||||
"username": {
|
||||
"$id": "#/properties/username",
|
||||
"type": "string",
|
||||
"title": "Username to run under",
|
||||
"default": "cyphernode",
|
||||
"examples": [
|
||||
"cyphernode"
|
||||
]
|
||||
},
|
||||
"docker_mode": {
|
||||
"$id": "#/properties/docker_mode",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"swarm",
|
||||
"compose"
|
||||
],
|
||||
"title": "How to run the containers",
|
||||
"default": "swarm",
|
||||
"examples": [
|
||||
"compose"
|
||||
]
|
||||
},
|
||||
"bitcoin_rpcuser": {
|
||||
"$id": "#/properties/bitcoin_rpcuser",
|
||||
"type": "string",
|
||||
"title": "Bitcoin rpc user",
|
||||
"default": "bitcoin",
|
||||
"examples": [
|
||||
"bitcoin"
|
||||
]
|
||||
},
|
||||
"bitcoin_rpcpassword": {
|
||||
"$id": "#/properties/bitcoin_rpcpassword",
|
||||
"type": "string",
|
||||
"title": "Bitcoin rpc password",
|
||||
"default": "CHANGEME",
|
||||
"examples": [
|
||||
"CHANGEME"
|
||||
]
|
||||
},
|
||||
"bitcoin_uacomment": {
|
||||
"$id": "#/properties/bitcoin_uacomment",
|
||||
"type": "string",
|
||||
"title": "Bitcoin user agent comment",
|
||||
"examples": [
|
||||
"cyphernode"
|
||||
]
|
||||
},
|
||||
"bitcoin_prune": {
|
||||
"$id": "#/properties/bitcoin_prune",
|
||||
"type": "boolean",
|
||||
"title": "Bitcoin prune",
|
||||
"default": false,
|
||||
"examples": [
|
||||
"false"
|
||||
]
|
||||
},
|
||||
"bitcoin_prune_size": {
|
||||
"$id": "#/properties/bitcoin_prune_size",
|
||||
"type": "integer",
|
||||
"title": "Bitcoin prune size",
|
||||
"default": 550,
|
||||
"examples": [
|
||||
550
|
||||
]
|
||||
},
|
||||
"bitcoin_datapath": {
|
||||
"$id": "#/properties/bitcoin_datapath",
|
||||
"type": "string",
|
||||
"title": "Bitcoin datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/bitcoin"
|
||||
]
|
||||
},
|
||||
"bitcoin_datapath_custom": {
|
||||
"$id": "#/properties/bitcoin_datapath_custom",
|
||||
"type": "string",
|
||||
"title": "Bitcoin custom datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/bitcoin"
|
||||
]
|
||||
},
|
||||
"lightning_datapath": {
|
||||
"$id": "#/properties/lightning_datapath",
|
||||
"type": "string",
|
||||
"title": "Lightning datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/lightning"
|
||||
]
|
||||
},
|
||||
"lightning_datapath_custom": {
|
||||
"$id": "#/properties/lightning_datapath_custom",
|
||||
"type": "string",
|
||||
"title": "Lightning custom datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/lightning"
|
||||
]
|
||||
},
|
||||
"proxy_datapath": {
|
||||
"$id": "#/properties/proxy_datapath",
|
||||
"type": "string",
|
||||
"title": "Proxy datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/proxy"
|
||||
]
|
||||
},
|
||||
"proxy_datapath_custom": {
|
||||
"$id": "#/properties/proxy_datapath_custom",
|
||||
"type": "string",
|
||||
"title": "Proxy custom datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/proxy"
|
||||
]
|
||||
},
|
||||
"otsclient_datapath": {
|
||||
"$id": "#/properties/otsclient_datapath",
|
||||
"type": "string",
|
||||
"title": "OTS Client datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/otsclient"
|
||||
]
|
||||
},
|
||||
"otsclient_datapath_custom": {
|
||||
"$id": "#/properties/otsclient_datapath_custom",
|
||||
"type": "string",
|
||||
"title": "OTS Client custom datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/otsclient"
|
||||
]
|
||||
},
|
||||
"traefik_http_port": {
|
||||
"$id": "#/properties/traefik_port",
|
||||
"type": "integer",
|
||||
"title": "Traefik HTTP port",
|
||||
"default": 80,
|
||||
"examples": [
|
||||
80
|
||||
]
|
||||
},
|
||||
"traefik_https_port": {
|
||||
"$id": "#/properties/traefik_https_port",
|
||||
"type": "integer",
|
||||
"title": "Traefik HTTPS port",
|
||||
"default": 443,
|
||||
"examples": [
|
||||
443
|
||||
]
|
||||
},
|
||||
"traefik_datapath": {
|
||||
"$id": "#/properties/traefik_datapath",
|
||||
"type": "string",
|
||||
"title": "Traefik datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/traefik"
|
||||
]
|
||||
},
|
||||
"traefik_datapath_custom": {
|
||||
"$id": "#/properties/traefik_datapath_custom",
|
||||
"type": "string",
|
||||
"title": "Traefik custom datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/traefik"
|
||||
]
|
||||
},
|
||||
"logs_datapath": {
|
||||
"$id": "#/properties/logs_datapath",
|
||||
"type": "string",
|
||||
"title": "Logs datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/logs"
|
||||
]
|
||||
},
|
||||
"logs_datapath_custom": {
|
||||
"$id": "#/properties/logs_datapath_custom",
|
||||
"type": "string",
|
||||
"title": "Logs custom datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/logs"
|
||||
]
|
||||
},
|
||||
"tor_datapath": {
|
||||
"$id": "#/properties/tor_datapath",
|
||||
"type": "string",
|
||||
"title": "Tor datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/tor"
|
||||
]
|
||||
},
|
||||
"tor_datapath_custom": {
|
||||
"$id": "#/properties/tor_datapath_custom",
|
||||
"type": "string",
|
||||
"title": "Tor custom datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/tor"
|
||||
]
|
||||
},
|
||||
"lightning_announce": {
|
||||
"$id": "#/properties/lightning_announce",
|
||||
"type": "boolean",
|
||||
"title": "Announce lightning ip",
|
||||
"default": false,
|
||||
"examples": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"lightning_external_ip": {
|
||||
"$id": "#/properties/lightning_external_ip",
|
||||
"type": "string",
|
||||
"format": "ipv4",
|
||||
"title": "External lightning node ip",
|
||||
"examples": [
|
||||
"123.123.123.123"
|
||||
]
|
||||
},
|
||||
"bitcoin_mode": {
|
||||
"$id": "#/properties/bitcoin_mode",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"internal"
|
||||
],
|
||||
"title": "Bitcoin mode",
|
||||
"default": "internal",
|
||||
"examples": [
|
||||
"internal"
|
||||
]
|
||||
},
|
||||
"bitcoin_expose": {
|
||||
"$id": "#/properties/bitcoin_expose",
|
||||
"type": "boolean",
|
||||
"title": "Expose bitcoin node",
|
||||
"default": false,
|
||||
"examples": [
|
||||
true
|
||||
]
|
||||
},
|
||||
"lightning_expose": {
|
||||
"$id": "#/properties/lightning_expose",
|
||||
"type": "boolean",
|
||||
"title": "Expose lightning node",
|
||||
"default": true,
|
||||
"examples": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"gatekeeper_expose": {
|
||||
"$id": "#/properties/gatekeeper_expose",
|
||||
"type": "boolean",
|
||||
"title": "Expose gatekeeper port",
|
||||
"default": false,
|
||||
"examples": [
|
||||
true
|
||||
]
|
||||
},
|
||||
"gatekeeper_datapath": {
|
||||
"$id": "#/properties/gatekeeper_datapath",
|
||||
"type": "string",
|
||||
"title": "Gatekeeper datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/gatekeeper"
|
||||
]
|
||||
},
|
||||
"gatekeeper_datapath_custom": {
|
||||
"$id": "#/properties/gatekeeper_datapath_custom",
|
||||
"type": "string",
|
||||
"title": "Gatekeeper custom datapath",
|
||||
"examples": [
|
||||
"/tmp/cyphernode/gatekeeper"
|
||||
]
|
||||
},
|
||||
"gatekeeper_port": {
|
||||
"$id": "#/properties/gatekeeper_port",
|
||||
"type": "integer",
|
||||
"title": "Gatekeeper port",
|
||||
"default": 2009,
|
||||
"examples": [
|
||||
2009
|
||||
]
|
||||
},
|
||||
"gatekeeper_keys": {
|
||||
"$id": "#/properties/gatekeeper_keys",
|
||||
"type": "object",
|
||||
"title": "Gatekeeper keys",
|
||||
"default": {
|
||||
"configEntries": [],
|
||||
"clientInformation": []
|
||||
},
|
||||
"required": [
|
||||
"configEntries",
|
||||
"clientInformation"
|
||||
],
|
||||
"properties": {
|
||||
"configEntries": {
|
||||
"$id": "#/properties/gatekeeper_keys/configEntries",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$id": "#/properties/gatekeeper_keys/configEntries/entry",
|
||||
"type": "string",
|
||||
"pattern": "^kapi_id=\".+\";kapi_key=\".+\";kapi_groups=\".+\";.+$"
|
||||
},
|
||||
"examples": [
|
||||
[
|
||||
"kapi_id=\"000\";kapi_key=\"a27f9e73fdde6a5005879c259c9aea5e8d917eec77bbdfd73272c0af9b4c6b7a\";kapi_groups=\"stats\";eval ugroups_${kapi_id}=${kapi_groups};eval ukey_${kapi_id}=${kapi_key}",
|
||||
"kapi_id=\"001\";kapi_key=\"a27f9e73fdde6a5005879c273c9aea5e8d917eec77bbdfd73272c0af9b4c6b7a\";kapi_groups=\"stats,watcher\";eval ugroups_${kapi_id}=${kapi_groups};eval ukey_${kapi_id}=${kapi_key}",
|
||||
"kapi_id=\"002\";kapi_key=\"fe58ddbb66d7302a7087af3242a98b6326c51a257f5eab1c06bb8cc02e25890d\";kapi_groups=\"stats,watcher,spender\";eval ugroups_${kapi_id}=${kapi_groups};eval ukey_${kapi_id}=${kapi_key}",
|
||||
"kapi_id=\"003\";kapi_key=\"f0b8bb52f4c7007938757bcdfc73b452d6ce08cc0c660ce57c5464ae95f35417\";kapi_groups=\"stats,watcher,spender,admin\";eval ugroups_${kapi_id}=${kapi_groups};eval ukey_${kapi_id}=${kapi_key}"
|
||||
]
|
||||
]
|
||||
},
|
||||
"clientInformation": {
|
||||
"$id": "#/properties/gatekeeper_keys/clientInformation",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$id": "#/properties/gatekeeper_keys/clientInformation/entry",
|
||||
"type": "string",
|
||||
"pattern": "^.+=.+$"
|
||||
},
|
||||
"examples": [
|
||||
[
|
||||
"000=a27f9e73fdde6a5005879c259c9aea5e8d917eec77bbdfd73272c0af9b4c6b7a",
|
||||
"001=a27f9e73fdde6a5005879c273c9aea5e8d917eec77bbdfd73272c0af9b4c6b7a",
|
||||
"002=fe58ddbb66d7302a7087af3242a98b6326c51a257f5eab1c06bb8cc02e25890d",
|
||||
"003=f0b8bb52f4c7007938757bcdfc73b452d6ce08cc0c660ce57c5464ae95f35417"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"gatekeeper_sslcert": {
|
||||
"$id": "#/properties/gatekeeper_sslcert",
|
||||
"type": "string",
|
||||
"title": "Gatekeeper SSL Cert"
|
||||
},
|
||||
"gatekeeper_sslkey": {
|
||||
"$id": "#/properties/gatekeeper_sslkey",
|
||||
"type": "string",
|
||||
"title": "Gatekeeper SSL Key"
|
||||
},
|
||||
"gatekeeper_cns": {
|
||||
"$id": "#/properties/gatekeeper_cns",
|
||||
"type": "string",
|
||||
"title": "Gatekeeper cns",
|
||||
"examples": [
|
||||
"myhost.mydomain.com,*.myotherdomain.com,123.123.123.123"
|
||||
]
|
||||
},
|
||||
"gatekeeper_clientkeyspassword": {
|
||||
"$id": "#/properties/gatekeeper_clientkeyspassword",
|
||||
"type": "string",
|
||||
"title": "Password for the encrypted client keys archive"
|
||||
},
|
||||
"adminhash": {
|
||||
"$id": "#/properties/adminhash",
|
||||
"type": "string",
|
||||
"title": "Bcrypted hash of admin password"
|
||||
},
|
||||
"lightning_implementation": {
|
||||
"$id": "#/properties/lightning_implementation",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"c-lightning"
|
||||
],
|
||||
"title": "The lightning implementation",
|
||||
"default": "c-lightning",
|
||||
"examples": [
|
||||
"c-lightning"
|
||||
]
|
||||
},
|
||||
"lightning_nodename": {
|
||||
"$id": "#/properties/lightning_nodename",
|
||||
"type": "string",
|
||||
"title": "The lightning node name",
|
||||
"examples": [
|
||||
"🚀 Mighty Moose 🚀"
|
||||
]
|
||||
},
|
||||
"lightning_nodecolor": {
|
||||
"$id": "#/properties/lightning_nodecolor",
|
||||
"type": "string",
|
||||
"pattern": "^[0-9A-Fa-f]{6}$",
|
||||
"title": "The lightning node color",
|
||||
"examples": [
|
||||
"ff0000",
|
||||
"00ff00",
|
||||
"00ffff"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ LIGHTNING_IMPLEMENTATION=<%= lightning_implementation %>
|
||||
PROXY_DATAPATH=<%= proxy_datapath %>
|
||||
GATEKEEPER_DATAPATH=<%= gatekeeper_datapath %>
|
||||
GATEKEEPER_PORT=<%= gatekeeper_port %>
|
||||
LOGS_DATAPATH=<%= logs_datapath %>
|
||||
TRAEFIK_DATAPATH=<%= traefik_datapath %>
|
||||
FEATURE_TOR=<%= (features.indexOf('tor') != -1)?'true':'false' %>
|
||||
<% if ( features.indexOf('tor') !== -1 ) { %>
|
||||
|
||||
@@ -140,6 +140,7 @@ services:
|
||||
- "8888:8888"
|
||||
<% } %>
|
||||
volumes:
|
||||
- "<%= logs_datapath %>:/cnlogs"
|
||||
- "<%= proxy_datapath %>:/proxy/db"
|
||||
<% if ( features.indexOf('lightning') !== -1 && lightning_implementation === 'c-lightning' ) { %>
|
||||
- "<%= lightning_datapath %>:/.lightning"
|
||||
@@ -207,6 +208,8 @@ services:
|
||||
- "TOR_HOST=tor"
|
||||
- "TOR_PORT=9050"
|
||||
<% } %>
|
||||
volumes:
|
||||
- "<%= logs_datapath %>:/cnlogs"
|
||||
networks:
|
||||
- cyphernodenet
|
||||
- cyphernodeappsnet
|
||||
@@ -233,6 +236,8 @@ services:
|
||||
ports:
|
||||
- "7777:7777"
|
||||
<% } %>
|
||||
volumes:
|
||||
- "<%= logs_datapath %>:/cnlogs"
|
||||
networks:
|
||||
- cyphernodenet
|
||||
<% if (docker_mode == 'compose') { %>
|
||||
@@ -261,6 +266,7 @@ services:
|
||||
- "TOR_PORT=9050"
|
||||
<% } %>
|
||||
volumes:
|
||||
- "<%= logs_datapath %>:/cnlogs"
|
||||
- "<%= otsclient_datapath %>:/otsfiles"
|
||||
- "<%= bitcoin_datapath %>/bitcoin-client.conf:/.bitcoin/bitcoin.conf:ro"
|
||||
command: $USER /script/startotsclient.sh
|
||||
@@ -289,6 +295,7 @@ services:
|
||||
- "<%= gatekeeper_port %>:<%= gatekeeper_port %>"
|
||||
<% } %>
|
||||
volumes:
|
||||
- "<%= logs_datapath %>:/cnlogs"
|
||||
- "<%= gatekeeper_datapath %>/certs:/etc/ssl/certs:ro"
|
||||
- "<%= gatekeeper_datapath %>/private:/etc/ssl/private:ro"
|
||||
- "<%= gatekeeper_datapath %>/keys.properties:/etc/nginx/conf.d/keys.properties"
|
||||
|
||||
62
cyphernodeconf_docker/test/data/config.0.2.4.json
Normal file
62
cyphernodeconf_docker/test/data/config.0.2.4.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"schema_version": "0.2.2",
|
||||
"setup_version": "setup_version",
|
||||
"docker_versions": {},
|
||||
"features": [
|
||||
"tor",
|
||||
"lightning",
|
||||
"otsclient"
|
||||
],
|
||||
"net": "testnet",
|
||||
"use_xpub": true,
|
||||
"installer_mode": "docker",
|
||||
"run_as_different_user": true,
|
||||
"username": "cyphernode",
|
||||
"docker_mode": "compose",
|
||||
"bitcoin_rpcuser": "bitcoin",
|
||||
"bitcoin_rpcpassword": "test123",
|
||||
"bitcoin_uacomment": "",
|
||||
"bitcoin_prune": false,
|
||||
"bitcoin_prune_size": 550,
|
||||
"bitcoin_datapath": "/Users/jash/.cyphernode/bitcoin",
|
||||
"bitcoin_mode": "internal",
|
||||
"bitcoin_expose": false,
|
||||
"lightning_expose": true,
|
||||
"gatekeeper_port": 2009,
|
||||
"gatekeeper_keys": {
|
||||
"configEntries": [
|
||||
"kapi_id=\"000\";kapi_key=\"a27f9e73fdde6a5005879c273c9aea5e8d917eec77bbdfd73272c0af9b4c6b7a\";kapi_groups=\"watcher\";eval ugroups_${kapi_id}=${kapi_groups};eval ukey_${kapi_id}=${kapi_key}",
|
||||
"kapi_id=\"001\";kapi_key=\"a27f9e73fdde6a5005879c273c9aea5e8d917eec77bbdfd73272c0af9b4c6b7a\";kapi_groups=\"watcher\";eval ugroups_${kapi_id}=${kapi_groups};eval ukey_${kapi_id}=${kapi_key}",
|
||||
"kapi_id=\"002\";kapi_key=\"fe58ddbb66d7302a7087af3242a98b6326c51a257f5eab1c06bb8cc02e25890d\";kapi_groups=\"watcher,spender\";eval ugroups_${kapi_id}=${kapi_groups};eval ukey_${kapi_id}=${kapi_key}",
|
||||
"kapi_id=\"003\";kapi_key=\"f0b8bb52f4c7007938757bcdfc73b452d6ce08cc0c660ce57c5464ae95f35417\";kapi_groups=\"watcher,spender,admin\";eval ugroups_${kapi_id}=${kapi_groups};eval ukey_${kapi_id}=${kapi_key}"
|
||||
],
|
||||
"clientInformation": [
|
||||
"000=a27f9e73fdde6a5005879c273c9aea5e8d917eec77bbdfd73272c0af9b4c6b7a",
|
||||
"001=a27f9e73fdde6a5005879c273c9aea5e8d917eec77bbdfd73272c0af9b4c6b7a",
|
||||
"002=fe58ddbb66d7302a7087af3242a98b6326c51a257f5eab1c06bb8cc02e25890d",
|
||||
"003=f0b8bb52f4c7007938757bcdfc73b452d6ce08cc0c660ce57c5464ae95f35417"
|
||||
]
|
||||
},
|
||||
"gatekeeper_sslcert": "-----BEGIN CERTIFICATE-----\nMIIE/jCCAuagAwIBAgIJAIBv4aiI2NRtMA0GCSqGSIb3DQEBCwUAMB4xHDAaBgNV\nBAMME2Rpc2swYm9vay5mcml0ei5ib3gwHhcNMTkwMTE3MTcwMDA5WhcNMjkwMTE0\nMTcwMDA5WjAeMRwwGgYDVQQDDBNkaXNrMGJvb2suZnJpdHouYm94MIICIjANBgkq\nhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyVKNTGlPfd4QX9HaDc9a6prbc9il4jtR\niChSlMf3/6UfAMcS+xVgR2iR8FK/DQuFzxn+6BybpoiD333rjDr7zR7y9px3Xph2\nbmsjZy0hv9SIBbx0DJvvwODTlWTAH8qgU2DN6xWc7vjgeGi5uTpnmwWrkH6BjtVr\nwoBkF0JmfH7KiLS/QjWqPKeI6o/GpvCP9meD131Sq/ReoOTrJ4F5aNdhAril4nU5\n6e7Y+Iyp35DZSLuU+pDJAhxEvkYGas1ted5RRxlho8ukaoABCbmaTeNmgsJxK2SC\nABjfUc38aAlNLuMbMMR7Q85Z84OTJiUqanVczwdSj1QHlNCWZK1McBPhj2m2Wdge\ngedrq5XcjQGChzTEozcFntU0qzY3ja1+DOE8UaMaTrDH4saUXCMZk3W1m5mmiZW3\nmcB0cKGdeg6K6USg1BwBTU9qolUusxz5T0tNxjcMlXU93P17d4s5IXfliXhMNr/6\n4fl78Ey3FNpr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oiTq3mWvVNhR\nmPN+iWirFH2RN5KkSaTzEtrXAgbLvic9\n-----END PRIVATE KEY-----\n",
|
||||
"gatekeeper_cns": "disk0book.fritz.box",
|
||||
"proxy_datapath": "/Users/jash/.cyphernode/proxy",
|
||||
"lightning_implementation": "c-lightning",
|
||||
"lightning_datapath": "/Users/jash/.cyphernode/lightning",
|
||||
"lightning_nodename": "🚀 Disciplined Dormouse 🚀",
|
||||
"lightning_nodecolor": "ff0000",
|
||||
"otsclient_datapath": "/Users/jash/.cyphernode/otsclient",
|
||||
"adminhash": "BsJFlh7q4JmwI\n",
|
||||
"use_xpub": true,
|
||||
"xpub": "abc",
|
||||
"derivation_path": "da",
|
||||
"gatekeeper_clientkeyspassword": "test123",
|
||||
"gatekeeper_datapath": "/Users/jash/.cyphernode/gatekeeper",
|
||||
"logs_datapath": "foo",
|
||||
"traefik_datapath": "foo",
|
||||
"tor_datapath": "foo",
|
||||
"lightning_announce": true,
|
||||
"gatekeeper_expose": false,
|
||||
"traefik_http_port": 80,
|
||||
"traefik_https_port": 443
|
||||
}
|
||||
15
dist/setup.sh
vendored
15
dist/setup.sh
vendored
@@ -110,7 +110,7 @@ sudo_if_required() {
|
||||
}
|
||||
|
||||
modify_permissions() {
|
||||
local directories=("installer" "gatekeeper" "lightning" "bitcoin" "docker-compose.yaml" "traefik" "tor" "$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$OTSCLIENT_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||
local directories=("installer" "gatekeeper" "lightning" "bitcoin" "docker-compose.yaml" "traefik" "tor" "$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$OTSCLIENT_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||
for d in "${directories[@]}"
|
||||
do
|
||||
if [[ -e $d ]]; then
|
||||
@@ -122,7 +122,7 @@ modify_permissions() {
|
||||
}
|
||||
|
||||
modify_owner() {
|
||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$OTSCLIENT_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$OTSCLIENT_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||
local user=$(id -u $RUN_AS_USER):$(id -g $RUN_AS_USER)
|
||||
for d in "${directories[@]}"
|
||||
do
|
||||
@@ -390,6 +390,13 @@ install_docker() {
|
||||
copy_file $cyphernodeconf_filepath/traefik/htpasswd $GATEKEEPER_DATAPATH/htpasswd 1 $SUDO_REQUIRED
|
||||
|
||||
|
||||
if [ ! -d $LOGS_DATAPATH ]; then
|
||||
step " [32mcreate[0m $LOGS_DATAPATH"
|
||||
sudo_if_required mkdir -p $LOGS_DATAPATH
|
||||
next
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -d $TRAEFIK_DATAPATH ]; then
|
||||
step " [32mcreate[0m $TRAEFIK_DATAPATH"
|
||||
sudo_if_required mkdir -p $TRAEFIK_DATAPATH
|
||||
@@ -628,7 +635,7 @@ install_docker() {
|
||||
|
||||
check_directory_owner() {
|
||||
# if one directory does not have access rights for $RUN_AS_USER, we echo 1, else we echo 0
|
||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||
local status=0
|
||||
for d in "${directories[@]}"
|
||||
do
|
||||
@@ -732,7 +739,7 @@ sanity_checks_pre_install() {
|
||||
if [[ $sudo_reason == 'directories' ]]; then
|
||||
echo " [31mor check your data volumes if they have the right owner.[0m"
|
||||
echo " [31mThe owner of the following folders should be '$RUN_AS_USER':[0m"
|
||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||
local status=0
|
||||
for d in "${directories[@]}"
|
||||
do
|
||||
|
||||
@@ -2,14 +2,18 @@
|
||||
|
||||
trace()
|
||||
{
|
||||
if [ -n "${TRACING}" ]; then
|
||||
echo "$(date -Is) $$ ${1}" 1>&2
|
||||
fi
|
||||
if [ -n "${TRACING}" ]; then
|
||||
local str="$(date -Is) $$ ${1}"
|
||||
echo "${str}" 1>&2
|
||||
echo "${str}" >> /cnlogs/notifier.log
|
||||
fi
|
||||
}
|
||||
|
||||
trace_rc()
|
||||
{
|
||||
if [ -n "${TRACING}" ]; then
|
||||
echo "$(date -Is) $$ Last return code: ${1}" 1>&2
|
||||
fi
|
||||
if [ -n "${TRACING}" ]; then
|
||||
local str="$(date -Is) $$ Last return code: ${1}"
|
||||
echo "${str}" 1>&2
|
||||
echo "${str}" >> /cnlogs/notifier.log
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2,14 +2,18 @@
|
||||
|
||||
trace()
|
||||
{
|
||||
if [ -n "${TRACING}" ]; then
|
||||
echo "$(date -Is) $$ ${1}" 1>&2
|
||||
fi
|
||||
if [ -n "${TRACING}" ]; then
|
||||
local str="$(date -Is) $$ ${1}"
|
||||
echo "${str}" 1>&2
|
||||
echo "${str}" >> /cnlogs/otsclient.log
|
||||
fi
|
||||
}
|
||||
|
||||
trace_rc()
|
||||
{
|
||||
if [ -n "${TRACING}" ]; then
|
||||
echo "$(date -Is) $$ Last return code: ${1}" 1>&2
|
||||
fi
|
||||
if [ -n "${TRACING}" ]; then
|
||||
local str="$(date -Is) $$ Last return code: ${1}"
|
||||
echo "${str}" 1>&2
|
||||
echo "${str}" >> /cnlogs/otsclient.log
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2,14 +2,18 @@
|
||||
|
||||
trace()
|
||||
{
|
||||
if [ -n "${TRACING}" ]; then
|
||||
echo "$(date -Is) $$ ${1}" 1>&2
|
||||
fi
|
||||
if [ -n "${TRACING}" ]; then
|
||||
local str="$(date -Is) $$ ${1}"
|
||||
echo "${str}" 1>&2
|
||||
echo "${str}" >> /cnlogs/proxy.log
|
||||
fi
|
||||
}
|
||||
|
||||
trace_rc()
|
||||
{
|
||||
if [ -n "${TRACING}" ]; then
|
||||
echo "$(date -Is) $$ Last return code: ${1}" 1>&2
|
||||
fi
|
||||
if [ -n "${TRACING}" ]; then
|
||||
local str="$(date -Is) $$ Last return code: ${1}"
|
||||
echo "${str}" 1>&2
|
||||
echo "${str}" >> /cnlogs/proxy.log
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2,14 +2,18 @@
|
||||
|
||||
trace()
|
||||
{
|
||||
if [ -n "${TRACING}" ]; then
|
||||
echo "$(date -Is) $$ ${1}" 1>&2
|
||||
fi
|
||||
if [ -n "${TRACING}" ]; then
|
||||
local str="$(date -Is) $$ ${1}"
|
||||
echo "${str}" 1>&2
|
||||
echo "${str}" >> /cnlogs/pycoin.log
|
||||
fi
|
||||
}
|
||||
|
||||
trace_rc()
|
||||
{
|
||||
if [ -n "${TRACING}" ]; then
|
||||
echo "$(date -Is) $$ Last return code: ${1}" 1>&2
|
||||
fi
|
||||
if [ -n "${TRACING}" ]; then
|
||||
local str="$(date -Is) $$ Last return code: ${1}"
|
||||
echo "${str}" 1>&2
|
||||
echo "${str}" >> /cnlogs/pycoin.log
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user