From 43af2461e95d7da4ac453a4622e246e70cd917f0 Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 25 Jun 2024 21:02:29 +1200 Subject: [PATCH] Updated some scripts --- e-download.sh | 28 +++++++++++++++++++++++++++- e-prereq.sh | 8 ++++---- e-rebuild.sh | 2 +- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/e-download.sh b/e-download.sh index 96b4b06..9019b34 100644 --- a/e-download.sh +++ b/e-download.sh @@ -1 +1,27 @@ -#!/bin/sh \ No newline at end of file +#!/bin/sh + +root=$(pwd) + +# remove old backup but store the database +if [ -d elliebot_old/output/data/ ]; then + if [ -f elliebot_old/output/data/NadekoBot.db ]; then + if [ ! -d elliebot_db_backups/ ]; then + mkdir elliebot_db_backups + fi + cp elliebot_old/output/data/NadekoBot.db elliebot_db_backups/NadekoBot-$(date +%s).db + fi +fi +rm -rf elliebot_old 1>/dev/null 2>&1 + +# make a new backup +mv -fT elliebot elliebot_old 1>/dev/null 2>&1 + +# clone new version +git clone -b v4 --recursive --depth 1 https://toastielab.dev/Emotions-stuff/elliebot + +wget -q -N https://toastielab.dev/Emotions-stuff/ellie-bash-installer/raw/branch/v4/rebuild.sh +bash rebuild.sh + +cd "$root" +rm "$root/e-download.sh" +exit 0 diff --git a/e-prereq.sh b/e-prereq.sh index 00b8b5a..6acb93f 100644 --- a/e-prereq.sh +++ b/e-prereq.sh @@ -207,10 +207,10 @@ elif [ "$OS" = "openSUSE Leap" ] || [ "$OS" = "openSUSE Tumbleweed" ]; then echo "Installing redis..." sudo zypper install -y redis # Instructions here: https://build.opensuse.org/package/view_file/openSUSE:Factory/redis/README.SUSE?expand=1 - sudo cp -a /etc/redis/default.conf.example /etc/redis/nadeko.conf - sudo sudo install -d -o redis -g redis -m 0750 /var/lib/redis/nadeko/ - sudo systemctl start redis@nadeko - sudo systemctl enable redis@nadeko + sudo cp -a /etc/redis/default.conf.example /etc/redis/ellie.conf + sudo sudo install -d -o redis -g redis -m 0750 /var/lib/redis/ellie/ + sudo systemctl start redis@ellie + sudo systemctl enable redis@ellie echo -e "\nInstalling music prerequisites..." if [ "$OS" = "openSUSE Leap" ]; then diff --git a/e-rebuild.sh b/e-rebuild.sh index 2932345..7d79e7b 100644 --- a/e-rebuild.sh +++ b/e-rebuild.sh @@ -7,7 +7,7 @@ rm -rf elliebot_old 1>/dev/null 2>&1 # make a new backup cp -rT elliebot elliebot_old 1>/dev/null 2>&1 -wget -q -N https://toastielab.dev/Emotions-stuff/ellie-bash-installer/raw/branch/main/rebuild.sh +wget -q -N https://toastielab.dev/Emotions-stuff/ellie-bash-installer/raw/branch/v4/rebuild.sh bash rebuild.sh cd "$root"