Fix bug.
This commit is contained in:
parent
0801fae03d
commit
eb84cbaaea
|
@ -47,7 +47,7 @@ function write_messages(){
|
||||||
}
|
}
|
||||||
function fix_mongod_and_logrotate(){
|
function fix_mongod_and_logrotate(){
|
||||||
if [ -z "$(grep logRotate /etc/mongod.conf)" ]; then
|
if [ -z "$(grep logRotate /etc/mongod.conf)" ]; then
|
||||||
sed -i -E 's/logAppend.*/logRotate: reopen\n \0/g' /etc/mongod.conf
|
sudo sed -i -E 's/logAppend.*/logRotate: reopen\n \0/g' /etc/mongod.conf
|
||||||
fi
|
fi
|
||||||
sudo bash -l -c "
|
sudo bash -l -c "
|
||||||
cd /root && \
|
cd /root && \
|
||||||
|
@ -284,10 +284,10 @@ if [[ "$ubuntu_version" > '21' ]]; then # ruby must use openssl <= 1.1.1. Not su
|
||||||
sudo ln -s /etc/ssl/certs/ /opt/openssl/ssl/.
|
sudo ln -s /etc/ssl/certs/ /opt/openssl/ssl/.
|
||||||
sudo mkdir -p /etc/apt/trusted.gpg.d/
|
sudo mkdir -p /etc/apt/trusted.gpg.d/
|
||||||
fi
|
fi
|
||||||
cd /etc/nginx/
|
sudo mkdir -p /etc/nginx/orbit_sites
|
||||||
sudo mkdir orbit_sites/
|
nginx_conf="/etc/nginx/nginx.conf"
|
||||||
if [ -z "$(grep 'orbit_sites' nginx.conf)" ]; then
|
if [ -z "$(grep 'orbit_sites' $nginx_conf)" ]; then
|
||||||
sudo sed -i 's/\(include\ \/etc\/nginx\/sites-enabled\/\*\;\)/\1\n include\ \/etc\/nginx\/orbit_sites\/*;/g' nginx.conf
|
sudo sed -i 's/\(include\ \/etc\/nginx\/sites-enabled\/\*\;\)/\1\n include\ \/etc\/nginx\/orbit_sites\/*;/g' $nginx_conf
|
||||||
fi
|
fi
|
||||||
if [[ "$ubuntu_version" > '22' ]]; then #Use root account prevent reading socket denied
|
if [[ "$ubuntu_version" > '22' ]]; then #Use root account prevent reading socket denied
|
||||||
sudo sed -E -i 's/^[# ]*user.*/user root;/g' /etc/nginx/nginx.conf
|
sudo sed -E -i 's/^[# ]*user.*/user root;/g' /etc/nginx/nginx.conf
|
||||||
|
@ -353,6 +353,12 @@ if [ -z $(which rvm) ]; then
|
||||||
rvm user gemsets
|
rvm user gemsets
|
||||||
sudo chown $USER:$USER /usr/share/rvm -R
|
sudo chown $USER:$USER /usr/share/rvm -R
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$(grep rvm_max_time_flag ~/.rvmrc)" ]; then
|
||||||
|
echo "rvm_max_time_flag=200" >> ~/.rvmrc # timeout = 200 minutes
|
||||||
|
fi
|
||||||
|
source ~/.rvmrc
|
||||||
|
|
||||||
source "/etc/profile.d/rvm.sh"
|
source "/etc/profile.d/rvm.sh"
|
||||||
# install ruby 2.7.6
|
# install ruby 2.7.6
|
||||||
if [[ -z "$openssl_dir" ]]; then
|
if [[ -z "$openssl_dir" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue