Rebuild for alpine
This commit is contained in:
24
Resources/UpdateRainLoop.sh
Normal file
24
Resources/UpdateRainLoop.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/ash
|
||||
##Script for updating RainLoop
|
||||
NewRainLoopVer=$(curl -s https://api.github.com/repos/RainLoop/rainloop-webmail/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " ")
|
||||
|
||||
printf "RainLoop: checking for upgrades... "
|
||||
|
||||
if [ "$NewRainLoopVer" != "$(cat /opt/rainloop-installed)" ];
|
||||
then
|
||||
echo "update found"
|
||||
#Backup Config
|
||||
mv /opt/rainloop/data/_data_ /tmp/_data_
|
||||
rm -rf /opt/rainloop
|
||||
curl http://www.rainloop.net/repository/webmail/rainloop-community-latest.zip -o /tmp/rlcl.zip
|
||||
unzip -q /tmp/rlcl.zip -d /opt/rainloop
|
||||
chown -R nginx:nginx /var/www/rainloop
|
||||
find /opt/rainloop/ -type d -exec chmod 755 {} \;
|
||||
find /opt/rainloop/ -type f -exec chmod 644 {} \;
|
||||
echo $NewRainLoopVer > /opt/rainloop-installed
|
||||
#Restore config
|
||||
mv /tmp/_data_ /opt/rainloop/data/_data_
|
||||
echo "upgrade complete"
|
||||
else
|
||||
echo "update not found"
|
||||
fi
|
||||
Reference in New Issue
Block a user