21 lines
468 B
Bash
21 lines
468 B
Bash
#!/bin/bash
|
|
|
|
error () {
|
|
printf '%s\n' "=== Failed to update ==="
|
|
exit 1
|
|
}
|
|
|
|
echo "=== Updating Act Runner to v$1 ==="
|
|
|
|
systemctl stop act_runner.service || error
|
|
|
|
wget -nv -O /usr/local/bin/act_runner https://gitea.com/gitea/act_runner/releases/download/v$1/act_runner-$1-linux-amd64 || error
|
|
|
|
systemctl start act_runner.service || error
|
|
|
|
systemctl is-active act_runner.service || error
|
|
|
|
systemctl status act_runner.service || error
|
|
|
|
echo "=== Update finished ==="
|