fixed installer for centos

This commit is contained in:
2021-01-16 22:10:13 +01:00
parent 6c55f98084
commit e9e0e8a186
2 changed files with 7 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ elif [ "$(grep -oP '(?<=^PLATFORM_ID=).+' /etc/os-release | tr -d '"')" = "platf
rpm --import https://openresty.org/package/pubkey.gpg
sed -i 's/MOGOVER/'$MongoVer'/g' config/EL8/mongodb.repo
mv config/EL8/mongodb.repo /etc/yum.repos.d/mongodb-org-$MongoVer.repo
rpm --import https://www.mongodb.org/static/pgp/server-$MongoVer.asc
$PKGM check-update --refresh
useradd -r -U -s /usr/sbin/nologin -d /var/www www-data
###adding selinux module
@@ -84,5 +85,11 @@ openssl genrsa -out /opt/ShellHub/keys/ssh_private_key 2048
##Setup services
mv config/ServiceTemplates/ShellHubAPI.service /etc/systemd/system/ShellHubAPI.service
mv config/ServiceTemplates/ShellHubSSH.service /etc/systemd/system/ShellHubSSH.service
if [ "$(grep -oP '(?<=^PLATFORM_ID=).+' /etc/os-release | tr -d '"')" = "platform:el8" ]; then
##Resetting reseting service permissions
restorecon -Rv /etc/systemd/system
fi
systemctl daemon-reload
systemctl enable --now ShellHubAPI ShellHubSSH