Skip to content

Commit

Permalink
add memcached user creation to disaster recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
paskal committed Mar 1, 2024
1 parent 3a32a2d commit 17ed960
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/disaster-recovery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,18 @@ EOF
echo "done the zabbix set up"
}

memcached_user_setup() {
if ! getent group memcached >/dev/null; then
echo "creating memcached group"
groupadd -g 11211 memcached
fi

if ! id -u memcached >/dev/null 2>&1; then
echo "creating memcached user"
useradd -u 11211 -g memcached memcached
fi
}

set_up_duplicity() {
command -v duplicity >/dev/null && return
echo "installing duplicity for backups..."
Expand Down Expand Up @@ -264,6 +276,7 @@ install_docker_compose_if_not_installed
zabbix_setup
set_up_duplicity
setup_aws
memcached_user_setup

# Backup restoration
backup_restore
Expand Down

0 comments on commit 17ed960

Please sign in to comment.