unrealircd / unrealircd-webpanel

An administration webpanel for UnrealIRCd
https://www.unrealircd.org/docs/UnrealIRCd_webpanel
GNU General Public License v3.0
22 stars 10 forks source link

Upgrade tool #36

Open syzop opened 1 year ago

syzop commented 1 year ago

Both from the webpanel and from the new CLI tool: a way to easily update the webpanel to the latest version.

Right now, this could be as easy as running git pull and composer install (may need some detection to search for composer). When we have releases it would have to download the release from GitHub, extract the .tar.gz, etc..

Ideally do this in a safe manner, creating some sort of backup prior, just in case.

syzop commented 1 year ago

One thing that git keeps track of is file renames, so if we move xyz.php to somedir/xyz.php and you did a git pull then it really moved to there. So that's good.

On the contrary, with releases, if you would just extract a .tar.gz over everything, then it would have the new somedir/xyz.php but the old xyz.php would still exist. So that would quickly become a mess after a few upgrades. And not only will it be messy, with old code laying around you may also keep old vulnerabilities that nobody is thinking about anymore.

So, ideally, for releases, if your existing webpanel is in /var/www/html/webpanel you would:

Unfortunately i think with most file permissions for /var/www/html that is not possible, so.... hmmmm..... either make that possible or.. find some other way, that could be more fragile.