Updaded dependencies
*Added php ctype extention *Switched OfflineImap from PIP package to the apk one from the "Alpine Community Edge" repo due to PEP 68 braking the install
This commit is contained in:
17
install.sh
17
install.sh
@@ -7,21 +7,22 @@ cd "$( dirname "$0" )"
|
||||
if [ -z ${DistoBuilderINT+x} ]; then
|
||||
ResourceFolder=/tmp
|
||||
#Install required software
|
||||
apk add dovecot php83-xml php83-fpm php83-curl php83-dom php83-zip php83-mbstring php83-openssl py3-pip sudo curl openssl
|
||||
apk add dovecot php83-xml php83-fpm php83-curl php83-dom php83-zip php83-mbstring php83-openssl php83-ctype sudo curl openssl
|
||||
#Install Nginx and Nginx Repo
|
||||
wget https://nginx.org/keys/nginx_signing.rsa.pub -O /etc/apk/keys/nginx_signing.rsa.pub
|
||||
echo "@nginx http://nginx.org/packages/mainline/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories
|
||||
curl -L https://nginx.org/keys/nginx_signing.rsa.pub -o /etc/apk/keys/nginx_signing.rsa.pub
|
||||
apk add nginx@nginx
|
||||
echo @CommunityEdge http://dl-4.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
|
||||
|
||||
#Install OfflineIMAP3
|
||||
apk add offlineimap@CommunityEdge
|
||||
fi
|
||||
|
||||
#Download Resources
|
||||
OfflineIMAPVer=$(curl -s https://api.github.com/repos/OfflineIMAP/offlineimap3/tags | grep 'name.*' |head -n 1 | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " "| tr -d : )
|
||||
SnappyMailVer=$(curl -s https://api.github.com/repos/the-djmaze/snappymail/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " "| tr -d : )
|
||||
echo "$OfflineIMAPVer" > /opt/OfflineIMAP3-installed
|
||||
echo "$SnappyMailVer" > /opt/SnappyMail-installed
|
||||
curl -L https://github.com/the-djmaze/snappymail/releases/download/$SnappyMailVer/snappymail-${SnappyMailVer//v}.tar.gz -o /tmp/smc.tar.gz || exit 1
|
||||
curl -L https://github.com/OfflineIMAP/offlineimap3/archive/refs/tags/$OfflineIMAPVer.tar.gz -o /tmp/olim3.tar.gz || exit 1
|
||||
|
||||
#Configure Nginx
|
||||
rm -rf /etc/nginx/conf.d/*
|
||||
@@ -51,13 +52,6 @@ chown -R nginx:nginx /opt/webmail
|
||||
find /opt/webmail -type d -exec chmod 755 {} \;
|
||||
find /opt/webmail -type f -exec chmod 644 {} \;
|
||||
|
||||
#Install OfflineIMAP3
|
||||
mkdir /opt/OfflineIMAP3
|
||||
tar -C /opt/OfflineIMAP3 -xzf /tmp/olim3.tar.gz --strip 1
|
||||
sed -i '/kerberos/c\' /opt/OfflineIMAP3/requirements.txt
|
||||
sed -i '/cygwin/c\' /opt/OfflineIMAP3/requirements.txt
|
||||
pip3 install -r /opt/OfflineIMAP3/requirements.txt
|
||||
|
||||
#Add OfflineIMAP config to user skeleton folder
|
||||
mkdir /etc/skel
|
||||
mv Configs/offlineimaprc /etc/skel/.offlineimaprc
|
||||
@@ -66,7 +60,6 @@ echo '30 2 * * 4 ash /opt/mailsync.sh > /dev/null' >
|
||||
|
||||
#Add tool update scripts
|
||||
mv Resources/UpdateSnappyMail.sh /opt/UpdateSnappyMail.sh
|
||||
mv Resources/UpdateOfflineImap3.sh /opt/UpdateOfflineImap3.sh
|
||||
mv Resources/AddMailBox.sh /opt/AddMailBox.sh
|
||||
#Cleanup
|
||||
rm -f /tmp/olim3.tar.gz /tmp/smc.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user