Skip to content

Commit

Permalink
Merge branch 'master' of github.com:iost-official/go-iost
Browse files Browse the repository at this point in the history
  • Loading branch information
Ji Qiren committed Aug 29, 2023
2 parents 2febab8 + 08ef97d commit 1655216
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions script/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ update_container_ulimit() {
fi
}

update_container_security_opt() {
grep -q seccomp $PREFIX/docker-compose.yml && return
_SYS=$(uname)
if [ x$_SYS = x"Linux" ]; then
sed -i -e '/ulimits/{n;a\ security_opt:\n - seccomp:unconfined' -e '}' $PREFIX/docker-compose.yml
elif [ x$_SYS = x"Darwin" ]; then
sed -i '' -e '/ulimits/{n;a\
\ security_opt:' -e ';a\
\ - seccomp:unconfined' -e '}' $PREFIX/docker-compose.yml
else
>&2 echo System not recognized !!
fi
}

#
# main
#
Expand All @@ -60,6 +74,7 @@ cd $PREFIX

update_container_restart_policy
update_container_ulimit
update_container_security_opt
docker-compose pull
docker-compose up -d

Expand Down

0 comments on commit 1655216

Please sign in to comment.