From b52dc1d98e5f2854f31856c864a67e23c3f114a1 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 23 May 2024 11:42:18 +0200 Subject: [PATCH] Remove redis helpers --- scripts/_common.sh | 44 +------------------------------------------- scripts/install | 2 +- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index fbc676c..5fc2b60 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -12,46 +12,4 @@ NODEJS_VERSION="20" #================================================= # EXPERIMENTAL HELPERS -#================================================= - -#================================================= -# REDIS HELPERS -#================================================= - -# get the first available redis database -# -# usage: ynh_redis_get_free_db -# | returns: the database number to use -ynh_redis_get_free_db() { - local result max db - result="$(redis-cli INFO keyspace)" - - # get the num - max=$(cat /etc/redis/redis.conf | grep ^databases | grep -Eow "[0-9]+") - - db=0 - # default Debian setting is 15 databases - for i in $(seq 0 "$max") - do - if ! echo "$result" | grep -q "db$i" - then - db=$i - break 1 - fi - db=-1 - done - - test "$db" -eq -1 && ynh_die --message="No available Redis databases..." - - echo "$db" -} - -# Create a master password and set up global settings -# Please always call this script in install and restore scripts -# -# usage: ynh_redis_remove_db database -# | arg: database - the database to erase -ynh_redis_remove_db() { - local db=$1 - redis-cli -n "$db" flushall -} +#================================================= \ No newline at end of file diff --git a/scripts/install b/scripts/install index c19d404..59f766b 100755 --- a/scripts/install +++ b/scripts/install @@ -57,7 +57,7 @@ pushd "$install_dir" ynh_use_nodejs env $ynh_node_load_PATH corepack enable env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install --frozen-lockfile + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack pnpm install --frozen-lockfile ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run init popd