Dont create .conf from cli
This commit is contained in:
@@ -65,6 +65,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define FROM_CLI
|
||||||
#include "uint256.h"
|
#include "uint256.h"
|
||||||
#include "arith_uint256.h"
|
#include "arith_uint256.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1362,12 +1362,14 @@ void komodo_configfile(char *symbol,uint16_t port)
|
|||||||
#endif
|
#endif
|
||||||
if ( (fp= fopen(fname,"rb")) == 0 )
|
if ( (fp= fopen(fname,"rb")) == 0 )
|
||||||
{
|
{
|
||||||
|
#ifndef FROM_CLI
|
||||||
if ( (fp= fopen(fname,"wb")) != 0 )
|
if ( (fp= fopen(fname,"wb")) != 0 )
|
||||||
{
|
{
|
||||||
fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nrpcport=%u\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password,port);
|
fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nrpcport=%u\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password,port);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
printf("Created (%s)\n",fname);
|
printf("Created (%s)\n",fname);
|
||||||
} else printf("Couldnt create (%s)\n",fname);
|
} else printf("Couldnt create (%s)\n",fname);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1619,6 +1621,7 @@ void komodo_args(char *argv0)
|
|||||||
for (i=0; i<4; i++)
|
for (i=0; i<4; i++)
|
||||||
sprintf(&magicstr[i<<1],"%02x",magic[i]);
|
sprintf(&magicstr[i<<1],"%02x",magic[i]);
|
||||||
magicstr[8] = 0;
|
magicstr[8] = 0;
|
||||||
|
#ifndef FROM_CLI
|
||||||
sprintf(fname,"gen%s",ASSETCHAINS_SYMBOL);
|
sprintf(fname,"gen%s",ASSETCHAINS_SYMBOL);
|
||||||
if ( (fp= fopen(fname,"wb")) != 0 )
|
if ( (fp= fopen(fname,"wb")) != 0 )
|
||||||
{
|
{
|
||||||
@@ -1626,6 +1629,7 @@ void komodo_args(char *argv0)
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
//printf("created (%s)\n",fname);
|
//printf("created (%s)\n",fname);
|
||||||
} else printf("error creating (%s)\n",fname);
|
} else printf("error creating (%s)\n",fname);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user