This is supposed to be pretty straightforward however, seems to be not.
I am trying to use --exec and --preload options with geth. --preload options seems to work sometime. But suddenly started giving problem.
*Fatal: Failed to start the JavaScript console: “customcommands.js”: open “customcommands.js”: no such file or directory.*
I tried this command..
*geth --datadir firstserver --networkid 2017 --jspath "." --preload “customcommands.js” --unlock 0 --password pwd.txt --rpcport 8545 --rpcaddr 0.0.0.0 --port 8000 --rpc --rpcapi="admin,db,eth,net,web3,personal" --maxpeers 3 --nat="any" --nodiscover --rpccorsdomain "*" console*
my directory listing says
-rw-r--r-- 1 rahulgolash staff 10 16 Nov 13:32 pwd.txt
drwxr-xr-x 11 rahulgolash staff 374 16 Nov 14:33 ..
-rw-r--r-- 1 rahulgolash staff 52 16 Nov 19:21 account.txt
-rw-r--r-- 1 rahulgolash staff 570 16 Nov 19:33 genesis.json
-r--r--r-- 1 rahulgolash staff 8241 16 Nov 19:39 customcommands.js
drwxr-xr-x 12 rahulgolash staff 408 16 Nov 19:40 .
drwx------ 6 rahulgolash staff 204 18 Nov 11:24 firstserver
geth --jspath "." --exec 'loadScript("customcommands.js")'
never worked for me! Is this option work only with geth attach command or with geth as server node as well?
Please note that I have already gone thru https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console