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

Updater.py #115

Open
chelaxian opened this issue Dec 20, 2023 · 4 comments
Open

Updater.py #115

chelaxian opened this issue Dec 20, 2023 · 4 comments

Comments

@chelaxian
Copy link

can you create some updating mechanism to not redownload whole code after new release and rewrite all parameters and cookies and loses users statistics, but just launch some script that will catch all updated code automaticaly but save all your previous settings and statistics?

@Hanssen0
Copy link
Contributor

Hanssen0 commented Dec 20, 2023

can you create some updating mechanism to not redownload whole code after new release and rewrite all parameters and cookies and loses users statistics, but just launch some script that will catch all updated code automaticaly but save all your previous settings and statistics?

Hi!

Did u tried to store your config & data files into a seperated path with your downloaded code? You can simply use the environment variable TELEGRAMUS_CONFIG_FILE or the --config cli option, and options in the config file's files field to specify your files' path.

Also you can try to use docker to run your application, see https://github.com/F33RNI/GPT-Telegramus?tab=readme-ov-file#-running-in-docker

@chelaxian
Copy link
Author

chelaxian commented Dec 20, 2023

can you create some updating mechanism to not redownload whole code after new release and rewrite all parameters and cookies and loses users statistics, but just launch some script that will catch all updated code automaticaly but save all your previous settings and statistics?

Hi!

Did u tried to store your config & data files into a seperated path with your downloaded code? You can simply use the environment variable TELEGRAMUS_CONFIG_FILE and options in the config file's files field to specify your files' path.

Also you can try to use docker to run your application, see https://github.com/F33RNI/GPT-Telegramus?tab=readme-ov-file#-running-in-docker

actualy i act like you said, but sometimes you change config.json also with release (like now in 4.0.0 you add Gemini), so you anyway need to refill this file again

@Hanssen0
Copy link
Contributor

actualy i act like you said, but sometimes you change config.json also with release (like now in 4.0.0 you add Gemini), so you anyway need to refill this file again

Yes that's a problem, and we're planning to make future changes optional when it's possible. Before we can actually do that, we might have some breaking changes since this project is still under development.

Sorry for the inconvenience.

@chelaxian
Copy link
Author

chelaxian commented Mar 19, 2024

here is my temporary solution to the problem:

crontab -e
30 4 * * * /root/github/GPT/update_GPT_Telegramus.sh

cat update_GPT_Telegramus.sh

#!/bin/bash

cd /root/github/GPT/
cp /root/github/GPT/GPT-Telegramus/config.json /root/github/GPT/BCK-CONF/
cp /root/github/GPT/GPT-Telegramus/users.json /root/github/GPT/BCK-CONF/
cp /root/github/GPT/GPT-Telegramus/module_configs/* /root/github/GPT/BCK-CONF/

rm -R /root/github/GPT/GPT-Telegramus-old/
mv /root/github/GPT/GPT-Telegramus /root/github/GPT/GPT-Telegramus-old/

cd /root/github/GPT/
git clone --recursive https://github.com/F33RNI/GPT-Telegramus

cp /root/github/GPT/BCK-CONF/config.json /root/github/GPT/GPT-Telegramus/
cp /root/github/GPT/BCK-CONF/users.json /root/github/GPT/GPT-Telegramus/
cp /root/github/GPT/BCK-CONF/*_cookies.json /root/github/GPT/GPT-Telegramus/
cp /root/github/GPT/BCK-CONF/lmao_*.json /root/github/GPT/GPT-Telegramus/module_configs/
cp /root/github/GPT/BCK-CONF/ms_copilo*.json /root/github/GPT/GPT-Telegramus/module_configs/
cp /root/github/GPT/BCK-CONF/gemini.json /root/github/GPT/GPT-Telegramus/module_configs/

cd GPT-Telegramus
chmod 777 run.sh

python3 -m venv venv

systemctl restart gpt-telegramus

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

No branches or pull requests

2 participants