diff --git a/src/freedombone-addcert b/src/freedombone-addcert index ffcd9709..5579fb7e 100755 --- a/src/freedombone-addcert +++ b/src/freedombone-addcert @@ -245,10 +245,12 @@ function add_cert_letsencrypt { # replace some legacy filenames 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 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 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" @@ -256,7 +258,8 @@ function add_cert_letsencrypt { # link the private key if [ -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key" ]; 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 rm -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key" fi @@ -269,7 +272,8 @@ function add_cert_letsencrypt { # link the public key if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem" ]; 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 rm -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem" fi diff --git a/src/freedombone-app-etherpad b/src/freedombone-app-etherpad index 330de307..033ab528 100755 --- a/src/freedombone-app-etherpad +++ b/src/freedombone-app-etherpad @@ -607,7 +607,8 @@ function install_etherpad { create_site_certificate "$ETHERPAD_DOMAIN_NAME" 'yes' 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 if [ -f "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem" ]; then chown etherpad: "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem" diff --git a/src/freedombone-app-friendica b/src/freedombone-app-friendica index a40f0e5c..1f87a3e1 100755 --- a/src/freedombone-app-friendica +++ b/src/freedombone-app-friendica @@ -380,7 +380,8 @@ function install_friendica { set_completion_param "friendica commit" "$FRIENDICA_COMMIT" rm -rf "$FRIENDICA_PATH" - mv friendica "$FRIENDICA_PATH" + # shellcheck disable=SC2086 + mv friendica $FRIENDICA_PATH git_clone "$FRIENDICA_ADDONS_REPO" "$FRIENDICA_PATH/addon" cd "$FRIENDICA_PATH/addon" || exit 34835685 diff --git a/src/freedombone-app-gnusocial b/src/freedombone-app-gnusocial index e85d4e72..7ce948d7 100755 --- a/src/freedombone-app-gnusocial +++ b/src/freedombone-app-gnusocial @@ -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.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 diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index f6f9848b..1d08c575 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -166,7 +166,8 @@ function upgrade_gogs { rm -rf "$INSTALL_DIR/gogs-repositories" fi 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 gogs_parameters @@ -221,7 +222,8 @@ function upgrade_gogs { rm -rf /home/${GOGS_USERNAME}/gogs-repositories fi 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 chown -R "${GOGS_USERNAME}":"${GOGS_USERNAME}" "/home/${GOGS_USERNAME}" @@ -351,6 +353,7 @@ function backup_remote_gogs { echo $"Obtaining Gogs repos backup" + # shellcheck disable=SC2086 mv /home/$GOGS_USERNAME/gogs-repositories/*.git /home/$GOGS_USERNAME/gogs-repositories/bob backup_directory_to_friend /home/$GOGS_USERNAME/gogs-repositories gogsrepos diff --git a/src/freedombone-app-htmly b/src/freedombone-app-htmly index cb75f04a..c4b77968 100755 --- a/src/freedombone-app-htmly +++ b/src/freedombone-app-htmly @@ -247,7 +247,8 @@ function restore_local_htmly { if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then rm -rf "/var/www/${HTMLY_DOMAIN_NAME}/previous" 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 if [ -d "${temp_restore_dir}/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then temp_source_dir=$(find ${temp_restore_dir} -name htdocs) @@ -261,7 +262,8 @@ function restore_local_htmly { # shellcheck disable=SC2181 if [ ! "$?" = "0" ]; 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 set_user_permissions backup_unmount_drive @@ -283,7 +285,8 @@ function restore_local_htmly { USERNAME=$(echo "$d" | awk -F '/' '{print $3}') if [[ $(is_valid_user "$USERNAME") == "1" ]]; 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 done @@ -321,7 +324,8 @@ function restore_remote_htmly { if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then rm -rf "/var/www/${HTMLY_DOMAIN_NAME}/previous" 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 if [ -d "${temp_restore_dir}/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then @@ -337,7 +341,8 @@ function restore_remote_htmly { # shellcheck disable=SC2181 if [ ! "$?" = "0" ]; 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 exit 593 fi @@ -354,7 +359,8 @@ function restore_remote_htmly { USERNAME=$(echo "$d" | awk -F '/' '{print $3}') if [[ $(is_valid_user "$USERNAME") == "1" ]]; 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 done diff --git a/src/freedombone-app-icecast b/src/freedombone-app-icecast index 56aa8cbb..135471a9 100755 --- a/src/freedombone-app-icecast +++ b/src/freedombone-app-icecast @@ -213,7 +213,8 @@ function icecast_import_from_directory { fi 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_add_file_to_playlist "$ICECAST_DIR/$dest_dir" diff --git a/src/freedombone-app-koel b/src/freedombone-app-koel index 8fb8d0ab..d4664832 100755 --- a/src/freedombone-app-koel +++ b/src/freedombone-app-koel @@ -206,7 +206,8 @@ function koel_import_from_directory { 255) return;; esac - mv "$selected_dir" /music + # shellcheck disable=SC2086 + mv $selected_dir /music dialog --title $"Import music directory" \ --msgbox $"Import success. You may need to re-sync within Koel." 6 40 diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index fe3b1440..5f7ac49b 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -272,7 +272,8 @@ function matrix_configure_homeserver_yaml { print; }' "${filepath}" > "${ymltemp}" - mv "${ymltemp}" "${filepath}" + # shellcheck disable=SC2086 + mv ${ymltemp} ${filepath} if [[ $ONION_ONLY == "no" ]]; then sed -i "s|tls_certificate_path:.*|tls_certificate_path: \"/etc/ssl/certs/${MATRIX_DOMAIN_NAME}.pem\"|g" "${filepath}" diff --git a/src/freedombone-app-nextcloud b/src/freedombone-app-nextcloud index 719b9555..b2516b40 100755 --- a/src/freedombone-app-nextcloud +++ b/src/freedombone-app-nextcloud @@ -692,7 +692,8 @@ function install_nextcloud_main { systemctl restart mariadb # 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" set_completion_param "nextcloud domain" "$NEXTCLOUD_DOMAIN_NAME" diff --git a/src/freedombone-app-pelican b/src/freedombone-app-pelican index 9c053c1a..a27b72d6 100755 --- a/src/freedombone-app-pelican +++ b/src/freedombone-app-pelican @@ -222,7 +222,8 @@ function pelican_new_blog { # move to the content directory 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 CURRENT_INDEX=$((CURRENT_INDEX + 1)) diff --git a/src/freedombone-app-postactiv b/src/freedombone-app-postactiv index 2252e5db..9c9b9d61 100755 --- a/src/freedombone-app-postactiv +++ b/src/freedombone-app-postactiv @@ -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.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 diff --git a/src/freedombone-app-tahoelafs b/src/freedombone-app-tahoelafs index fb96aa19..a73edf10 100755 --- a/src/freedombone-app-tahoelafs +++ b/src/freedombone-app-tahoelafs @@ -355,7 +355,8 @@ function restore_remote_tahoelafs { # shellcheck disable=SC2181 if [ ! "$?" = "0" ]; then if [ -d "${TAHOE_DIR}-old" ]; then - mv "${TAHOE_DIR}-old" $TAHOE_DIR + # shellcheck disable=SC2086 + mv ${TAHOE_DIR}-old $TAHOE_DIR fi exit 623925 fi diff --git a/src/freedombone-client b/src/freedombone-client index 88ca7ad0..f7f3e4ce 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -107,7 +107,8 @@ function refresh_gpg_keys { function ssh_remove_small_moduli { # shellcheck disable=SC2024 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 { diff --git a/src/freedombone-clientcert b/src/freedombone-clientcert index 7473bf49..3c21456f 100755 --- a/src/freedombone-clientcert +++ b/src/freedombone-clientcert @@ -137,11 +137,14 @@ fi # move the cert to the user's home 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/ca-$HOSTNAME.crt" "/home/$USERNAME/emailcert" -mv "/etc/ssl/private/$USERNAME.key" "/home/$USERNAME/emailcert" -mv "/etc/ssl/certs/$USERNAME.crt" "/home/$USERNAME/emailcert" +# shellcheck disable=SC2086 +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" \ -out "/home/$USERNAME/emailcert/$USERNAME.p12" \ -inkey "/home/$USERNAME/emailcert/$USERNAME.key" \ diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 904df570..07ec5692 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -1343,8 +1343,10 @@ function reset_tripwire { fi if [ ! -f "/etc/tripwire/${HOSTNAME}-local.key" ]; then if [ -f "/etc/tripwire/${PROJECT_NAME}-local.key" ]; then - mv "/etc/tripwire/${PROJECT_NAME}-local.key" "/etc/tripwire/${HOSTNAME}-local.key" - mv "/etc/tripwire/${PROJECT_NAME}-site.key" "/etc/tripwire/${HOSTNAME}-site.key" + # shellcheck disable=SC2086 + 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 echo $'Error: missing local key' any_key diff --git a/src/freedombone-image b/src/freedombone-image index b7bae036..034a4c6f 100755 --- a/src/freedombone-image +++ b/src/freedombone-image @@ -490,7 +490,8 @@ do if [ ! -d "${CURR_DIR}/build" ]; then mkdir "${CURR_DIR}/build" 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 done @@ -628,8 +629,10 @@ do # shellcheck disable=SC2012,SC2086 no_of_files=$(ls -afq build/${PROJECT_NAME}*.${im} | wc -l) if (( no_of_files > 0 )); then - mv "build/${PROJECT_NAME}*.${im}" "${CURR_DIR}/" - sudo chown "${CURR_USER}":"${CURR_USER}" "${CURR_DIR}/*.${im}" + # shellcheck disable=SC2086 + mv build/${PROJECT_NAME}*.${im} ${CURR_DIR}/ + # shellcheck disable=SC2086 + sudo chown "${CURR_USER}":"${CURR_USER}" ${CURR_DIR}/*.${im} fi done diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 62fd9eb1..100bf5a5 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -1798,7 +1798,8 @@ function image_setup_utils { echo 'Go binary not installed' exit 763562 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}/etc/skel/.bashrc" echo "export GOROOT=/home/go" >> "${rootdir}/home/go/.bashrc" diff --git a/src/freedombone-mesh-blog b/src/freedombone-mesh-blog index 052bc799..46a967db 100755 --- a/src/freedombone-mesh-blog +++ b/src/freedombone-mesh-blog @@ -125,7 +125,8 @@ function new_blog { # move to the content directory 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 CURRENT_INDEX=$((CURRENT_INDEX + 1)) diff --git a/src/freedombone-restore-local b/src/freedombone-restore-local index 78b0f600..993b30ae 100755 --- a/src/freedombone-restore-local +++ b/src/freedombone-restore-local @@ -876,7 +876,8 @@ function restore_personal_settings { rm -rf "/home/$USERNAME/personal" fi 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 if [ ! -d "/home/$USERNAME/personal" ]; then mkdir "/home/$USERNAME/personal" diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote index 9ec9ce8d..9017e288 100755 --- a/src/freedombone-restore-remote +++ b/src/freedombone-restore-remote @@ -792,7 +792,8 @@ function restore_personal_settings { if [ -d "/home/$USERNAME/personal" ]; then rm -rf "/home/$USERNAME/personal" fi - mv "$temp_restore_dir/home/$USERNAME/personal" "/home/$USERNAME" + # shellcheck disable=SC2086 + mv $temp_restore_dir/home/$USERNAME/personal /home/$USERNAME else if [ ! -d "/home/$USERNAME/personal" ]; then mkdir "/home/$USERNAME/personal" diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index 3e904c79..77fa3fc0 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -653,7 +653,8 @@ function restore_database_from_friend { if [ -d "$restore_from_dir" ]; then if [ -d "/root/temp${1}/${RESTORE_SUBDIR}/www/${2}/htdocs" ]; then rm -rf "/var/www/${2}/htdocs" - mv "$restore_from_dir" "/var/www/${2}/" + # shellcheck disable=SC2086 + mv $restore_from_dir /var/www/${2}/ else cp -r "$restore_from_dir/"* "/var/www/${2}/htdocs/" fi @@ -766,7 +767,8 @@ function restore_database { if [ -d "$restore_from_dir" ]; then if [ -d "/root/temp${restore_app_name}/${RESTORE_SUBDIR}/www/${restore_app_domain}/htdocs" ]; then 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 cp -r "$restore_from_dir/"* "/var/www/${restore_app_domain}/htdocs/" fi diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index e7ec8148..c6791d46 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -367,7 +367,8 @@ function install_pleroma_front_end { sed -i 's|index index.php;|index index.html;|g' "$nginx_site" 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 sed -i 's|index.php|index_qvitter.php|g' "$nginx_site" @@ -414,7 +415,8 @@ function upgrade_pleroma_frontend { fi cp -r "$INSTALL_DIR/pleroma/dist/"* "$basedir/" 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 sed -i "s|\"name\":.*|\"name\": \"${title}\",|g" "$basedir/static/config.json" if [ -f "$basedir/static/logo.png.old" ]; then @@ -425,7 +427,8 @@ function upgrade_pleroma_frontend { fi 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 chown -R www-data:www-data "$basedir" else @@ -740,7 +743,8 @@ function gnusocial_use_classic { domain_name=$(get_completion_param "$database_name domain") 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 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") 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 if [ -f "/etc/nginx/sites-available/$domain_name" ]; then @@ -793,7 +798,8 @@ function gnusocial_use_pleroma { fi 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 if [ -f "/etc/nginx/sites-available/$domain_name" ]; then diff --git a/src/freedombone-utils-rng b/src/freedombone-utils-rng index 0c31378a..5fbab28a 100755 --- a/src/freedombone-utils-rng +++ b/src/freedombone-utils-rng @@ -93,7 +93,8 @@ function install_onerng { # Download the package if [ ! -f $ONERNG_PACKAGE ]; then wget "$ONERNG_PACKAGE_DOWNLOAD" - mv "$ONERNG_PACKAGE?raw=true" $ONERNG_PACKAGE + # shellcheck disable=SC2086 + mv $ONERNG_PACKAGE?raw=true $ONERNG_PACKAGE fi if [ ! -f $ONERNG_PACKAGE ]; then echo $"OneRNG package could not be downloaded"