I couldn’t find an update script anywhere and I host several bots which would make life a lot easier, so I had a go at creating my own and wanted to share it with the community. So here it is pb-updater!
Please note, while I’ve tested the script, it’s very possible I’ve missed something. Make sure you have a solid backup process
I have a few things planned to further improve the script, but I have it in a state that I’m happy with sharing now and I thought it would be nice to get some feedback from others.
While this is a script for bots running on Linux and has only been tested on Ubuntu 18.04 LTS, I wouldn’t be opposed to writing a cross-platform solution if there was interest for it.
- Fixes issue where the bot backup file wasn’t always correct and would result in the backup failing to be made
- Fixes issue where files were not always copied to the correct path within the new install
- Fixes issues with copying symlinks
- Fixes issue where the script would fail the check for systemd units that existed and were not active
- Fixes issue where some commands that were executed as the bot user would fail
The first version of this update script!
Please note, this should be considered in an alpha state, likely has bugs and as always, may possibly destroy your bot.
Everyone should have a solid backup process, this script should be made no exception to that general rule.
I take no liability for any damages this may cause. By using the script, you accept full liability for any forthcoming result.
With that said, please do report any bugs and issues using the issues tab of this repository. Improvement suggestions are also welcomed!