Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wg_game.sh #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions wg_game.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ function install_wg(){
systemctl disable firewalld
install_tools "yum"
elif [ "$RELEASE" == "centos" ] && [ "$VERSION" == "8" ]; then
yum install -y yum-utils epel-release
yum-config-manager --setopt=centosplus.includepkgs="kernel-plus, kernel-plus-*" --setopt=centosplus.enabled=1 --save
sed -e 's/^DEFAULTKERNEL=kernel-core$/DEFAULTKERNEL=kernel-plus-core/' -i /etc/sysconfig/kernel
yum install -y kernel-plus wireguard-tools
#yum install -y yum-utils epel-release
#yum-config-manager --setopt=centosplus.includepkgs="kernel-plus, kernel-plus-*" --setopt=centosplus.enabled=1 --save
#sed -e 's/^DEFAULTKERNEL=kernel-core$/DEFAULTKERNEL=kernel-plus-core/' -i /etc/sysconfig/kernel
#yum install -y kernel-plus wireguard-tools
#doesn't work sometimes,use the method 2 via ELRepo's pre-built module
yum install elrepo-release epel-release
yum install kmod-wireguard wireguard-tools
sed -i "s/GRUB_DEFAULT=saved/GRUB_DEFAULT=0/" /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
systemctl stop firewalld
Expand Down