Browse Source

Moves without quotes

This seems to cause problems when building images
Bob Mottram 7 years ago
parent
commit
057fcfaa6f

+ 8
- 4
src/freedombone-addcert View File

@@ -245,10 +245,12 @@ function add_cert_letsencrypt {
245 245
 
246 246
     # replace some legacy filenames
247 247
     if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt" ]; then
248
-        mv "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt" "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem"
248
+        # shellcheck disable=SC2086
249
+        mv /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem
249 250
     fi
250 251
     if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt" ]; then
251
-        mv "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt" "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem"
252
+        # shellcheck disable=SC2086
253
+        mv /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem
252 254
     fi
253 255
     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"
254 256
     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 {
256 258
     # link the private key
257 259
     if [ -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key" ]; then
258 260
         if [ ! -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key.old" ]; then
259
-            mv "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key" "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key.old"
261
+            # shellcheck disable=SC2086
262
+            mv /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key.old
260 263
         else
261 264
             rm -f "/etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key"
262 265
         fi
@@ -269,7 +272,8 @@ function add_cert_letsencrypt {
269 272
     # link the public key
270 273
     if [ -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem" ]; then
271 274
         if [ ! -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem.old" ]; then
272
-            mv "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem" "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem.old"
275
+            # shellcheck disable=SC2086
276
+            mv /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem.old
273 277
         else
274 278
             rm -f "/etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem"
275 279
         fi

+ 2
- 1
src/freedombone-app-etherpad View File

@@ -607,7 +607,8 @@ function install_etherpad {
607 607
     create_site_certificate "$ETHERPAD_DOMAIN_NAME" 'yes'
608 608
 
609 609
     if [ -f "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.crt" ]; then
610
-        mv "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.crt" "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem"
610
+        # shellcheck disable=SC2086
611
+        mv /etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.crt /etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem
611 612
     fi
612 613
     if [ -f "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem" ]; then
613 614
         chown etherpad: "/etc/ssl/certs/${ETHERPAD_DOMAIN_NAME}.pem"

+ 2
- 1
src/freedombone-app-friendica View File

@@ -380,7 +380,8 @@ function install_friendica {
380 380
         set_completion_param "friendica commit" "$FRIENDICA_COMMIT"
381 381
 
382 382
         rm -rf "$FRIENDICA_PATH"
383
-        mv friendica "$FRIENDICA_PATH"
383
+        # shellcheck disable=SC2086
384
+        mv friendica $FRIENDICA_PATH
384 385
 
385 386
         git_clone "$FRIENDICA_ADDONS_REPO" "$FRIENDICA_PATH/addon"
386 387
         cd "$FRIENDICA_PATH/addon" || exit 34835685

+ 2
- 1
src/freedombone-app-gnusocial View File

@@ -360,7 +360,8 @@ function upgrade_gnusocial {
360 360
 
361 361
     if [ -f "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php" ]; then
362 362
         if [ -f "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php" ]; then
363
-            mv "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php" "/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php"
363
+            # shellcheck disable=SC2086
364
+            mv /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php
364 365
         fi
365 366
     fi
366 367
 

+ 5
- 2
src/freedombone-app-gogs View File

@@ -166,7 +166,8 @@ function upgrade_gogs {
166 166
         rm -rf "$INSTALL_DIR/gogs-repositories"
167 167
     fi
168 168
     if [ -d /home/${GOGS_USERNAME}/gogs-repositories ]; then
169
-        mv "/home/${GOGS_USERNAME}/gogs-repositories" "$INSTALL_DIR"
169
+        # shellcheck disable=SC2086
170
+        mv /home/${GOGS_USERNAME}/gogs-repositories $INSTALL_DIR
170 171
     fi
171 172
 
172 173
     gogs_parameters
@@ -221,7 +222,8 @@ function upgrade_gogs {
221 222
         rm -rf /home/${GOGS_USERNAME}/gogs-repositories
222 223
     fi
223 224
     if [ -d "$INSTALL_DIR/gogs-repositories" ]; then
224
-        mv "$INSTALL_DIR/gogs-repositories" "/home/${GOGS_USERNAME}/gogs-repositories"
225
+        # shellcheck disable=SC2086
226
+        mv $INSTALL_DIR/gogs-repositories /home/${GOGS_USERNAME}/gogs-repositories
225 227
     fi
226 228
     chown -R "${GOGS_USERNAME}":"${GOGS_USERNAME}" "/home/${GOGS_USERNAME}"
227 229
 
@@ -351,6 +353,7 @@ function backup_remote_gogs {
351 353
 
352 354
         echo $"Obtaining Gogs repos backup"
353 355
 
356
+        # shellcheck disable=SC2086
354 357
         mv /home/$GOGS_USERNAME/gogs-repositories/*.git /home/$GOGS_USERNAME/gogs-repositories/bob
355 358
         backup_directory_to_friend /home/$GOGS_USERNAME/gogs-repositories gogsrepos
356 359
 

+ 12
- 6
src/freedombone-app-htmly View File

@@ -247,7 +247,8 @@ function restore_local_htmly {
247 247
             if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
248 248
                 rm -rf "/var/www/${HTMLY_DOMAIN_NAME}/previous"
249 249
             fi
250
-            mv "/var/www/${HTMLY_DOMAIN_NAME}/htdocs" "/var/www/${HTMLY_DOMAIN_NAME}/previous"
250
+            # shellcheck disable=SC2086
251
+            mv /var/www/${HTMLY_DOMAIN_NAME}/htdocs /var/www/${HTMLY_DOMAIN_NAME}/previous
251 252
         fi
252 253
         if [ -d "${temp_restore_dir}/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then
253 254
             temp_source_dir=$(find ${temp_restore_dir} -name htdocs)
@@ -261,7 +262,8 @@ function restore_local_htmly {
261 262
         # shellcheck disable=SC2181
262 263
         if [ ! "$?" = "0" ]; then
263 264
             if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
264
-                mv "/var/www/${HTMLY_DOMAIN_NAME}/previous" "/var/www/${HTMLY_DOMAIN_NAME}/htdocs"
265
+                # shellcheck disable=SC2086
266
+                mv /var/www/${HTMLY_DOMAIN_NAME}/previous /var/www/${HTMLY_DOMAIN_NAME}/htdocs
265 267
             fi
266 268
             set_user_permissions
267 269
             backup_unmount_drive
@@ -283,7 +285,8 @@ function restore_local_htmly {
283 285
             USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
284 286
             if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
285 287
                 if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post" ]; then
286
-                    mv "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/"*.md "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post"
288
+                    # shellcheck disable=SC2086
289
+                    mv /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/*.md /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post
287 290
                 fi
288 291
             fi
289 292
         done
@@ -321,7 +324,8 @@ function restore_remote_htmly {
321 324
             if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
322 325
                 rm -rf "/var/www/${HTMLY_DOMAIN_NAME}/previous"
323 326
             fi
324
-            mv "/var/www/${HTMLY_DOMAIN_NAME}/htdocs" "/var/www/${HTMLY_DOMAIN_NAME}/previous"
327
+            # shellcheck disable=SC2086
328
+            mv /var/www/${HTMLY_DOMAIN_NAME}/htdocs /var/www/${HTMLY_DOMAIN_NAME}/previous
325 329
         fi
326 330
 
327 331
         if [ -d "${temp_restore_dir}/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then
@@ -337,7 +341,8 @@ function restore_remote_htmly {
337 341
         # shellcheck disable=SC2181
338 342
         if [ ! "$?" = "0" ]; then
339 343
             if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/previous" ]; then
340
-                mv "/var/www/${HTMLY_DOMAIN_NAME}/previous" "/var/www/${HTMLY_DOMAIN_NAME}/htdocs"
344
+                # shellcheck disable=SC2086
345
+                mv /var/www/${HTMLY_DOMAIN_NAME}/previous /var/www/${HTMLY_DOMAIN_NAME}/htdocs
341 346
             fi
342 347
             exit 593
343 348
         fi
@@ -354,7 +359,8 @@ function restore_remote_htmly {
354 359
             USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
355 360
             if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
356 361
                 if [ -d "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post" ]; then
357
-                    mv "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/"*.md "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post"
362
+                    # shellcheck disable=SC2086
363
+                    mv /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/*.md /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content/$USERNAME/htmly/uncategorized/post
358 364
                 fi
359 365
             fi
360 366
         done

+ 2
- 1
src/freedombone-app-icecast View File

@@ -213,7 +213,8 @@ function icecast_import_from_directory {
213 213
     fi
214 214
 
215 215
     dest_dir=$(basename "$selected_dir")
216
-    mv "$selected_dir" $ICECAST_DIR
216
+    # shellcheck disable=SC2086
217
+    mv $selected_dir $ICECAST_DIR
217 218
 
218 219
     icecast_convert_files "$ICECAST_DIR/$dest_dir"
219 220
     icecast_add_file_to_playlist "$ICECAST_DIR/$dest_dir"

+ 2
- 1
src/freedombone-app-koel View File

@@ -206,7 +206,8 @@ function koel_import_from_directory {
206 206
         255) return;;
207 207
     esac
208 208
 
209
-    mv "$selected_dir" /music
209
+    # shellcheck disable=SC2086
210
+    mv $selected_dir /music
210 211
 
211 212
     dialog --title $"Import music directory" \
212 213
            --msgbox $"Import success. You may need to re-sync within Koel." 6 40

+ 2
- 1
src/freedombone-app-matrix View File

@@ -272,7 +272,8 @@ function matrix_configure_homeserver_yaml {
272 272
         print;
273 273
         }' "${filepath}" > "${ymltemp}"
274 274
 
275
-    mv "${ymltemp}" "${filepath}"
275
+    # shellcheck disable=SC2086
276
+    mv ${ymltemp} ${filepath}
276 277
 
277 278
     if [[ $ONION_ONLY == "no" ]]; then
278 279
         sed -i "s|tls_certificate_path:.*|tls_certificate_path: \"/etc/ssl/certs/${MATRIX_DOMAIN_NAME}.pem\"|g" "${filepath}"

+ 2
- 1
src/freedombone-app-nextcloud View File

@@ -692,7 +692,8 @@ function install_nextcloud_main {
692 692
     systemctl restart mariadb
693 693
 
694 694
     # move the data directory
695
-    mv "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/data" "/var/www/${NEXTCLOUD_DOMAIN_NAME}/"
695
+    # shellcheck disable=SC2086
696
+    mv /var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/data /var/www/${NEXTCLOUD_DOMAIN_NAME}/
696 697
     sed -i "s|'datadirectory'.*|'datadirectory' => '/var/www/$NEXTCLOUD_DOMAIN_NAME/data',|g" "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php"
697 698
 
698 699
     set_completion_param "nextcloud domain" "$NEXTCLOUD_DOMAIN_NAME"

+ 2
- 1
src/freedombone-app-pelican View File

@@ -222,7 +222,8 @@ function pelican_new_blog {
222 222
 
223 223
     # move to the content directory
224 224
     CURRENT_INDEX=$(cat $PELICAN_CURRENT_BLOG_INDEX)
225
-    mv "$PELICAN_BLOG_INSTALL_DIR/.new-blog-entry" "$BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md"
225
+    # shellcheck disable=SC2086
226
+    mv $PELICAN_BLOG_INSTALL_DIR/.new-blog-entry $BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md
226 227
 
227 228
     # increment the index
228 229
     CURRENT_INDEX=$((CURRENT_INDEX + 1))

+ 2
- 1
src/freedombone-app-postactiv View File

@@ -373,7 +373,8 @@ function upgrade_postactiv {
373 373
 
374 374
     if [ -f "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php" ]; then
375 375
         if [ -f "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php" ]; then
376
-            mv "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php" "/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php"
376
+            # shellcheck disable=SC2086
377
+            mv /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php
377 378
         fi
378 379
     fi
379 380
 

+ 2
- 1
src/freedombone-app-tahoelafs View File

@@ -355,7 +355,8 @@ function restore_remote_tahoelafs {
355 355
     # shellcheck disable=SC2181
356 356
     if [ ! "$?" = "0" ]; then
357 357
         if [ -d "${TAHOE_DIR}-old" ]; then
358
-            mv "${TAHOE_DIR}-old" $TAHOE_DIR
358
+            # shellcheck disable=SC2086
359
+            mv ${TAHOE_DIR}-old $TAHOE_DIR
359 360
         fi
360 361
         exit 623925
361 362
     fi

+ 2
- 1
src/freedombone-client View File

@@ -107,7 +107,8 @@ function refresh_gpg_keys {
107 107
 function ssh_remove_small_moduli {
108 108
     # shellcheck disable=SC2024
109 109
     sudo awk '$5 > 2000' /etc/ssh/moduli > "/home/$CURR_USER/moduli"
110
-    sudo mv "/home/$CURR_USER/moduli" /etc/ssh/moduli
110
+    # shellcheck disable=SC2086
111
+    sudo mv /home/$CURR_USER/moduli /etc/ssh/moduli
111 112
 }
112 113
 
113 114
 function configure_ssh_client {

+ 6
- 3
src/freedombone-clientcert View File

@@ -137,11 +137,14 @@ fi
137 137
 
138 138
 # move the cert to the user's home
139 139
 mkdir "/home/$USERNAME/emailcert"
140
-mv "/etc/ssl/certs/$USERNAME.cer" "/home/$USERNAME/emailcert"
140
+# shellcheck disable=SC2086
141
+mv /etc/ssl/certs/$USERNAME.cer /home/$USERNAME/emailcert
141 142
 cp "/etc/ssl/certs/dovecot.crt" "/home/$USERNAME/emailcert"
142 143
 cp "/etc/ssl/certs/ca-$HOSTNAME.crt" "/home/$USERNAME/emailcert"
143
-mv "/etc/ssl/private/$USERNAME.key" "/home/$USERNAME/emailcert"
144
-mv "/etc/ssl/certs/$USERNAME.crt" "/home/$USERNAME/emailcert"
144
+# shellcheck disable=SC2086
145
+mv /etc/ssl/private/$USERNAME.key /home/$USERNAME/emailcert
146
+# shellcheck disable=SC2086
147
+mv /etc/ssl/certs/$USERNAME.crt /home/$USERNAME/emailcert
145 148
 openssl pkcs12 -export -in "/home/$USERNAME/emailcert/$USERNAME.cer" \
146 149
         -out "/home/$USERNAME/emailcert/$USERNAME.p12" \
147 150
         -inkey "/home/$USERNAME/emailcert/$USERNAME.key" \

+ 4
- 2
src/freedombone-controlpanel View File

@@ -1343,8 +1343,10 @@ function reset_tripwire {
1343 1343
     fi
1344 1344
     if [ ! -f "/etc/tripwire/${HOSTNAME}-local.key" ]; then
1345 1345
         if [ -f "/etc/tripwire/${PROJECT_NAME}-local.key" ]; then
1346
-            mv "/etc/tripwire/${PROJECT_NAME}-local.key" "/etc/tripwire/${HOSTNAME}-local.key"
1347
-            mv "/etc/tripwire/${PROJECT_NAME}-site.key" "/etc/tripwire/${HOSTNAME}-site.key"
1346
+            # shellcheck disable=SC2086
1347
+            mv /etc/tripwire/${PROJECT_NAME}-local.key /etc/tripwire/${HOSTNAME}-local.key
1348
+            # shellcheck disable=SC2086
1349
+            mv /etc/tripwire/${PROJECT_NAME}-site.key /etc/tripwire/${HOSTNAME}-site.key
1348 1350
         else
1349 1351
             echo $'Error: missing local key'
1350 1352
             any_key

+ 6
- 3
src/freedombone-image View File

@@ -490,7 +490,8 @@ do
490 490
         if [ ! -d "${CURR_DIR}/build" ]; then
491 491
             mkdir "${CURR_DIR}/build"
492 492
         fi
493
-        mv -f "${CURR_DIR}/${PROJECT_NAME}*.${im}" "${CURR_DIR}/build"
493
+        # shellcheck disable=SC2086
494
+        mv -f ${CURR_DIR}/${PROJECT_NAME}*.${im} ${CURR_DIR}/build
494 495
     fi
495 496
 done
496 497
 
@@ -628,8 +629,10 @@ do
628 629
     # shellcheck disable=SC2012,SC2086
629 630
     no_of_files=$(ls -afq build/${PROJECT_NAME}*.${im} | wc -l)
630 631
     if (( no_of_files > 0 )); then
631
-        mv "build/${PROJECT_NAME}*.${im}" "${CURR_DIR}/"
632
-        sudo chown "${CURR_USER}":"${CURR_USER}" "${CURR_DIR}/*.${im}"
632
+        # shellcheck disable=SC2086
633
+        mv build/${PROJECT_NAME}*.${im} ${CURR_DIR}/
634
+        # shellcheck disable=SC2086
635
+        sudo chown "${CURR_USER}":"${CURR_USER}" ${CURR_DIR}/*.${im}
633 636
     fi
634 637
 done
635 638
 

+ 2
- 1
src/freedombone-image-customise View File

@@ -1798,7 +1798,8 @@ function image_setup_utils {
1798 1798
         echo 'Go binary not installed'
1799 1799
         exit 763562
1800 1800
     fi
1801
-    mv "${rootdir}/home/go/go" "${rootdir}/home/go/go${GO_VERSION}"
1801
+    # shellcheck disable=SC2086
1802
+    mv ${rootdir}/home/go/go ${rootdir}/home/go/go${GO_VERSION}
1802 1803
     echo "export GOROOT=/home/go" >> "${rootdir}/root/.bashrc"
1803 1804
     echo "export GOROOT=/home/go" >> "${rootdir}/etc/skel/.bashrc"
1804 1805
     echo "export GOROOT=/home/go" >> "${rootdir}/home/go/.bashrc"

+ 2
- 1
src/freedombone-mesh-blog View File

@@ -125,7 +125,8 @@ function new_blog {
125 125
 
126 126
     # move to the content directory
127 127
     CURRENT_INDEX=$(cat "$CURRENT_BLOG_INDEX")
128
-    mv ~/.new-blog-entry "$BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md"
128
+    # shellcheck disable=SC2086
129
+    mv ~/.new-blog-entry $BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md
129 130
 
130 131
     # increment the index
131 132
     CURRENT_INDEX=$((CURRENT_INDEX + 1))

+ 2
- 1
src/freedombone-restore-local View File

@@ -876,7 +876,8 @@ function restore_personal_settings {
876 876
                         rm -rf "/home/$USERNAME/personal"
877 877
                     fi
878 878
                     if [ -d "$temp_restore_dir/home/$USERNAME/personal" ]; then
879
-                        mv "$temp_restore_dir/home/$USERNAME/personal" "/home/$USERNAME"
879
+                        # shellcheck disable=SC2086
880
+                        mv $temp_restore_dir/home/$USERNAME/personal /home/$USERNAME
880 881
                     else
881 882
                         if [ ! -d "/home/$USERNAME/personal" ]; then
882 883
                             mkdir "/home/$USERNAME/personal"

+ 2
- 1
src/freedombone-restore-remote View File

@@ -792,7 +792,8 @@ function restore_personal_settings {
792 792
                     if [ -d "/home/$USERNAME/personal" ]; then
793 793
                         rm -rf "/home/$USERNAME/personal"
794 794
                     fi
795
-                    mv "$temp_restore_dir/home/$USERNAME/personal" "/home/$USERNAME"
795
+                    # shellcheck disable=SC2086
796
+                    mv $temp_restore_dir/home/$USERNAME/personal /home/$USERNAME
796 797
                 else
797 798
                     if [ ! -d "/home/$USERNAME/personal" ]; then
798 799
                         mkdir "/home/$USERNAME/personal"

+ 4
- 2
src/freedombone-utils-backup View File

@@ -653,7 +653,8 @@ function restore_database_from_friend {
653 653
                 if [ -d "$restore_from_dir" ]; then
654 654
                     if [ -d "/root/temp${1}/${RESTORE_SUBDIR}/www/${2}/htdocs" ]; then
655 655
                         rm -rf "/var/www/${2}/htdocs"
656
-                        mv "$restore_from_dir" "/var/www/${2}/"
656
+                        # shellcheck disable=SC2086
657
+                        mv $restore_from_dir /var/www/${2}/
657 658
                     else
658 659
                         cp -r "$restore_from_dir/"* "/var/www/${2}/htdocs/"
659 660
                     fi
@@ -766,7 +767,8 @@ function restore_database {
766 767
                 if [ -d "$restore_from_dir" ]; then
767 768
                     if [ -d "/root/temp${restore_app_name}/${RESTORE_SUBDIR}/www/${restore_app_domain}/htdocs" ]; then
768 769
                         rm -rf "/var/www/${restore_app_domain}/htdocs"
769
-                        mv "$restore_from_dir" "/var/www/${restore_app_domain}/"
770
+                        # shellcheck disable=SC2086
771
+                        mv $restore_from_dir /var/www/${restore_app_domain}/
770 772
                     else
771 773
                         cp -r "$restore_from_dir/"* "/var/www/${restore_app_domain}/htdocs/"
772 774
                     fi

+ 12
- 6
src/freedombone-utils-gnusocialtools View File

@@ -367,7 +367,8 @@ function install_pleroma_front_end {
367 367
     sed -i 's|index index.php;|index index.html;|g' "$nginx_site"
368 368
 
369 369
     if [ -f "/var/www/${pleroma_domain}/htdocs/index.php" ]; then
370
-        mv "/var/www/${pleroma_domain}/htdocs/index.php" "/var/www/${pleroma_domain}/htdocs/index_qvitter.php"
370
+        # shellcheck disable=SC2086
371
+        mv /var/www/${pleroma_domain}/htdocs/index.php /var/www/${pleroma_domain}/htdocs/index_qvitter.php
371 372
     fi
372 373
     sed -i 's|index.php|index_qvitter.php|g' "$nginx_site"
373 374
 
@@ -414,7 +415,8 @@ function upgrade_pleroma_frontend {
414 415
         fi
415 416
         cp -r "$INSTALL_DIR/pleroma/dist/"* "$basedir/"
416 417
         if [ -f "$basedir/static/config.json.old" ]; then
417
-            mv "$basedir/static/config.json.old" "$basedir/static/config.json"
418
+            # shellcheck disable=SC2086
419
+            mv $basedir/static/config.json.old $basedir/static/config.json
418 420
         fi
419 421
         sed -i "s|\"name\":.*|\"name\": \"${title}\",|g" "$basedir/static/config.json"
420 422
         if [ -f "$basedir/static/logo.png.old" ]; then
@@ -425,7 +427,8 @@ function upgrade_pleroma_frontend {
425 427
         fi
426 428
 
427 429
         if [ -f "$basedir/index.php" ]; then
428
-            mv "$basedir/index.php" "$basedir/index_qvitter.php"
430
+            # shellcheck disable=SC2086
431
+            mv $basedir/index.php $basedir/index_qvitter.php
429 432
         fi
430 433
         chown -R www-data:www-data "$basedir"
431 434
     else
@@ -740,7 +743,8 @@ function gnusocial_use_classic {
740 743
     domain_name=$(get_completion_param "$database_name domain")
741 744
 
742 745
     if [ -f "/var/www/$domain_name/htdocs/index_qvitter.php" ]; then
743
-        mv "/var/www/$domain_name/htdocs/index_qvitter.php" "/var/www/$domain_name/htdocs/index.php"
746
+        # shellcheck disable=SC2086
747
+        mv /var/www/$domain_name/htdocs/index_qvitter.php /var/www/$domain_name/htdocs/index.php
744 748
     fi
745 749
 
746 750
     if [ -f "/etc/nginx/sites-available/$domain_name" ]; then
@@ -763,7 +767,8 @@ function gnusocial_use_qvitter {
763 767
     domain_name=$(get_completion_param "$database_name domain")
764 768
 
765 769
     if [ -f "/var/www/$domain_name/htdocs/index_qvitter.php" ]; then
766
-        mv "/var/www/$domain_name/htdocs/index_qvitter.php" "/var/www/$domain_name/htdocs/index.php"
770
+        # shellcheck disable=SC2086
771
+        mv /var/www/$domain_name/htdocs/index_qvitter.php /var/www/$domain_name/htdocs/index.php
767 772
     fi
768 773
 
769 774
     if [ -f "/etc/nginx/sites-available/$domain_name" ]; then
@@ -793,7 +798,8 @@ function gnusocial_use_pleroma {
793 798
     fi
794 799
 
795 800
     if [ -f "/var/www/$domain_name/htdocs/index.php" ]; then
796
-        mv "/var/www/$domain_name/htdocs/index.php" "/var/www/$domain_name/htdocs/index_qvitter.php"
801
+        # shellcheck disable=SC2086
802
+        mv /var/www/$domain_name/htdocs/index.php /var/www/$domain_name/htdocs/index_qvitter.php
797 803
     fi
798 804
 
799 805
     if [ -f "/etc/nginx/sites-available/$domain_name" ]; then

+ 2
- 1
src/freedombone-utils-rng View File

@@ -93,7 +93,8 @@ function install_onerng {
93 93
     # Download the package
94 94
     if [ ! -f $ONERNG_PACKAGE ]; then
95 95
         wget "$ONERNG_PACKAGE_DOWNLOAD"
96
-        mv "$ONERNG_PACKAGE?raw=true" $ONERNG_PACKAGE
96
+        # shellcheck disable=SC2086
97
+        mv $ONERNG_PACKAGE?raw=true $ONERNG_PACKAGE
97 98
     fi
98 99
     if [ ! -f $ONERNG_PACKAGE ]; then
99 100
         echo $"OneRNG package could not be downloaded"