From c27315d6c1f97ccafb9a3a0c6c22e5fd539b38d3 Mon Sep 17 00:00:00 2001 From: akshay Date: Wed, 27 Mar 2024 17:08:25 +0530 Subject: [PATCH] Add rspamd install script --- rspamd_install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 rspamd_install.sh diff --git a/rspamd_install.sh b/rspamd_install.sh new file mode 100644 index 0000000..c567c73 --- /dev/null +++ b/rspamd_install.sh @@ -0,0 +1,16 @@ +#! /bin/sh + + +if [ "$(whoami)" != "root" ]; then + SUDO=sudo +fi +CODENAME=`lsb_release -c -s` + +${SUDO} apt update +${SUDO} apt-get install -y lsb-release wget gpg +${SUDO} mkdir -p /etc/apt/keyrings +wget -O- https://rspamd.com/apt-stable/gpg.key | gpg --dearmor | ${SUDO} tee /etc/apt/keyrings/rspamd.gpg > /dev/null +echo "deb [signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt-stable/ $CODENAME main" | ${SUDO} tee /etc/apt/sources.list.d/rspamd.list +echo "deb-src [signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt-stable/ $CODENAME main" | ${SUDO} tee -a /etc/apt/sources.list.d/rspamd.list +${SUDO} apt-get update +${SUDO} apt-get --no-install-recommends install rspamd