This commit is contained in:
BoHung Chiu 2022-09-25 16:54:27 +08:00
parent 1e8bc0c650
commit aa948dc590
2 changed files with 12 additions and 8 deletions

View File

@ -110,6 +110,12 @@ else
mkdir -p "$local_store_path" mkdir -p "$local_store_path"
$scp_command$root_path/* $local_store_path/. 2>>/dev/null $scp_command$root_path/* $local_store_path/. 2>>/dev/null
$scp_command$root_path/.[^.]* $local_store_path/. 2>>/dev/null $scp_command$root_path/.[^.]* $local_store_path/. 2>>/dev/null
if [[ ! -z "$org_ssl_dir" ]]; then
if [ -z "$(which certbot)" ]; then
wget http://gitlab.tp.rulingcom.com/erictyl/install_r45_on_ubuntu_1804lts_doc/-/raw/master/install_certbot.sh
sudo_command bash ./install_certbot.sh
fi
fi
cd $local_store_path cd $local_store_path
new_nginx_file="/etc/nginx/orbit_sites/$new_site_name" new_nginx_file="/etc/nginx/orbit_sites/$new_site_name"
sudo_command cp -f "$(basename $nginx_file)" $new_nginx_file sudo_command cp -f "$(basename $nginx_file)" $new_nginx_file
@ -117,10 +123,6 @@ else
sed "s/\(database:\s\+\).\+/\1${new_db_name}/g" -i "$local_store_path/config/mongoid.yml" sed "s/\(database:\s\+\).\+/\1${new_db_name}/g" -i "$local_store_path/config/mongoid.yml"
if [[ -z "$use_local_command" ]] && [[ ! -z "$match_ssl" ]]; then if [[ -z "$use_local_command" ]] && [[ ! -z "$match_ssl" ]]; then
if [[ ! -z "$org_ssl_dir" ]]; then if [[ ! -z "$org_ssl_dir" ]]; then
if [ -z "$(which certbot)" ]; then
wget http://gitlab.tp.rulingcom.com/erictyl/install_r45_on_ubuntu_1804lts_doc/-/raw/master/install_certbot.sh
sudo_command bash ./install_certbot.sh
fi
sudo_command mkdir -p $org_ssl_dir sudo_command mkdir -p $org_ssl_dir
sudo_command mkdir -p /etc/letsencrypt/renewal sudo_command mkdir -p /etc/letsencrypt/renewal
sudo_command cp -r $new_ssl_dir/* $org_ssl_dir/. sudo_command cp -r $new_ssl_dir/* $org_ssl_dir/.

View File

@ -114,6 +114,12 @@ else
mkdir -p "$local_store_path" mkdir -p "$local_store_path"
$scp_command$root_path/* $local_store_path/. 2>>/dev/null $scp_command$root_path/* $local_store_path/. 2>>/dev/null
$scp_command$root_path/.[^.]* $local_store_path/. 2>>/dev/null $scp_command$root_path/.[^.]* $local_store_path/. 2>>/dev/null
if [[ ! -z "$org_ssl_dir" ]]; then
if [ -z "$(which certbot)" ]; then
wget http://gitlab.tp.rulingcom.com/erictyl/install_r45_on_ubuntu_1804lts_doc/-/raw/master/install_certbot.sh
sudo_command bash ./install_certbot.sh
fi
fi
cd $local_store_path cd $local_store_path
new_nginx_file="/etc/nginx/orbit_sites/$new_site_name" new_nginx_file="/etc/nginx/orbit_sites/$new_site_name"
sudo_command cp -f "$(basename $nginx_file)" $new_nginx_file sudo_command cp -f "$(basename $nginx_file)" $new_nginx_file
@ -121,10 +127,6 @@ else
sed "s/\(database:\s\+\).\+/\1${new_db_name}/g" -i "$local_store_path/config/mongoid.yml" sed "s/\(database:\s\+\).\+/\1${new_db_name}/g" -i "$local_store_path/config/mongoid.yml"
if [[ -z "$use_local_command" ]] && [[ ! -z "$match_ssl" ]]; then if [[ -z "$use_local_command" ]] && [[ ! -z "$match_ssl" ]]; then
if [[ ! -z "$org_ssl_dir" ]]; then if [[ ! -z "$org_ssl_dir" ]]; then
if [ -z "$(which certbot)" ]; then
wget http://gitlab.tp.rulingcom.com/erictyl/install_r45_on_ubuntu_1804lts_doc/-/raw/master/install_certbot.sh
sudo_command bash ./install_certbot.sh
fi
sudo_command mkdir -p $org_ssl_dir sudo_command mkdir -p $org_ssl_dir
sudo_command mkdir -p /etc/letsencrypt/renewal sudo_command mkdir -p /etc/letsencrypt/renewal
sudo_command cp -r $new_ssl_dir/* $org_ssl_dir/. sudo_command cp -r $new_ssl_dir/* $org_ssl_dir/.