Rename cloud vhost file.
This commit is contained in:
parent
d9185ecd42
commit
7dbbede0d6
@ -3662,15 +3662,15 @@ if [[ -d "$apache_vhost_dir" ]] ; then
|
||||
|
||||
# - Backup apache vhost file if exists
|
||||
# -
|
||||
if [[ -f "${apache_vhost_dir}/${WEBSITE}.conf.static" ]]; then
|
||||
if [[ -f "${apache_vhost_dir}/${WEBSITE}.conf.php-fpm" ]]; then
|
||||
|
||||
echo "" >> $log_file
|
||||
echo "# - Backup existing file '${apache_vhost_dir}/${WEBSITE}.conf.static'" >> $log_file
|
||||
echo "# - Backup existing file '${apache_vhost_dir}/${WEBSITE}.conf.php-fpm'" >> $log_file
|
||||
echo "# -" >> $log_file
|
||||
echononl "Backup existing file '${apache_vhost_dir}/${WEBSITE}.conf.static'" >> $log_file
|
||||
echononl "Backup existing file '${apache_vhost_dir}/${WEBSITE}.conf.php-fpm'" >> $log_file
|
||||
|
||||
echo "mv \"${apache_vhost_dir}/${WEBSITE}.conf.static\" \"${apache_vhost_dir}/${WEBSITE}.conf.static.$backup_date\"" >> $log_file
|
||||
mv "${apache_vhost_dir}/${WEBSITE}.conf.static" "${apache_vhost_dir}/${WEBSITE}.conf.static.$backup_date" >> $log_file 2>&1
|
||||
echo "mv \"${apache_vhost_dir}/${WEBSITE}.conf.php-fpm\" \"${apache_vhost_dir}/${WEBSITE}.conf.php-fpm.$backup_date\"" >> $log_file
|
||||
mv "${apache_vhost_dir}/${WEBSITE}.conf.php-fpm" "${apache_vhost_dir}/${WEBSITE}.conf.php-fpm.$backup_date" >> $log_file 2>&1
|
||||
|
||||
if [ "$?" = 0 ]; then
|
||||
echo_ok
|
||||
@ -3697,7 +3697,7 @@ if [[ -d "$apache_vhost_dir" ]] ; then
|
||||
echo "# -" >> $log_file
|
||||
echononl "Create apache vhost entry for '$WEBSITE'"
|
||||
|
||||
cat<<EOF > "${apache_vhost_dir}/${WEBSITE}.conf.static" 2>> $log_file
|
||||
cat<<EOF > "${apache_vhost_dir}/${WEBSITE}.conf.php-fpm" 2>> $log_file
|
||||
# --- $WEBSITE
|
||||
|
||||
<VirtualHost ${IPV4}:80 [${IPV6}]:80>
|
||||
@ -3868,9 +3868,9 @@ EOF
|
||||
fi
|
||||
|
||||
|
||||
# - Symlimk Apache VHost file '${WEBSITE}.conf' --> '${WEBSITE}.conf.static'
|
||||
# - Symlimk Apache VHost file '${WEBSITE}.conf' --> '${WEBSITE}.conf.php-fpm'
|
||||
# -
|
||||
_symlink_src="${WEBSITE}.conf.static"
|
||||
_symlink_src="${WEBSITE}.conf.php-fpm"
|
||||
_symlink_dst="${apache_vhost_dir}/${WEBSITE}.conf"
|
||||
echo "" >> $log_file
|
||||
echo "# - Symlink '${_symlink_dst}' --> ${_symlink_src}" >> $log_file
|
||||
|
Loading…
Reference in New Issue
Block a user