#!/bin/bash readonly toolName=redis readonly toolDeps=redis-server sq_aptOpt= seq_config() { if ! initSeqConfig "${seq_configName:?}" "${seq_configTemplate:?}" ; then # End if no configuration file exists dry || return 1 fi ## Apt cmdline option to suppress user interaction interactive || sq_aptOpt="-y" return 0 } step_1_info() { echo "Install $toolName"; } step_1_alias() { echo "install"; } step_1() { exe apt update exe apt install $toolDeps $sq_aptOpt } step_2_info() { echo "Installation notes"; } step_2_alias() { echo "notes"; } step_2() { cat < '\\OC\\Memcache\\Redis', 'memcache.distributed' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '/var/run/redis/redis-server.sock', 'port' => 0, 'password' => 'verystrongpassword', 'timeout' => 0.0, ), NOTES_EOF } step_10_info() { echo "Execute redis-cli commands" echoinfo " [CLI COMMAND]" echoinfo " e.g. info" } step_10_options() { echo "[CLI COMMAND]"; } step_10_alias() { echo "cli"; } step_10() { shift local cliCmd="$@" if [ ! -z "$REDIS_AUTH" ] ; then #exe "echo -e \"AUTH=$REDIS_AUTH$cliCmd\" | redis-cli" exe redis-cli -a "$REDIS_AUTH" $cliCmd else exe redis-cli $cliCmd fi } # shellcheck disable=SC2034 # Appears unused readonly sqr_minVersion=16 # shellcheck disable=SC1091 # Don't follow this source . /usr/local/bin/sequencer.sh