Skip to content

Commit 809e4f2

Browse files
authored
chore(*): fix fedora install error (#29)
1 parent 01b6a9b commit 809e4f2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ deploy_compose(){
4848
system::centos::disable_selinux
4949
system::centos::config_repo
5050
;;
51+
Fedora|fedora)
52+
system::fedora::disable_selinux
53+
system::fedora::config_repo
54+
;;
5155
Ubuntu|ubuntu)
5256
system::ubuntu::config_repo
5357
;;

library/system.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ system::centos::disable_selinux(){
1010
infolog "Disabled selinux service successfully"
1111
}
1212

13+
system::fedora::disable_selinux(){
14+
sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config
15+
setenforce 0 || warnlog "Warning: setenforce 0 failed"
16+
infolog "Disabled selinux service successfully"
17+
}
18+
1319
system::centos::config_repo(){
1420
infolog "Updated the yum repo file"
1521
yum clean -q all || true
@@ -20,6 +26,16 @@ system::centos::config_repo(){
2026
fi
2127
}
2228

29+
system::fedora::config_repo(){
30+
infolog "Updated the yum repo file"
31+
yum clean -q all || true
32+
cp -f ${RESOURCES_NGINX_DIR}/repos/CentOS-7-All-in-One.repo /etc/yum.repos.d/offline-resources.repo
33+
sed -i "s#${DEFAULT_URL}#file://${RESOURCES_NGINX_DIR}#g" /etc/yum.repos.d/offline-resources.repo
34+
if yum makecache -q > /dev/null; then
35+
infolog "Updated the repo file successfully"
36+
fi
37+
}
38+
2339
system::debian::config_repo(){
2440
infolog "Update the apt list file"
2541
echo "deb [trusted=yes] file://${RESOURCES_NGINX_DIR}/debian/${ARCH} ${VERSION_CODENAME}/" \

0 commit comments

Comments
 (0)