lfelipe1501 revised this gist . Go to revision
1 file changed, 23 insertions
updateKUMA.sh(file created)
@@ -0,0 +1,23 @@ | |||
1 | + | #!/bin/bash | |
2 | + | ||
3 | + | echo "" | |
4 | + | #echo "Number of new Build" | |
5 | + | #echo "https://github.com/louislam/uptime-kuma/releases" | |
6 | + | #echo -n "> " | |
7 | + | #read newv | |
8 | + | ||
9 | + | newv=$(curl -s https://api.github.com/repos/louislam/uptime-kuma/releases/latest|grep tag_name | cut -d '"' -f 4|sed 's/v//g') | |
10 | + | ||
11 | + | cd uptime-kuma | |
12 | + | ||
13 | + | # Update from git | |
14 | + | git fetch --all | |
15 | + | git checkout $newv --force | |
16 | + | ||
17 | + | # Install dependencies and prebuilt | |
18 | + | npm install --omit=dev | |
19 | + | npm run download-dist | |
20 | + | ||
21 | + | # Restart | |
22 | + | pm2 restart uptime-kuma | |
23 | + |
Newer
Older