mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-18 07:36:18 +00:00
Add postfixadmin upgrade script
This commit is contained in:
parent
068ddbfb58
commit
61463e0ccc
1 changed files with 20 additions and 0 deletions
20
build/run/bin/upgrade-postfixadmin
Executable file
20
build/run/bin/upgrade-postfixadmin
Executable file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Installer for updating Postfixadmin
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Backup postfixadmin config
|
||||||
|
cd /tmp/
|
||||||
|
cp /usr/share/webapps/postfixadmin/config.local.php .
|
||||||
|
rm -r /usr/share/webapps/postfixadmin/
|
||||||
|
|
||||||
|
# Download latest version
|
||||||
|
wget -q4 https://github.com/postfixadmin/postfixadmin/archive/refs/tags/$(wget -q4O- https://api.github.com/repos/postfixadmin/postfixadmin/releases/latest | grep tag_name | awk '{print $2}' | tr -d '"|,').tar.gz -O postfixadmin.tar.gz
|
||||||
|
mkdir -p /usr/share/webapps/postfixadmin/
|
||||||
|
tar zxf postfixadmin.tar.gz -C /usr/share/webapps/postfixadmin --strip-components 1
|
||||||
|
|
||||||
|
# Create templates_c folder and set permissions
|
||||||
|
mkdir /usr/share/webapps/postfixadmin/templates_c/
|
||||||
|
setfacl -R -m u:${MYVEMAIL_NGINX_USERGROUP}:rwx /usr/share/webapps/postfixadmin/templates_c/
|
||||||
|
|
||||||
|
# Return config
|
||||||
|
mv config.local.php /usr/share/webapps/postfixadmin/
|
||||||
Loading…
Add table
Add a link
Reference in a new issue