# LobeChat Updater This is a simple script that updates the LobeChat application. It is designed to be run on a server, and will automatically update the application when a new version is tagged. The script assumes that you use a systemd service to run LobeChat. If you do not, you will need to modify the script to suit your needs. ## Installation 1. Clone this repository to your server. ```bash git clone https://git.private.coffee/kumi/lobechat-updater.git cd lobechat-updater ``` 2. Install the `lobechat-updater` to `/usr/local/bin/`: ```bash sudo install lobechat-updater /usr/local/bin/ ``` 3. Install the systemd service and timer: ```bash sudo cp contrib/lobechat-updater.service /etc/systemd/system/ sudo cp contrib/lobechat-updater.timer /etc/systemd/system/ sudo systemctl enable --now lobechat-updater.timer ``` This will install the updater script to `/usr/local/bin/lobechat-updater`, and will set up a systemd timer to run the updater every 5 minutes. ## Configuration Modify the `LOBECHAT_DIR` variable in `/usr/local/bin/lobechat-updater` to point to the directory where LobeChat is installed. By default, this is `/opt/lobechat`. If the user running LobeChat is not `lobechat`, you will also need to modify the `LOBECHAT_USER` variable. To change the update interval, edit the `OnBootSec` and `OnUnitActiveSec` lines in `/etc/systemd/system/lobechat-updater.timer`. ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.