Page MenuHomeDevCentral

run
No OneTemporary

#!/bin/bash -e
chown :sympa /etc/sympa/*
chown sympa:sympa /var/lib/sympa /var/spool/sympa
chmod 771 /var/spool/sympa
chmod 750 /etc/sympa/includes
chmod 640 /etc/sympa/includes/*
chown :sympa /etc/sympa/includes/*
# If directory is empty, we restore it from our copy of initial files
[[ $(ls -A /var/lib/sympa | grep -v placeholder) ]] || cp -a /var/lib/sympa.orig/* /var/lib/sympa/
[[ $(ls -A /var/spool/sympa | grep -v placeholder) ]] || cp -a /var/spool/sympa.orig/* /var/spool/sympa/
# If installation time cookie file exists, remove it, we are using one mapped from outside
if [ -e /etc/sympa/cookie ]; then
rm /etc/sympa/cookie /etc/sympa/cookies.history
fi
if [ -e /etc/sympa/shared ]; then
# If SSH keys do not exist, create them
if [ ! -e /etc/sympa/shared/id_rsa ]; then
ssh-keygen -t rsa -f /etc/sympa/shared/id_rsa -N ''
fi
rm -f /etc/sympa/shared/known_hosts
echo -n 'sympa.sympa.server2.docker ' > /etc/sympa/shared/known_hosts
cat /etc/ssh/ssh_host_rsa_key.pub >> /etc/sympa/shared/known_hosts
mkdir -p /var/lib/sympa/.ssh
cat /etc/sympa/shared/id_rsa.pub > /var/lib/sympa/.ssh/authorized_keys
fi
# All output is logged to /var/log/sympa.log so we redirect stdout and stderr to /dev/null
exec chpst -u sympa:sympa /usr/lib/sympa/bin/sympa.pl --foreground > /dev/null 2>&1

File Metadata

Mime Type
text/x-shellscript
Expires
Mon, Nov 25, 10:44 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260025
Default Alt Text
run (1 KB)

Event Timeline