1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-09 07:25:23 +02:00

Add automatic update for the community version

This script is run on Alpine Linux, but it should work on any other Linux Distrubution as well as long as the requirements are fulfilled.
This commit is contained in:
Daniel Hansson 2018-09-17 10:12:55 +02:00 committed by GitHub
parent 2792c8c1da
commit 9b6857854a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,6 +62,38 @@ Space view.
[Enterprise edition: v1.72.0](https://documize.com/downloads)
#### Update to latest comunity version automatically in Linux
```
#!/bin/bash
# Requires:
- curl
- wget
- A service for documize
VERSION="$(curl -s https://api.github.com/repos/documize/community/releases | grep 'tag_name' | cut -d\" -f4 | head -1)"
service documize stop
rm -f /bin/documize-community-linux-amd64
if wget https://github.com/documize/community/releases/download/$VERSION/documize-community-linux-amd64 -P /bin/
then
chmod +x /bin/documize-community-linux-amd64
echo "Rebooting in 5 seconds..."
echo "5"
sleep 1
echo "4"
sleep 1
echo "3"
sleep 1
echo "2"
sleep 1
echo "1"
sleep 1
reboot
fi
```
## OS support
Documize runs on the following: