diff --git a/scripts/install.sh b/scripts/install.sh
index 83d12a36d..43feb46c9 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -353,7 +353,8 @@ Type=simple
User=$(whoami)
WorkingDirectory=${INSTALL_DIR}
Environment="RUSTCHAIN_WALLET=${wallet}"
-ExecStart=${py} ${INSTALL_DIR}/rustchain_linux_miner.py
+Environment="PYTHONUNBUFFERED=1"
+ExecStart=${py} -u ${INSTALL_DIR}/rustchain_linux_miner.py --wallet ${wallet}
Restart=always
RestartSec=30
StandardOutput=append:/var/log/rustchain-miner.log
@@ -389,12 +390,17 @@ create_launchd_plist() {
ProgramArguments
${py}
+ -u
${INSTALL_DIR}/rustchain_linux_miner.py
+ --wallet
+ ${wallet}
EnvironmentVariables
RUSTCHAIN_WALLET
${wallet}
+ PYTHONUNBUFFERED
+ 1
WorkingDirectory
${INSTALL_DIR}
diff --git a/setup.sh b/setup.sh
index 00ac017cc..6d6076c44 100755
--- a/setup.sh
+++ b/setup.sh
@@ -293,12 +293,13 @@ Wants=network-online.target
[Service]
Type=simple
WorkingDirectory=$INSTALL_DIR
-ExecStart=$PYTHON $INSTALL_DIR/rustchain_linux_miner.py
+ExecStart=$PYTHON -u $INSTALL_DIR/rustchain_linux_miner.py --wallet $WALLET_NAME
Restart=on-failure
RestartSec=30
Environment="WALLET_NAME=$WALLET_NAME"
Environment="NODE_URL=$NODE_URL"
Environment="THREADS=$RECOMMENDED_THREADS"
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=default.target
@@ -321,7 +322,10 @@ SVCEOF
ProgramArguments
$PYTHON
+ -u
$INSTALL_DIR/rustchain_linux_miner.py
+ --wallet
+ $WALLET_NAME
RunAtLoad
KeepAlive
@@ -331,6 +335,7 @@ SVCEOF
WALLET_NAME $WALLET_NAME
NODE_URL $NODE_URL
THREADS $RECOMMENDED_THREADS
+ PYTHONUNBUFFERED 1
StandardOutPath $INSTALL_DIR/miner.log
StandardErrorPath $INSTALL_DIR/miner-error.log
@@ -359,10 +364,10 @@ summary() {
echo -e " Multiplier:${GREEN} ${MULTIPLIER}x${NC}"
echo ""
echo -e " ${BOLD}To start mining:${NC}"
- echo -e " cd $INSTALL_DIR && $PYTHON rustchain_linux_miner.py"
+ echo -e " cd $INSTALL_DIR && $PYTHON -u rustchain_linux_miner.py --wallet $WALLET_NAME"
echo ""
echo -e " ${BOLD}Check your balance:${NC}"
- echo -e " curl -sk '$NODE_URL/wallet/$WALLET_NAME' | python3 -m json.tool"
+ echo -e " curl -sk '$NODE_URL/wallet/balance?miner_id=$WALLET_NAME' | python3 -m json.tool"
echo ""
echo -e " ${BOLD}Join the community:${NC}"
echo -e " Discord: https://discord.gg/rustchain"