Skip to content

Commit

Permalink
Fixed the agent update algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
kochetovd committed Mar 6, 2024
1 parent 09bf0ff commit 66e10a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ function releem_set_cron() {

function releem_update() {
printf "\033[37m\n * Downloading latest version of Releem Agent...\033[0m\n"
$sudo_cmd curl -w "%{http_code}" -L -o $WORKDIR/releem-agent.new https://releem.s3.amazonaws.com/v2/releem-agent-$(arch)
$sudo_cmd curl -w "%{http_code}" -L -o $WORKDIR/mysqlconfigurer.sh.new https://releem.s3.amazonaws.com/v2/mysqlconfigurer.sh
$sudo_cmd $WORKDIR/releem-agent stop || true
$sudo_cmd curl -w "%{http_code}" -L -o $WORKDIR/mysqlconfigurer.sh https://releem.s3.amazonaws.com/v2/mysqlconfigurer.sh
$sudo_cmd curl -w "%{http_code}" -L -o $WORKDIR/releem-agent https://releem.s3.amazonaws.com/v2/releem-agent-$(arch)
$sudo_cmd mv $WORKDIR/releem-agent.new $WORKDIR/releem-agent
$sudo_cmd mv $WORKDIR/mysqlconfigurer.sh.new $WORKDIR/mysqlconfigurer.sh
$sudo_cmd chmod 755 $WORKDIR/mysqlconfigurer.sh $WORKDIR/releem-agent
$sudo_cmd $WORKDIR/releem-agent start || true
$sudo_cmd $WORKDIR/releem-agent -f
Expand Down

0 comments on commit 66e10a7

Please sign in to comment.