Flood-UI / flood

A web UI for rTorrent, qBittorrent and Transmission with a Node.js backend and React frontend. Migrate to v4: https://github.com/jesec/flood/wiki/Migrate-from-older-versions-of-Flood.
https://flood.js.org
GNU General Public License v3.0
1.81k stars 173 forks source link

Version display in UI (autoupdate) #845

Open rafipiccolo opened 5 years ago

rafipiccolo commented 5 years ago

Type: Feature Request

Summary

See the actual version in the UI and maybe an autoupdating option.

why ?

I wanted to do a cron script to git pull every night. Everybody knows that when a project is always up to date, it means less security risks and more fun. I added it in my crontab : 0 0 * * * cd /home/flood/site && git pull

But i dont know if i need to restart something to get the project up to date or if it is already hot reloaded.

Idea of implementation

just display the package.json's version (what about updating it sometimes between commits :)) require('./package.json').version

It could be displayed in the "about" section of the "settings" menu.

if you dont care about package json version, you could also show the git hash: git rev-parse HEAD 15be72609037ed7675a394403e37c4ddb37c3c20

conclusion

if you dont want to do either, can u advice me how to get the project always up to date please ?

Thanks

rafipiccolo commented 5 years ago

I found a way for the autoupdate. Would be good to have it in the readme no ?

npm install -g forever

have an autostart on reboot

 @reboot cd /home/flood/site && /usr/local/bin/forever -a -l /home/flood/site/log/forever.log -c /usr/local/bin/node start server/bin/start.js

have an autoupdate every night

0 0 * * * cd /home/flood/site && /usr/local/bin/forever stop server/bin/start.js && git pull && npm install && npm run build && /usr/local/bin/forever -a -l /home/flood/site/log/forever.log -c /usr/local/bin/node start server/bin/start.js
brianredbeard commented 5 years ago

@rafipiccolo It looks like that repo hasn't been touched in 6+ mos. I would (personally) be reticent to add dependencies like this without a plan on how they stay supported.