n-y-z-o / nyzoVerifier

Verifier for the Nyzo cryptocurrency
The Unlicense
73 stars 42 forks source link

Update nyzoVerifier.conf #2

Closed jimtalksdata closed 4 years ago

jimtalksdata commented 5 years ago

We really should have the default directory be whatever the current user is (~) rather than hardcoded as /home/ubuntu. Please advise.

On second thought, this could break legacy setups that have hardcoded the nyzo verifier to run under /home/ubuntu with another user (i.e. https://medium.com/refortuna/this-short-tutorial-will-explain-in-detail-how-to-set-up-your-own-nyzo-mesh-verifier-node-e799cdf63e6d). We should check in both places instead. Then again, those legacy setups already have nyzoVerifier.conf with the "incorrectly configured location" already in /etc/supervisor/conf.d, so a git pull would not break an existing setup.

n-y-z-o commented 5 years ago

Our current plan for this is to replace the configuration file with a script that generates the configuration file. The script will probably look something like this:

VERIFIER_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

sudo rm $CONFIGURATION_FILE_PATH

cat << END_OF_FILE >> $CONFIGURATION_FILE_PATH
[program:nyzo_verifier]
command=/usr/bin/java -jar -Xmx3G $VERIFIER_ROOT/build/libs/nyzoVerifier-1.0.jar
autostart=true
autorestart=true
startsecs=10
startretries=20
stdout_logfile=/var/log/nyzo-verifier.log
stdout_logfile_maxbytes=10MB
stdout_logfile_backups=2
redirect_stderr=true
END_OF_FILE
jimtalksdata commented 4 years ago

Closed, addressed in v555: http://tech.nyzo.co/releaseNotes/v555