Moves without quotes
This seems to cause problems when building images
This commit is contained in:
parent
5c297934a3
commit
057fcfaa6f
|
@ -245,10 +245,12 @@ function add_cert_letsencrypt {
|
||||||
|
|
||||||
# replace some legacy filenames
|
# replace some legacy filenames
|
||||||
if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt" ]; then
|
if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt" ]; then
|
||||||
mv "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt" "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem"
|
# shellcheck disable=SC2086
|
||||||
|
mv /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem
|
||||||
fi
|
fi
|
||||||
if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt" ]; then
|
if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt" ]; then
|
||||||
mv "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt" "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem"
|
# shellcheck disable=SC2086
|
||||||
|
mv /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem
|
||||||
fi
|
fi
|
||||||
sed -i "s|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem|g" "/etc/nginx/sites-available/$LETSENCRYPT_HOSTNAME"
|
sed -i "s|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem|g" "/etc/nginx/sites-available/$LETSENCRYPT_HOSTNAME"
|
||||||
sed -i "s|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem|g" "/etc/nginx/sites-available/$LETSENCRYPT_HOSTNAME"
|
sed -i "s|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem|g" "/etc/nginx/sites-available/$LETSENCRYPT_HOSTNAME"
|
||||||
|
@ -256,7 +258,8 @@ function add_cert_letsencrypt {
|
||||||
# link the private key
|
# link the private key
|
||||||
if [ -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key" ]; then
|
if [ -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key" ]; then
|
||||||
if [ ! -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key.old" ]; then
|
if [ ! -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key.old" ]; then
|
||||||
mv "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key" "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key.old"
|
# shellcheck disable=SC2086
|
||||||
|
mv /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key.old
|
||||||
else
|
else
|
||||||
rm -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key"
|
rm -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key"
|
||||||
fi
|
fi
|
||||||
|
@ -269,7 +272,8 @@ function add_cert_letsencrypt {
|
||||||
# link the public key
|
# link the public key
|
||||||
if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem" ]; then
|
if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem" ]; then
|
||||||
if [ ! -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem.old" ]; then
|
if [ ! -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem.old" ]; then
|
||||||
mv "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem" "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem.old"
|
# shellcheck disable=SC2086
|
||||||
|
mv /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem.old
|
||||||
else
|
else
|
||||||
rm -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem"
|
rm -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -607,7 +607,8 @@ function install_etherpad {
|
||||||
create_site_certificate "$ETHERPAD_DOMAIN_NAME" 'yes'
|
create_site_certificate "$ETHERPAD_DOMAIN_NAME" 'yes'
|
||||||
|
|
||||||
if [ -f "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.crt" ]; then
|
if [ -f "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.crt" ]; then
|
||||||
mv "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.crt" "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem"
|
# shellcheck disable=SC2086
|
||||||
|
mv /etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.crt /etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem
|
||||||
fi
|
fi
|
||||||
if [ -f "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem" ]; then
|
if [ -f "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem" ]; then
|
||||||
chown etherpad: "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem"
|
chown etherpad: "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem"
|
||||||
|
|
|
@ -380,7 +380,8 @@ function install_friendica {
|
||||||
set_completion_param "friendica commit" "$FRIENDICA_COMMIT"
|
set_completion_param "friendica commit" "$FRIENDICA_COMMIT"
|
||||||
|
|
||||||
rm -rf "$FRIENDICA_PATH"
|
rm -rf "$FRIENDICA_PATH"
|
||||||
mv friendica "$FRIENDICA_PATH"
|
# shellcheck disable=SC2086
|
||||||
|
mv friendica $FRIENDICA_PATH
|
||||||
|
|
||||||
git_clone "$FRIENDICA_ADDONS_REPO" "$FRIENDICA_PATH/addon"
|
git_clone "$FRIENDICA_ADDONS_REPO" "$FRIENDICA_PATH/addon"
|
||||||
cd "$FRIENDICA_PATH/addon" || exit 34835685
|
cd "$FRIENDICA_PATH/addon" || exit 34835685
|
||||||
|
|
|
@ -360,7 +360,8 @@ function upgrade_gnusocial {
|
||||||
|
|
||||||
if [ -f "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php" ]; then
|
if [ -f "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php" ]; then
|
||||||
if [ -f "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php" ]; then
|
if [ -f "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php" ]; then
|
||||||
mv "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php" "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,8 @@ function upgrade_gogs {
|
||||||
rm -rf "$INSTALL_DIR/gogs-repositories"
|
rm -rf "$INSTALL_DIR/gogs-repositories"
|
||||||
fi
|
fi
|
||||||
if [ -d /home/${GOGS_USERNAME}/gogs-repositories ]; then
|
if [ -d /home/${GOGS_USERNAME}/gogs-repositories ]; then
|
||||||
mv "/home/${GOGS_USERNAME}/gogs-repositories" "$INSTALL_DIR"
|
# shellcheck disable=SC2086
|
||||||
|
mv /home/${GOGS_USERNAME}/gogs-repositories $INSTALL_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gogs_parameters
|
gogs_parameters
|
||||||
|
@ -221,7 +222,8 @@ function upgrade_gogs {
|
||||||
rm -rf /home/${GOGS_USERNAME}/gogs-repositories
|
rm -rf /home/${GOGS_USERNAME}/gogs-repositories
|
||||||
fi
|
fi
|
||||||
if [ -d "$INSTALL_DIR/gogs-repositories" ]; then
|
if [ -d "$INSTALL_DIR/gogs-repositories" ]; then
|
||||||
mv "$INSTALL_DIR/gogs-repositories" "/home/${GOGS_USERNAME}/gogs-repositories"
|
# shellcheck disable=SC2086
|
||||||
|
mv $INSTALL_DIR/gogs-repositories /home/${GOGS_USERNAME}/gogs-repositories
|
||||||
fi
|
fi
|
||||||
chown -R "${GOGS_USERNAME}":"${GOGS_USERNAME}" "/home/${GOGS_USERNAME}"
|
chown -R "${GOGS_USERNAME}":"${GOGS_USERNAME}" "/home/${GOGS_USERNAME}"
|
||||||
|
|
||||||
|
@ -351,6 +353,7 @@ function backup_remote_gogs {
|
||||||
|
|
||||||
echo $"Obtaining Gogs repos backup"
|
echo $"Obtaining Gogs repos backup"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
mv /home/$GOGS_USERNAME/gogs-repositories/*.git /home/$GOGS_USERNAME/gogs-repositories/bob
|
mv /home/$GOGS_USERNAME/gogs-repositories/*.git /home/$GOGS_USERNAME/gogs-repositories/bob
|
||||||
backup_directory_to_friend /home/$GOGS_USERNAME/gogs-repositories gogsrepos
|
backup_directory_to_friend /home/$GOGS_USERNAME/gogs-repositories gogsrepos
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,8 @@ function restore_local_htmly {
|
||||||
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
|
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
|
||||||
rm -rf "/var/www/${HTMLY_DOMAIN_NAME}/previous"
|
rm -rf "/var/www/${HTMLY_DOMAIN_NAME}/previous"
|
||||||
fi
|
fi
|
||||||
mv "/var/www/${HTMLY_DOMAIN_NAME}/htdocs" "/var/www/${HTMLY_DOMAIN_NAME}/previous"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${HTMLY_DOMAIN_NAME}/htdocs /var/www/${HTMLY_DOMAIN_NAME}/previous
|
||||||
fi
|
fi
|
||||||
if [ -d "${temp_restore_dir}/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then
|
if [ -d "${temp_restore_dir}/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then
|
||||||
temp_source_dir=$(find ${temp_restore_dir} -name htdocs)
|
temp_source_dir=$(find ${temp_restore_dir} -name htdocs)
|
||||||
|
@ -261,7 +262,8 @@ function restore_local_htmly {
|
||||||
# shellcheck disable=SC2181
|
# shellcheck disable=SC2181
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
|
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
|
||||||
mv "/var/www/${HTMLY_DOMAIN_NAME}/previous" "/var/www/${HTMLY_DOMAIN_NAME}/htdocs"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${HTMLY_DOMAIN_NAME}/previous /var/www/${HTMLY_DOMAIN_NAME}/htdocs
|
||||||
fi
|
fi
|
||||||
set_user_permissions
|
set_user_permissions
|
||||||
backup_unmount_drive
|
backup_unmount_drive
|
||||||
|
@ -283,7 +285,8 @@ function restore_local_htmly {
|
||||||
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
||||||
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
||||||
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post" ]; then
|
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post" ]; then
|
||||||
mv "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/"*.md "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/*.md /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -321,7 +324,8 @@ function restore_remote_htmly {
|
||||||
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
|
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
|
||||||
rm -rf "/var/www/${HTMLY_DOMAIN_NAME}/previous"
|
rm -rf "/var/www/${HTMLY_DOMAIN_NAME}/previous"
|
||||||
fi
|
fi
|
||||||
mv "/var/www/${HTMLY_DOMAIN_NAME}/htdocs" "/var/www/${HTMLY_DOMAIN_NAME}/previous"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${HTMLY_DOMAIN_NAME}/htdocs /var/www/${HTMLY_DOMAIN_NAME}/previous
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "${temp_restore_dir}/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then
|
if [ -d "${temp_restore_dir}/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then
|
||||||
|
@ -337,7 +341,8 @@ function restore_remote_htmly {
|
||||||
# shellcheck disable=SC2181
|
# shellcheck disable=SC2181
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
|
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
|
||||||
mv "/var/www/${HTMLY_DOMAIN_NAME}/previous" "/var/www/${HTMLY_DOMAIN_NAME}/htdocs"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${HTMLY_DOMAIN_NAME}/previous /var/www/${HTMLY_DOMAIN_NAME}/htdocs
|
||||||
fi
|
fi
|
||||||
exit 593
|
exit 593
|
||||||
fi
|
fi
|
||||||
|
@ -354,7 +359,8 @@ function restore_remote_htmly {
|
||||||
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
||||||
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
||||||
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post" ]; then
|
if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post" ]; then
|
||||||
mv "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/"*.md "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/*.md /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -213,7 +213,8 @@ function icecast_import_from_directory {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dest_dir=$(basename "$selected_dir")
|
dest_dir=$(basename "$selected_dir")
|
||||||
mv "$selected_dir" $ICECAST_DIR
|
# shellcheck disable=SC2086
|
||||||
|
mv $selected_dir $ICECAST_DIR
|
||||||
|
|
||||||
icecast_convert_files "$ICECAST_DIR/$dest_dir"
|
icecast_convert_files "$ICECAST_DIR/$dest_dir"
|
||||||
icecast_add_file_to_playlist "$ICECAST_DIR/$dest_dir"
|
icecast_add_file_to_playlist "$ICECAST_DIR/$dest_dir"
|
||||||
|
|
|
@ -206,7 +206,8 @@ function koel_import_from_directory {
|
||||||
255) return;;
|
255) return;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
mv "$selected_dir" /music
|
# shellcheck disable=SC2086
|
||||||
|
mv $selected_dir /music
|
||||||
|
|
||||||
dialog --title $"Import music directory" \
|
dialog --title $"Import music directory" \
|
||||||
--msgbox $"Import success. You may need to re-sync within Koel." 6 40
|
--msgbox $"Import success. You may need to re-sync within Koel." 6 40
|
||||||
|
|
|
@ -272,7 +272,8 @@ function matrix_configure_homeserver_yaml {
|
||||||
print;
|
print;
|
||||||
}' "${filepath}" > "${ymltemp}"
|
}' "${filepath}" > "${ymltemp}"
|
||||||
|
|
||||||
mv "${ymltemp}" "${filepath}"
|
# shellcheck disable=SC2086
|
||||||
|
mv ${ymltemp} ${filepath}
|
||||||
|
|
||||||
if [[ $ONION_ONLY == "no" ]]; then
|
if [[ $ONION_ONLY == "no" ]]; then
|
||||||
sed -i "s|tls_certificate_path:.*|tls_certificate_path: \"/etc/ssl/certs/${MATRIX_DOMAIN_NAME}.pem\"|g" "${filepath}"
|
sed -i "s|tls_certificate_path:.*|tls_certificate_path: \"/etc/ssl/certs/${MATRIX_DOMAIN_NAME}.pem\"|g" "${filepath}"
|
||||||
|
|
|
@ -692,7 +692,8 @@ function install_nextcloud_main {
|
||||||
systemctl restart mariadb
|
systemctl restart mariadb
|
||||||
|
|
||||||
# move the data directory
|
# move the data directory
|
||||||
mv "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/data" "/var/www/${NEXTCLOUD_DOMAIN_NAME}/"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/data /var/www/${NEXTCLOUD_DOMAIN_NAME}/
|
||||||
sed -i "s|'datadirectory'.*|'datadirectory' => '/var/www/$NEXTCLOUD_DOMAIN_NAME/data',|g" "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php"
|
sed -i "s|'datadirectory'.*|'datadirectory' => '/var/www/$NEXTCLOUD_DOMAIN_NAME/data',|g" "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php"
|
||||||
|
|
||||||
set_completion_param "nextcloud domain" "$NEXTCLOUD_DOMAIN_NAME"
|
set_completion_param "nextcloud domain" "$NEXTCLOUD_DOMAIN_NAME"
|
||||||
|
|
|
@ -222,7 +222,8 @@ function pelican_new_blog {
|
||||||
|
|
||||||
# move to the content directory
|
# move to the content directory
|
||||||
CURRENT_INDEX=$(cat $PELICAN_CURRENT_BLOG_INDEX)
|
CURRENT_INDEX=$(cat $PELICAN_CURRENT_BLOG_INDEX)
|
||||||
mv "$PELICAN_BLOG_INSTALL_DIR/.new-blog-entry" "$BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md"
|
# shellcheck disable=SC2086
|
||||||
|
mv $PELICAN_BLOG_INSTALL_DIR/.new-blog-entry $BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md
|
||||||
|
|
||||||
# increment the index
|
# increment the index
|
||||||
CURRENT_INDEX=$((CURRENT_INDEX + 1))
|
CURRENT_INDEX=$((CURRENT_INDEX + 1))
|
||||||
|
|
|
@ -373,7 +373,8 @@ function upgrade_postactiv {
|
||||||
|
|
||||||
if [ -f "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php" ]; then
|
if [ -f "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php" ]; then
|
||||||
if [ -f "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php" ]; then
|
if [ -f "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php" ]; then
|
||||||
mv "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php" "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -355,7 +355,8 @@ function restore_remote_tahoelafs {
|
||||||
# shellcheck disable=SC2181
|
# shellcheck disable=SC2181
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
if [ -d "${TAHOE_DIR}-old" ]; then
|
if [ -d "${TAHOE_DIR}-old" ]; then
|
||||||
mv "${TAHOE_DIR}-old" $TAHOE_DIR
|
# shellcheck disable=SC2086
|
||||||
|
mv ${TAHOE_DIR}-old $TAHOE_DIR
|
||||||
fi
|
fi
|
||||||
exit 623925
|
exit 623925
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -107,7 +107,8 @@ function refresh_gpg_keys {
|
||||||
function ssh_remove_small_moduli {
|
function ssh_remove_small_moduli {
|
||||||
# shellcheck disable=SC2024
|
# shellcheck disable=SC2024
|
||||||
sudo awk '$5 > 2000' /etc/ssh/moduli > "/home/$CURR_USER/moduli"
|
sudo awk '$5 > 2000' /etc/ssh/moduli > "/home/$CURR_USER/moduli"
|
||||||
sudo mv "/home/$CURR_USER/moduli" /etc/ssh/moduli
|
# shellcheck disable=SC2086
|
||||||
|
sudo mv /home/$CURR_USER/moduli /etc/ssh/moduli
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_ssh_client {
|
function configure_ssh_client {
|
||||||
|
|
|
@ -137,11 +137,14 @@ fi
|
||||||
|
|
||||||
# move the cert to the user's home
|
# move the cert to the user's home
|
||||||
mkdir "/home/$USERNAME/emailcert"
|
mkdir "/home/$USERNAME/emailcert"
|
||||||
mv "/etc/ssl/certs/$USERNAME.cer" "/home/$USERNAME/emailcert"
|
# shellcheck disable=SC2086
|
||||||
|
mv /etc/ssl/certs/$USERNAME.cer /home/$USERNAME/emailcert
|
||||||
cp "/etc/ssl/certs/dovecot.crt" "/home/$USERNAME/emailcert"
|
cp "/etc/ssl/certs/dovecot.crt" "/home/$USERNAME/emailcert"
|
||||||
cp "/etc/ssl/certs/ca-$HOSTNAME.crt" "/home/$USERNAME/emailcert"
|
cp "/etc/ssl/certs/ca-$HOSTNAME.crt" "/home/$USERNAME/emailcert"
|
||||||
mv "/etc/ssl/private/$USERNAME.key" "/home/$USERNAME/emailcert"
|
# shellcheck disable=SC2086
|
||||||
mv "/etc/ssl/certs/$USERNAME.crt" "/home/$USERNAME/emailcert"
|
mv /etc/ssl/private/$USERNAME.key /home/$USERNAME/emailcert
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
mv /etc/ssl/certs/$USERNAME.crt /home/$USERNAME/emailcert
|
||||||
openssl pkcs12 -export -in "/home/$USERNAME/emailcert/$USERNAME.cer" \
|
openssl pkcs12 -export -in "/home/$USERNAME/emailcert/$USERNAME.cer" \
|
||||||
-out "/home/$USERNAME/emailcert/$USERNAME.p12" \
|
-out "/home/$USERNAME/emailcert/$USERNAME.p12" \
|
||||||
-inkey "/home/$USERNAME/emailcert/$USERNAME.key" \
|
-inkey "/home/$USERNAME/emailcert/$USERNAME.key" \
|
||||||
|
|
|
@ -1343,8 +1343,10 @@ function reset_tripwire {
|
||||||
fi
|
fi
|
||||||
if [ ! -f "/etc/tripwire/${HOSTNAME}-local.key" ]; then
|
if [ ! -f "/etc/tripwire/${HOSTNAME}-local.key" ]; then
|
||||||
if [ -f "/etc/tripwire/${PROJECT_NAME}-local.key" ]; then
|
if [ -f "/etc/tripwire/${PROJECT_NAME}-local.key" ]; then
|
||||||
mv "/etc/tripwire/${PROJECT_NAME}-local.key" "/etc/tripwire/${HOSTNAME}-local.key"
|
# shellcheck disable=SC2086
|
||||||
mv "/etc/tripwire/${PROJECT_NAME}-site.key" "/etc/tripwire/${HOSTNAME}-site.key"
|
mv /etc/tripwire/${PROJECT_NAME}-local.key /etc/tripwire/${HOSTNAME}-local.key
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
mv /etc/tripwire/${PROJECT_NAME}-site.key /etc/tripwire/${HOSTNAME}-site.key
|
||||||
else
|
else
|
||||||
echo $'Error: missing local key'
|
echo $'Error: missing local key'
|
||||||
any_key
|
any_key
|
||||||
|
|
|
@ -490,7 +490,8 @@ do
|
||||||
if [ ! -d "${CURR_DIR}/build" ]; then
|
if [ ! -d "${CURR_DIR}/build" ]; then
|
||||||
mkdir "${CURR_DIR}/build"
|
mkdir "${CURR_DIR}/build"
|
||||||
fi
|
fi
|
||||||
mv -f "${CURR_DIR}/${PROJECT_NAME}*.${im}" "${CURR_DIR}/build"
|
# shellcheck disable=SC2086
|
||||||
|
mv -f ${CURR_DIR}/${PROJECT_NAME}*.${im} ${CURR_DIR}/build
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -628,8 +629,10 @@ do
|
||||||
# shellcheck disable=SC2012,SC2086
|
# shellcheck disable=SC2012,SC2086
|
||||||
no_of_files=$(ls -afq build/${PROJECT_NAME}*.${im} | wc -l)
|
no_of_files=$(ls -afq build/${PROJECT_NAME}*.${im} | wc -l)
|
||||||
if (( no_of_files > 0 )); then
|
if (( no_of_files > 0 )); then
|
||||||
mv "build/${PROJECT_NAME}*.${im}" "${CURR_DIR}/"
|
# shellcheck disable=SC2086
|
||||||
sudo chown "${CURR_USER}":"${CURR_USER}" "${CURR_DIR}/*.${im}"
|
mv build/${PROJECT_NAME}*.${im} ${CURR_DIR}/
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
sudo chown "${CURR_USER}":"${CURR_USER}" ${CURR_DIR}/*.${im}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -1798,7 +1798,8 @@ function image_setup_utils {
|
||||||
echo 'Go binary not installed'
|
echo 'Go binary not installed'
|
||||||
exit 763562
|
exit 763562
|
||||||
fi
|
fi
|
||||||
mv "${rootdir}/home/go/go" "${rootdir}/home/go/go${GO_VERSION}"
|
# shellcheck disable=SC2086
|
||||||
|
mv ${rootdir}/home/go/go ${rootdir}/home/go/go${GO_VERSION}
|
||||||
echo "export GOROOT=/home/go" >> "${rootdir}/root/.bashrc"
|
echo "export GOROOT=/home/go" >> "${rootdir}/root/.bashrc"
|
||||||
echo "export GOROOT=/home/go" >> "${rootdir}/etc/skel/.bashrc"
|
echo "export GOROOT=/home/go" >> "${rootdir}/etc/skel/.bashrc"
|
||||||
echo "export GOROOT=/home/go" >> "${rootdir}/home/go/.bashrc"
|
echo "export GOROOT=/home/go" >> "${rootdir}/home/go/.bashrc"
|
||||||
|
|
|
@ -125,7 +125,8 @@ function new_blog {
|
||||||
|
|
||||||
# move to the content directory
|
# move to the content directory
|
||||||
CURRENT_INDEX=$(cat "$CURRENT_BLOG_INDEX")
|
CURRENT_INDEX=$(cat "$CURRENT_BLOG_INDEX")
|
||||||
mv ~/.new-blog-entry "$BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md"
|
# shellcheck disable=SC2086
|
||||||
|
mv ~/.new-blog-entry $BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md
|
||||||
|
|
||||||
# increment the index
|
# increment the index
|
||||||
CURRENT_INDEX=$((CURRENT_INDEX + 1))
|
CURRENT_INDEX=$((CURRENT_INDEX + 1))
|
||||||
|
|
|
@ -876,7 +876,8 @@ function restore_personal_settings {
|
||||||
rm -rf "/home/$USERNAME/personal"
|
rm -rf "/home/$USERNAME/personal"
|
||||||
fi
|
fi
|
||||||
if [ -d "$temp_restore_dir/home/$USERNAME/personal" ]; then
|
if [ -d "$temp_restore_dir/home/$USERNAME/personal" ]; then
|
||||||
mv "$temp_restore_dir/home/$USERNAME/personal" "/home/$USERNAME"
|
# shellcheck disable=SC2086
|
||||||
|
mv $temp_restore_dir/home/$USERNAME/personal /home/$USERNAME
|
||||||
else
|
else
|
||||||
if [ ! -d "/home/$USERNAME/personal" ]; then
|
if [ ! -d "/home/$USERNAME/personal" ]; then
|
||||||
mkdir "/home/$USERNAME/personal"
|
mkdir "/home/$USERNAME/personal"
|
||||||
|
|
|
@ -792,7 +792,8 @@ function restore_personal_settings {
|
||||||
if [ -d "/home/$USERNAME/personal" ]; then
|
if [ -d "/home/$USERNAME/personal" ]; then
|
||||||
rm -rf "/home/$USERNAME/personal"
|
rm -rf "/home/$USERNAME/personal"
|
||||||
fi
|
fi
|
||||||
mv "$temp_restore_dir/home/$USERNAME/personal" "/home/$USERNAME"
|
# shellcheck disable=SC2086
|
||||||
|
mv $temp_restore_dir/home/$USERNAME/personal /home/$USERNAME
|
||||||
else
|
else
|
||||||
if [ ! -d "/home/$USERNAME/personal" ]; then
|
if [ ! -d "/home/$USERNAME/personal" ]; then
|
||||||
mkdir "/home/$USERNAME/personal"
|
mkdir "/home/$USERNAME/personal"
|
||||||
|
|
|
@ -653,7 +653,8 @@ function restore_database_from_friend {
|
||||||
if [ -d "$restore_from_dir" ]; then
|
if [ -d "$restore_from_dir" ]; then
|
||||||
if [ -d "/root/temp${1}/${RESTORE_SUBDIR}/www/${2}/htdocs" ]; then
|
if [ -d "/root/temp${1}/${RESTORE_SUBDIR}/www/${2}/htdocs" ]; then
|
||||||
rm -rf "/var/www/${2}/htdocs"
|
rm -rf "/var/www/${2}/htdocs"
|
||||||
mv "$restore_from_dir" "/var/www/${2}/"
|
# shellcheck disable=SC2086
|
||||||
|
mv $restore_from_dir /var/www/${2}/
|
||||||
else
|
else
|
||||||
cp -r "$restore_from_dir/"* "/var/www/${2}/htdocs/"
|
cp -r "$restore_from_dir/"* "/var/www/${2}/htdocs/"
|
||||||
fi
|
fi
|
||||||
|
@ -766,7 +767,8 @@ function restore_database {
|
||||||
if [ -d "$restore_from_dir" ]; then
|
if [ -d "$restore_from_dir" ]; then
|
||||||
if [ -d "/root/temp${restore_app_name}/${RESTORE_SUBDIR}/www/${restore_app_domain}/htdocs" ]; then
|
if [ -d "/root/temp${restore_app_name}/${RESTORE_SUBDIR}/www/${restore_app_domain}/htdocs" ]; then
|
||||||
rm -rf "/var/www/${restore_app_domain}/htdocs"
|
rm -rf "/var/www/${restore_app_domain}/htdocs"
|
||||||
mv "$restore_from_dir" "/var/www/${restore_app_domain}/"
|
# shellcheck disable=SC2086
|
||||||
|
mv $restore_from_dir /var/www/${restore_app_domain}/
|
||||||
else
|
else
|
||||||
cp -r "$restore_from_dir/"* "/var/www/${restore_app_domain}/htdocs/"
|
cp -r "$restore_from_dir/"* "/var/www/${restore_app_domain}/htdocs/"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -367,7 +367,8 @@ function install_pleroma_front_end {
|
||||||
sed -i 's|index index.php;|index index.html;|g' "$nginx_site"
|
sed -i 's|index index.php;|index index.html;|g' "$nginx_site"
|
||||||
|
|
||||||
if [ -f "/var/www/${pleroma_domain}/htdocs/index.php" ]; then
|
if [ -f "/var/www/${pleroma_domain}/htdocs/index.php" ]; then
|
||||||
mv "/var/www/${pleroma_domain}/htdocs/index.php" "/var/www/${pleroma_domain}/htdocs/index_qvitter.php"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/${pleroma_domain}/htdocs/index.php /var/www/${pleroma_domain}/htdocs/index_qvitter.php
|
||||||
fi
|
fi
|
||||||
sed -i 's|index.php|index_qvitter.php|g' "$nginx_site"
|
sed -i 's|index.php|index_qvitter.php|g' "$nginx_site"
|
||||||
|
|
||||||
|
@ -414,7 +415,8 @@ function upgrade_pleroma_frontend {
|
||||||
fi
|
fi
|
||||||
cp -r "$INSTALL_DIR/pleroma/dist/"* "$basedir/"
|
cp -r "$INSTALL_DIR/pleroma/dist/"* "$basedir/"
|
||||||
if [ -f "$basedir/static/config.json.old" ]; then
|
if [ -f "$basedir/static/config.json.old" ]; then
|
||||||
mv "$basedir/static/config.json.old" "$basedir/static/config.json"
|
# shellcheck disable=SC2086
|
||||||
|
mv $basedir/static/config.json.old $basedir/static/config.json
|
||||||
fi
|
fi
|
||||||
sed -i "s|\"name\":.*|\"name\": \"${title}\",|g" "$basedir/static/config.json"
|
sed -i "s|\"name\":.*|\"name\": \"${title}\",|g" "$basedir/static/config.json"
|
||||||
if [ -f "$basedir/static/logo.png.old" ]; then
|
if [ -f "$basedir/static/logo.png.old" ]; then
|
||||||
|
@ -425,7 +427,8 @@ function upgrade_pleroma_frontend {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$basedir/index.php" ]; then
|
if [ -f "$basedir/index.php" ]; then
|
||||||
mv "$basedir/index.php" "$basedir/index_qvitter.php"
|
# shellcheck disable=SC2086
|
||||||
|
mv $basedir/index.php $basedir/index_qvitter.php
|
||||||
fi
|
fi
|
||||||
chown -R www-data:www-data "$basedir"
|
chown -R www-data:www-data "$basedir"
|
||||||
else
|
else
|
||||||
|
@ -740,7 +743,8 @@ function gnusocial_use_classic {
|
||||||
domain_name=$(get_completion_param "$database_name domain")
|
domain_name=$(get_completion_param "$database_name domain")
|
||||||
|
|
||||||
if [ -f "/var/www/$domain_name/htdocs/index_qvitter.php" ]; then
|
if [ -f "/var/www/$domain_name/htdocs/index_qvitter.php" ]; then
|
||||||
mv "/var/www/$domain_name/htdocs/index_qvitter.php" "/var/www/$domain_name/htdocs/index.php"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/$domain_name/htdocs/index_qvitter.php /var/www/$domain_name/htdocs/index.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "/etc/nginx/sites-available/$domain_name" ]; then
|
if [ -f "/etc/nginx/sites-available/$domain_name" ]; then
|
||||||
|
@ -763,7 +767,8 @@ function gnusocial_use_qvitter {
|
||||||
domain_name=$(get_completion_param "$database_name domain")
|
domain_name=$(get_completion_param "$database_name domain")
|
||||||
|
|
||||||
if [ -f "/var/www/$domain_name/htdocs/index_qvitter.php" ]; then
|
if [ -f "/var/www/$domain_name/htdocs/index_qvitter.php" ]; then
|
||||||
mv "/var/www/$domain_name/htdocs/index_qvitter.php" "/var/www/$domain_name/htdocs/index.php"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/$domain_name/htdocs/index_qvitter.php /var/www/$domain_name/htdocs/index.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "/etc/nginx/sites-available/$domain_name" ]; then
|
if [ -f "/etc/nginx/sites-available/$domain_name" ]; then
|
||||||
|
@ -793,7 +798,8 @@ function gnusocial_use_pleroma {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "/var/www/$domain_name/htdocs/index.php" ]; then
|
if [ -f "/var/www/$domain_name/htdocs/index.php" ]; then
|
||||||
mv "/var/www/$domain_name/htdocs/index.php" "/var/www/$domain_name/htdocs/index_qvitter.php"
|
# shellcheck disable=SC2086
|
||||||
|
mv /var/www/$domain_name/htdocs/index.php /var/www/$domain_name/htdocs/index_qvitter.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "/etc/nginx/sites-available/$domain_name" ]; then
|
if [ -f "/etc/nginx/sites-available/$domain_name" ]; then
|
||||||
|
|
|
@ -93,7 +93,8 @@ function install_onerng {
|
||||||
# Download the package
|
# Download the package
|
||||||
if [ ! -f $ONERNG_PACKAGE ]; then
|
if [ ! -f $ONERNG_PACKAGE ]; then
|
||||||
wget "$ONERNG_PACKAGE_DOWNLOAD"
|
wget "$ONERNG_PACKAGE_DOWNLOAD"
|
||||||
mv "$ONERNG_PACKAGE?raw=true" $ONERNG_PACKAGE
|
# shellcheck disable=SC2086
|
||||||
|
mv $ONERNG_PACKAGE?raw=true $ONERNG_PACKAGE
|
||||||
fi
|
fi
|
||||||
if [ ! -f $ONERNG_PACKAGE ]; then
|
if [ ! -f $ONERNG_PACKAGE ]; then
|
||||||
echo $"OneRNG package could not be downloaded"
|
echo $"OneRNG package could not be downloaded"
|
||||||
|
|
Loading…
Reference in New Issue