Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Hardware Details #114

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Added Hardware Details #114

wants to merge 4 commits into from

Conversation

nice42q
Copy link
Contributor

@nice42q nice42q commented Jul 2, 2024

Terminal (.sh) Command
sudo lshw -short > /var/www/html/hardware.txt

Only needs to be carried out once. Which file is best suited for this? @shermand100

@shermand100
Copy link
Owner

shermand100 commented Sep 10, 2024

Again I apologise for my delay in taking a look at these Pulls. Got married, moved house, all super busy... anyway.

I'd put the install sudo apt install lshw for the tool into our 'ubuntu-install-continue.sh' with the other dependencies.
For existing users it would then also go into 'update-pinodexmr.sh' so they get the new feature.

To run the command and detect any hardware changes ( like attaching storage ) I'd keep it simple for now with a crontab entry:

@reboot lshw -short > /var/www/html/hardware.txt

But the crontab I'd create for user 'root' to avoid permissions issues.

@@ -418,6 +418,7 @@ sudo systemctl enable log-io-file.service 2>&1 | tee -a /home/pinodexmr/debug.lo
echo -e "\e[32mSetup crontab\e[0m"
sleep 3
crontab /home/pinodexmr/PiNodeXMR/var/spool/cron/crontabs/pinodexmr 2>&1 | tee -a /home/pinodexmr/debug.log
sudo crontab /home/pinodexmr/PiNodeXMR/var/spool/cron/crontabs/root 2>&1 | tee -a /home/pinodexmr/debug.log
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command runs as 'sudo' - reads the pre-made crontab file with your "lshw -short" command, and if no errors will merge it into a new crontab for running at boot.

@nice42q
Copy link
Contributor Author

nice42q commented Sep 13, 2024

No problem, there's no need to rush.
This pull is a suggestion.

I thought it might be helpful to know what hardware is being used. (For Support)
But it could also be a security risk if a hacker has access to the web interface and now knows what hardware is being used.
I'm not sure about that and would leave it up to you if it is added.

Your changes seem to make sense :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants