Mail-Archiver update
This commit is contained in:
parent
5f2bd570a8
commit
32d6597e7b
@ -29,6 +29,25 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "mail-archiver" "s1t5/mail-archiver"; then
|
if check_for_gh_release "mail-archiver" "s1t5/mail-archiver"; then
|
||||||
|
msg_info "Creating Backup"
|
||||||
|
cp /opt/mail-archiver/appsettings.json /opt/mail-archiver/.env /opt/
|
||||||
|
[[ -d /opt/mail-archiver/DataProtection-Keys ]] && cp -r /opt/mail-archiver/DataProtection-Keys /opt
|
||||||
|
msg_ok "Created Backup"
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mail-archiver" "s1t5/mail-archiver" "tarball"
|
||||||
|
|
||||||
|
msg_info "Updating Mail-Archiver"
|
||||||
|
mv /opt/mail-archiver /opt/mail-archiver-build
|
||||||
|
cd /opt/mail-archiver-build
|
||||||
|
$STD dotnet restore
|
||||||
|
$STD dotnet publish -c Release -o /opt/mail-archiver
|
||||||
|
rm -rf /opt/mail-archiver-build
|
||||||
|
msg_ok "Updated Mail-Archiver"
|
||||||
|
|
||||||
|
msg_info "Restoring Backup"
|
||||||
|
cp /opt/appsettings.json /opt/.env /opt/mail-archiver
|
||||||
|
[[ -d /opt/DataProtection-Keys ]] && cp -r /opt/DataProtection-Keys /opt/mail-archiver/
|
||||||
|
msg_ok "Restored Backup"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user