Merge branch 'stretch' of https://github.com/bashrc/freedombone
This commit is contained in:
commit
3efe97a70f
|
@ -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
|
||||
|
|
|
@ -132,7 +132,7 @@ mkdir "/home/$ADD_USERNAME/.gnupg"
|
|||
|
||||
chown -R "$ADD_USERNAME":"$ADD_USERNAME" "/home/$ADD_USERNAME/.gnupg"
|
||||
chmod 700 "/home/$ADD_USERNAME/.gnupg"
|
||||
chmod 600 "/home/$ADD_USERNAME/.gnupg/*"
|
||||
chmod 600 "/home/$ADD_USERNAME/.gnupg/"*
|
||||
|
||||
# Generate a GPG key
|
||||
{ echo 'Key-Type: eddsa';
|
||||
|
|
|
@ -154,9 +154,9 @@ function restore_local_dokuwiki {
|
|||
function_check restore_directory_from_usb
|
||||
restore_directory_from_usb ${temp_restore_dir} dokuwikidat
|
||||
if [ -d "${temp_restore_dir}/var/www/${DOKUWIKI_DOMAIN_NAME}/htdocs/data" ]; then
|
||||
cp -r "${temp_restore_dir}/var/www/${DOKUWIKI_DOMAIN_NAME}/htdocs/data/*" "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data"
|
||||
cp -r "${temp_restore_dir}/var/www/${DOKUWIKI_DOMAIN_NAME}/htdocs/data/"* "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data"
|
||||
else
|
||||
cp -r "${temp_restore_dir}/*" "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data"
|
||||
cp -r "${temp_restore_dir}/"* "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -219,7 +219,7 @@ function restore_remote_dokuwiki {
|
|||
temp_restore_dir=/root/tempdokuwikidat
|
||||
restore_directory_from_friend $temp_restore_dir dokuwikidat
|
||||
if [ -d "$temp_restore_dir/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data" ]; then
|
||||
cp -r "$temp_restore_dir/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data/*" "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data/"
|
||||
cp -r "$temp_restore_dir/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data/"* "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data/"
|
||||
else
|
||||
cp -r $temp_restore_dir/* "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/data/"
|
||||
fi
|
||||
|
@ -237,7 +237,7 @@ function restore_remote_dokuwiki {
|
|||
temp_restore_dir=/root/tempdokuwikiacl
|
||||
restore_directory_from_friend $temp_restore_dir dokuwikiacl
|
||||
if [ -d "$temp_restore_dir/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/lib/plugins/acl" ]; then
|
||||
cp -r "$temp_restore_dir/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/lib/plugins/acl/*" "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/lib/plugins/acl/"
|
||||
cp -r "$temp_restore_dir/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/lib/plugins/acl/"* "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/lib/plugins/acl/"
|
||||
else
|
||||
cp -r $temp_restore_dir/* "/var/www/$DOKUWIKI_DOMAIN_NAME/htdocs/lib/plugins/acl/"
|
||||
fi
|
||||
|
|
|
@ -87,7 +87,7 @@ function restore_local_emacs {
|
|||
if [ ! -d "/home/$USERNAME/.emacs.d" ]; then
|
||||
mkdir "/home/$USERNAME/.emacs.d"
|
||||
fi
|
||||
cp -r "$temp_restore_dir/*" "/home/$USERNAME/.emacs.d"
|
||||
cp -r "$temp_restore_dir/"* "/home/$USERNAME/.emacs.d"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -143,7 +143,7 @@ function restore_remote_emacs {
|
|||
if [ ! -d "/home/$USERNAME/.emacs.d" ]; then
|
||||
mkdir "/home/$USERNAME/.emacs.d"
|
||||
fi
|
||||
cp -r "$temp_restore_dir/*" "/home/$USERNAME/.emacs.d/*"
|
||||
cp -r "$temp_restore_dir/"* "/home/$USERNAME/.emacs.d/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -258,7 +258,7 @@ function restore_local_friendica {
|
|||
mkdir -p "$friendica_dir/store/[data]/smarty3"
|
||||
fi
|
||||
chmod 1777 "$friendica_dir/store/[data]/smarty3"
|
||||
chown -R www-data:www-data "$friendica_dir/*"
|
||||
chown -R www-data:www-data "$friendica_dir/"*
|
||||
if [ -d $temp_restore_dir ]; then
|
||||
rm -rf $temp_restore_dir
|
||||
fi
|
||||
|
@ -297,7 +297,7 @@ function restore_remote_friendica {
|
|||
mkdir -p "/var/www/${FRIENDICA_DOMAIN_NAME}/htdocs/store/[data]/smarty3"
|
||||
fi
|
||||
chmod 1777 "/var/www/${FRIENDICA_DOMAIN_NAME}/htdocs/store/[data]/smarty3"
|
||||
chown -R www-data:www-data "/var/www/${FRIENDICA_DOMAIN_NAME}/htdocs/*"
|
||||
chown -R www-data:www-data "/var/www/${FRIENDICA_DOMAIN_NAME}/htdocs/"*
|
||||
fi
|
||||
if [ -d /root/tempfriendica ]; then
|
||||
rm -rf /root/tempfriendica
|
||||
|
@ -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
|
||||
|
|
|
@ -260,7 +260,7 @@ function restore_local_ghost {
|
|||
restore_directory_from_usb $temp_restore_dir ghostcontent
|
||||
if [ -d $temp_restore_dir ]; then
|
||||
if [ -d "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/content" ]; then
|
||||
cp -r "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/content/*" "/var/www/$GHOST_DOMAIN_NAME/htdocs/content/"
|
||||
cp -r "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/content/"* "/var/www/$GHOST_DOMAIN_NAME/htdocs/content/"
|
||||
else
|
||||
if [ ! -d "/var/www/$GHOST_DOMAIN_NAME/htdocs/content" ]; then
|
||||
mkdir "/var/www/$GHOST_DOMAIN_NAME/htdocs/content"
|
||||
|
@ -276,7 +276,7 @@ function restore_local_ghost {
|
|||
restore_directory_from_usb $temp_restore_dir ghostcurrent
|
||||
if [ -d $temp_restore_dir ]; then
|
||||
if [ -d "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content" ]; then
|
||||
cp -r "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content/*" "/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content/"
|
||||
cp -r "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content/"* "/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content/"
|
||||
else
|
||||
if [ ! -d "/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content" ]; then
|
||||
mkdir -p "/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content"
|
||||
|
@ -335,7 +335,7 @@ function restore_remote_ghost {
|
|||
restore_directory_from_friend $temp_restore_dir ghostcontent
|
||||
if [ -d $temp_restore_dir ]; then
|
||||
if [ -d "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/content" ]; then
|
||||
cp -r "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/content/*" "/var/www/$GHOST_DOMAIN_NAME/htdocs/content/"
|
||||
cp -r "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/content/"* "/var/www/$GHOST_DOMAIN_NAME/htdocs/content/"
|
||||
else
|
||||
if [ ! -d "/var/www/$GHOST_DOMAIN_NAME/htdocs/content" ]; then
|
||||
mkdir "/var/www/$GHOST_DOMAIN_NAME/htdocs/content"
|
||||
|
@ -351,7 +351,7 @@ function restore_remote_ghost {
|
|||
restore_directory_from_friend $temp_restore_dir ghostcurrent
|
||||
if [ -d $temp_restore_dir ]; then
|
||||
if [ -d "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content" ]; then
|
||||
cp -r "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content/*" "/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content/"
|
||||
cp -r "$temp_restore_dir/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content/"* "/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content/"
|
||||
else
|
||||
if [ ! -d "/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content" ]; then
|
||||
mkdir -p "/var/www/$GHOST_DOMAIN_NAME/htdocs/current/content"
|
||||
|
@ -441,7 +441,7 @@ function install_ghost {
|
|||
yarn install --no-emoji --no-progress
|
||||
yarn cache clean
|
||||
adduser --system --home="/var/www/${GHOST_DOMAIN_NAME}/htdocs/" --group ghost
|
||||
rm -rf "/var/www/$GHOST_DOMAIN_NAME/htdocs/*"
|
||||
rm -rf "/var/www/$GHOST_DOMAIN_NAME/htdocs/"*
|
||||
printf 'y' | ghost install ${GHOST_VERSION} --user ghost --db=sqlite3 --port ${GHOST_PORT} --verbose
|
||||
|
||||
if [ ! -d "/var/www/$GHOST_DOMAIN_NAME/htdocs/versions" ]; then
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -444,7 +445,7 @@ function restore_local_gnusocial {
|
|||
if [ ! -d "$gnusocial_dir/static" ]; then
|
||||
mkdir "$gnusocial_dir/static"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/static/*" "$gnusocial_dir/static/"
|
||||
cp -rp "$temp_restore_dir/static/"* "$gnusocial_dir/static/"
|
||||
fi
|
||||
chown www-data:www-data "$gnusocial_dir/config.php"
|
||||
chown -R www-data:www-data "$gnusocial_dir/static"
|
||||
|
@ -459,7 +460,7 @@ function restore_local_gnusocial {
|
|||
if [ ! -d "$gnusocial_dir/file" ]; then
|
||||
mkdir "$gnusocial_dir/file"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/*" "$gnusocial_dir/file"
|
||||
cp -rp "$temp_restore_dir/"* "$gnusocial_dir/file"
|
||||
fi
|
||||
chown -R www-data:www-data "$gnusocial_dir/file"
|
||||
rm -rf "$temp_restore_dir"
|
||||
|
@ -540,7 +541,7 @@ function restore_remote_gnusocial {
|
|||
if [ ! -d "$gnusocial_dir/static" ]; then
|
||||
mkdir "$gnusocial_dir/static"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/static/*" "$gnusocial_dir/static/"
|
||||
cp -rp "$temp_restore_dir/static/"* "$gnusocial_dir/static/"
|
||||
fi
|
||||
chown www-data:www-data "$gnusocial_dir/config.php"
|
||||
chown -R www-data:www-data "$gnusocial_dir/static"
|
||||
|
@ -555,7 +556,7 @@ function restore_remote_gnusocial {
|
|||
if [ ! -d "$gnusocial_dir/file" ]; then
|
||||
mkdir "$gnusocial_dir/file"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/*" "$gnusocial_dir/file/"
|
||||
cp -rp "$temp_restore_dir/"* "$gnusocial_dir/file/"
|
||||
fi
|
||||
chown -R www-data:www-data "$gnusocial_dir/file"
|
||||
rm -rf $temp_restore_dir
|
||||
|
|
|
@ -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
|
||||
|
@ -202,7 +203,7 @@ function upgrade_gogs {
|
|||
exit 37823
|
||||
fi
|
||||
rm -rf "/home/${GOGS_USERNAME:?}/"*
|
||||
cp -r "${INSTALL_DIR}/gogs/*" "/home/${GOGS_USERNAME}"
|
||||
cp -r "${INSTALL_DIR}/gogs/"* "/home/${GOGS_USERNAME}"
|
||||
if [ -f ${GOGS_FILE} ]; then
|
||||
rm ${GOGS_FILE}
|
||||
fi
|
||||
|
@ -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}"
|
||||
|
||||
|
@ -273,9 +275,9 @@ function restore_local_gogs {
|
|||
mkdir -p $GOGS_CONFIG_PATH
|
||||
fi
|
||||
if [ -d "/root/tempgogs/home/${GOGS_USERNAME}/custom" ]; then
|
||||
cp -r "/root/tempgogs/home/${GOGS_USERNAME}/custom/*" "/home/${GOGS_USERNAME}/custom/"
|
||||
cp -r "/root/tempgogs/home/${GOGS_USERNAME}/custom/"* "/home/${GOGS_USERNAME}/custom/"
|
||||
else
|
||||
cp -r "/root/tempgogs/*" "/home/${GOGS_USERNAME}/custom/"
|
||||
cp -r "/root/tempgogs/"* "/home/${GOGS_USERNAME}/custom/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -292,9 +294,9 @@ function restore_local_gogs {
|
|||
mkdir "/home/${GOGS_USERNAME}/gogs-repositories"
|
||||
fi
|
||||
if [ -d "${temp_restore_dir}repos/home/${GOGS_USERNAME}/gogs-repositories" ]; then
|
||||
cp -r "${temp_restore_dir}repos/home/${GOGS_USERNAME}/gogs-repositories/*" "/home/${GOGS_USERNAME}/gogs-repositories/"
|
||||
cp -r "${temp_restore_dir}repos/home/${GOGS_USERNAME}/gogs-repositories/"* "/home/${GOGS_USERNAME}/gogs-repositories/"
|
||||
else
|
||||
cp -r "${temp_restore_dir}repos/*" "/home/${GOGS_USERNAME}/gogs-repositories/"
|
||||
cp -r "${temp_restore_dir}repos/"* "/home/${GOGS_USERNAME}/gogs-repositories/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -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
|
||||
|
||||
|
@ -508,7 +511,7 @@ function install_gogs {
|
|||
exit 37823
|
||||
fi
|
||||
rm -rf "/home/${GOGS_USERNAME:?}/"*
|
||||
cp -r "${INSTALL_DIR}/gogs/*" "/home/${GOGS_USERNAME}"
|
||||
cp -r "${INSTALL_DIR}/gogs/"* "/home/${GOGS_USERNAME}"
|
||||
if [ -f ${GOGS_FILE} ]; then
|
||||
rm ${GOGS_FILE}
|
||||
fi
|
||||
|
|
|
@ -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)
|
||||
|
@ -256,12 +257,13 @@ function restore_local_htmly {
|
|||
if [ ! -d "/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then
|
||||
mkdir "/var/www/${HTMLY_DOMAIN_NAME}/htdocs"
|
||||
fi
|
||||
cp -r "${temp_restore_dir}/*" "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/"
|
||||
cp -r "${temp_restore_dir}/"* "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/"
|
||||
fi
|
||||
# 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
|
||||
|
@ -331,13 +335,14 @@ function restore_remote_htmly {
|
|||
if [ ! -d "/var/www/${HTMLY_DOMAIN_NAME}/htdocs" ]; then
|
||||
mkdir "/var/www/${HTMLY_DOMAIN_NAME}/htdocs"
|
||||
fi
|
||||
cp -r "${temp_restore_dir}/*" "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/"
|
||||
cp -r "${temp_restore_dir}/"* "/var/www/${HTMLY_DOMAIN_NAME}/htdocs/"
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
|
|
@ -220,7 +220,7 @@ function upgrade_hubzilla {
|
|||
git merge --abort
|
||||
git stash
|
||||
git pull
|
||||
cp -r "$HUBZILLA_PATH/redmatrix-themes1/*" "$HUBZILLA_PATH/view/theme/"
|
||||
cp -r "$HUBZILLA_PATH/redmatrix-themes1/"* "$HUBZILLA_PATH/view/theme/"
|
||||
chown -R www-data:www-data "$HUBZILLA_PATH"
|
||||
fi
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ function restore_local_hubzilla {
|
|||
mkdir -p "$hubzilla_dir/store/[data]/smarty3"
|
||||
fi
|
||||
chmod 1777 "$hubzilla_dir/store/[data]/smarty3"
|
||||
chown -R www-data:www-data "$hubzilla_dir/*"
|
||||
chown -R www-data:www-data "$hubzilla_dir/"*
|
||||
if [ -d $temp_restore_dir ]; then
|
||||
rm -rf $temp_restore_dir
|
||||
fi
|
||||
|
@ -287,7 +287,7 @@ function restore_remote_hubzilla {
|
|||
mkdir -p "/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/store/[data]/smarty3"
|
||||
fi
|
||||
chmod 1777 "/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/store/[data]/smarty3"
|
||||
chown -R www-data:www-data "/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/*"
|
||||
chown -R www-data:www-data "/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/"*
|
||||
fi
|
||||
if [ -d /root/temphubzilla ]; then
|
||||
rm -rf /root/temphubzilla
|
||||
|
|
|
@ -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"
|
||||
|
@ -236,7 +237,7 @@ function icecast_import_from_usb {
|
|||
dialog --title $"Import stream files from USB drive" --msgbox $'No stream files directory found on USB drive' 6 50
|
||||
backup_unmount_drive "${USB_DRIVE}"
|
||||
fi
|
||||
cp -ru "$USB_MOUNT$ICECAST_DIR/*" $ICECAST_DIR
|
||||
cp -ru "$USB_MOUNT$ICECAST_DIR/"* $ICECAST_DIR
|
||||
backup_unmount_drive "${USB_DRIVE}"
|
||||
icecast_convert_files $ICECAST_DIR
|
||||
dialog --title $"Import stream files from USB drive" --msgbox $'Import complete. You may now remove the USB drive' 6 50
|
||||
|
@ -255,7 +256,7 @@ function icecast_export_to_usb {
|
|||
if [ ! -d "$USB_MOUNT$ICECAST_DIR" ]; then
|
||||
mkdir -p "$USB_MOUNT$ICECAST_DIR"
|
||||
fi
|
||||
cp -ru "$ICECAST_DIR/*" "$USB_MOUNT$ICECAST_DIR"
|
||||
cp -ru "$ICECAST_DIR/"* "$USB_MOUNT$ICECAST_DIR"
|
||||
backup_unmount_drive "${USB_DRIVE}"
|
||||
dialog --title $"Export stream files to USB drive" --msgbox $'Export complete. You may now remove the USB drive' 6 50
|
||||
}
|
||||
|
|
|
@ -120,9 +120,9 @@ function restore_local_ipfs {
|
|||
restore_directory_from_usb $temp_restore_dir ipfs
|
||||
ADMIN_USERNAME=$(get_completion_param "Admin user")
|
||||
if [ -d "$temp_restore_dir/home/$ADMIN_USERNAME/.ipfs" ]; then
|
||||
cp -rf "$temp_restore_dir/home/$ADMIN_USERNAME/.ipfs/*" "/home/$ADMIN_USERNAME/.ipfs"
|
||||
cp -rf "$temp_restore_dir/home/$ADMIN_USERNAME/.ipfs/"* "/home/$ADMIN_USERNAME/.ipfs"
|
||||
else
|
||||
cp -rf "$temp_restore_dir/*" "/home/$ADMIN_USERNAME/.ipfs"
|
||||
cp -rf "$temp_restore_dir/"* "/home/$ADMIN_USERNAME/.ipfs"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -157,9 +157,9 @@ function restore_remote_ipfs {
|
|||
function_check restore_directory_from_friend
|
||||
restore_directory_from_friend $temp_restore_dir ipfs
|
||||
if [ -d "$temp_restore_dir/home/$ADMIN_USERNAME/.ipfs" ]; then
|
||||
cp -rf "$temp_restore_dir/home/$ADMIN_USERNAME/.ipfs/*" "/home/$ADMIN_USERNAME/.ipfs"
|
||||
cp -rf "$temp_restore_dir/home/$ADMIN_USERNAME/.ipfs/"* "/home/$ADMIN_USERNAME/.ipfs"
|
||||
else
|
||||
cp -rf "$temp_restore_dir/*" "/home/$ADMIN_USERNAME/.ipfs"
|
||||
cp -rf "$temp_restore_dir/"* "/home/$ADMIN_USERNAME/.ipfs"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
|
|
@ -262,7 +262,7 @@ function restore_local_kanboard {
|
|||
if [ ! -d "$kanboard_dir/data" ]; then
|
||||
mkdir "$kanboard_dir/data"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/*" "$kanboard_dir/data/"
|
||||
cp -rp "$temp_restore_dir/"* "$kanboard_dir/data/"
|
||||
fi
|
||||
chown -R www-data:www-data "$kanboard_dir/data"
|
||||
rm -rf $temp_restore_dir
|
||||
|
@ -343,7 +343,7 @@ function restore_remote_kanboard {
|
|||
if [ ! -d "$kanboard_dir/data" ]; then
|
||||
mkdir "$kanboard_dir/data"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/*" "$kanboard_dir/data/"
|
||||
cp -rp "$temp_restore_dir/"* "$kanboard_dir/data/"
|
||||
fi
|
||||
chown -R www-data:www-data "$kanboard_dir/data"
|
||||
rm -rf $temp_restore_dir
|
||||
|
|
|
@ -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
|
||||
|
@ -226,7 +227,7 @@ function koel_import_from_usb {
|
|||
dialog --title $"Import music from USB drive" --msgbox $'No Music directory found on USB drive' 6 50
|
||||
backup_unmount_drive "${USB_DRIVE}"
|
||||
fi
|
||||
cp -ru "$USB_MOUNT/Music/*" /music
|
||||
cp -ru "$USB_MOUNT/Music/"* /music
|
||||
backup_unmount_drive "${USB_DRIVE}"
|
||||
dialog --title $"Import music from USB drive" --msgbox $'Import complete. You may now remove the USB drive' 6 50
|
||||
}
|
||||
|
@ -320,7 +321,7 @@ function upgrade_koel {
|
|||
cd "/var/www/${KOEL_DOMAIN_NAME}/htdocs" || exit 7345346358
|
||||
php artisan koel:init
|
||||
koel_remove_gravatar
|
||||
chown -R www-data:www-data "/var/www/${KOEL_DOMAIN_NAME}/htdocs/*"
|
||||
chown -R www-data:www-data "/var/www/${KOEL_DOMAIN_NAME}/htdocs/"*
|
||||
|
||||
systemctl start koel
|
||||
}
|
||||
|
|
|
@ -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}"
|
||||
|
@ -634,7 +635,7 @@ function install_home_server {
|
|||
fi
|
||||
rm -rf /usr/local/lib/python2.7/dist-packages/ldap*
|
||||
if [ -d "$INSTALL_DIR/matrix" ]; then
|
||||
rm -rf "$INSTALL_DIR/matrix/*"
|
||||
rm -rf "$INSTALL_DIR/matrix/"*
|
||||
fi
|
||||
if ! pip install --upgrade --process-dependency-links . -b "$INSTALL_DIR/matrix"; then
|
||||
echo $'Failed to install matrix home server'
|
||||
|
|
|
@ -230,9 +230,9 @@ function restore_remote_mediagoblin {
|
|||
function_check restore_directory_from_friend
|
||||
restore_directory_from_friend $temp_restore_dir mediagoblin
|
||||
if [ -d "${temp_restore_dir}$MEDIAGOBLIN_BASE_DIR" ]; then
|
||||
cp -r "${temp_restore_dir}$MEDIAGOBLIN_BASE_DIR/*" "$MEDIAGOBLIN_BASE_DIR/"
|
||||
cp -r "${temp_restore_dir}$MEDIAGOBLIN_BASE_DIR/"* "$MEDIAGOBLIN_BASE_DIR/"
|
||||
else
|
||||
cp -r "${temp_restore_dir}/*" "$MEDIAGOBLIN_BASE_DIR/"
|
||||
cp -r "${temp_restore_dir}/"* "$MEDIAGOBLIN_BASE_DIR/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -71,7 +71,7 @@ function pihole_copy_files {
|
|||
if [ ! -f $PIHOLE_CUSTOM_ADLIST ]; then
|
||||
cp "$INSTALL_DIR/pihole/adlists.default" $PIHOLE_CUSTOM_ADLIST
|
||||
fi
|
||||
cp "$INSTALL_DIR/pihole/advanced/Scripts/*" /opt/$piholeBasename
|
||||
cp "$INSTALL_DIR/pihole/advanced/Scripts/"* /opt/$piholeBasename
|
||||
if [ -f /etc/dnsmasq.d/01-pihole.conf ]; then
|
||||
rm /etc/dnsmasq.d/01-pihole.conf
|
||||
fi
|
||||
|
|
|
@ -1099,7 +1099,7 @@ function install_pleroma {
|
|||
|
||||
# back end
|
||||
cd "$PLEROMA_DIR" || exit 246824684
|
||||
chown -R pleroma:pleroma "$PLEROMA_DIR/*"
|
||||
chown -R pleroma:pleroma "$PLEROMA_DIR/"*
|
||||
if ! sudo -u pleroma mix local.hex --force; then
|
||||
echo $'mix local.hex failed'
|
||||
exit 1745673
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -459,7 +460,7 @@ function restore_local_postactiv {
|
|||
if [ ! -d "$postactiv_dir/static" ]; then
|
||||
mkdir "$postactiv_dir/static"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/static/*" "$postactiv_dir/static/"
|
||||
cp -rp "$temp_restore_dir/static/"* "$postactiv_dir/static/"
|
||||
fi
|
||||
chown www-data:www-data "$postactiv_dir/config.php"
|
||||
chown -R www-data:www-data "$postactiv_dir/static"
|
||||
|
@ -474,7 +475,7 @@ function restore_local_postactiv {
|
|||
if [ ! -d "$postactiv_dir/file" ]; then
|
||||
mkdir "$postactiv_dir/file"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/*" "$postactiv_dir/file/"
|
||||
cp -rp "$temp_restore_dir/"* "$postactiv_dir/file/"
|
||||
fi
|
||||
chown -R www-data:www-data "$postactiv_dir/file"
|
||||
rm -rf $temp_restore_dir
|
||||
|
@ -555,7 +556,7 @@ function restore_remote_postactiv {
|
|||
if [ ! -d "$postactiv_dir/static" ]; then
|
||||
mkdir "$postactiv_dir/static"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/static/*" "$postactiv_dir/static/"
|
||||
cp -rp "$temp_restore_dir/static/"* "$postactiv_dir/static/"
|
||||
fi
|
||||
chown www-data:www-data "$postactiv_dir/config.php"
|
||||
chown -R www-data:www-data "$postactiv_dir/static"
|
||||
|
@ -570,7 +571,7 @@ function restore_remote_postactiv {
|
|||
if [ ! -d "$postactiv_dir/file" ]; then
|
||||
mkdir "$postactiv_dir/file"
|
||||
fi
|
||||
cp -rp "$temp_restore_dir/*" "$postactiv_dir/file/"
|
||||
cp -rp "$temp_restore_dir/"* "$postactiv_dir/file/"
|
||||
fi
|
||||
chown -R www-data:www-data "$postactiv_dir/file"
|
||||
rm -rf $temp_restore_dir
|
||||
|
|
|
@ -205,9 +205,9 @@ function restore_local_privatebin {
|
|||
restore_directory_from_usb $temp_restore_dir privatebin
|
||||
if [ -d $temp_restore_dir ]; then
|
||||
if [ -d "$temp_restore_dir$privatebin_dir" ]; then
|
||||
cp -rp "$temp_restore_dir$privatebin_dir/*" "$privatebin_dir/"
|
||||
cp -rp "$temp_restore_dir$privatebin_dir/"* "$privatebin_dir/"
|
||||
else
|
||||
cp -rp "$temp_restore_dir/*" "$privatebin_dir/"
|
||||
cp -rp "$temp_restore_dir/"* "$privatebin_dir/"
|
||||
fi
|
||||
secure_privatebin
|
||||
rm -rf $temp_restore_dir
|
||||
|
@ -249,9 +249,9 @@ function restore_remote_privatebin {
|
|||
restore_directory_from_friend $temp_restore_dir privatebin
|
||||
if [ -d $temp_restore_dir ]; then
|
||||
if [ -d "$temp_restore_dir$privatebin_dir" ]; then
|
||||
cp -rp "$temp_restore_dir$privatebin_dir/*" "$privatebin_dir/"
|
||||
cp -rp "$temp_restore_dir$privatebin_dir/"* "$privatebin_dir/"
|
||||
else
|
||||
cp -rp "$temp_restore_dir/*" "$privatebin_dir/"
|
||||
cp -rp "$temp_restore_dir/"* "$privatebin_dir/"
|
||||
fi
|
||||
secure_privatebin
|
||||
rm -rf $temp_restore_dir
|
||||
|
|
|
@ -155,7 +155,7 @@ function riot_download {
|
|||
echo $'Unable to extract Riot Web tarball'
|
||||
exit 542826
|
||||
fi
|
||||
cp -r "$INSTALL_DIR/${RIOT_FILENAME}/*" "/var/www/$RIOT_DOMAIN_NAME/htdocs"
|
||||
cp -r "$INSTALL_DIR/${RIOT_FILENAME}/"* "/var/www/$RIOT_DOMAIN_NAME/htdocs"
|
||||
|
||||
chown -R www-data:www-data "/var/www/$RIOT_DOMAIN_NAME/htdocs"
|
||||
}
|
||||
|
|
|
@ -346,7 +346,7 @@ function restore_local_syncthing {
|
|||
cp -r /root/Sync/* "/home/$USERNAME/Sync/"
|
||||
rm -rf /root/Sync
|
||||
else
|
||||
cp -r "${temp_restore_dir}/*" "/home/$USERNAME/Sync/"
|
||||
cp -r "${temp_restore_dir}/"* "/home/$USERNAME/Sync/"
|
||||
fi
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
|
@ -473,7 +473,7 @@ function restore_remote_syncthing {
|
|||
cp -r /root/Sync/* "/home/$USERNAME/Sync/"
|
||||
rm -rf /root/Sync
|
||||
else
|
||||
cp -r "${temp_restore_dir}/*" "/home/$USERNAME/Sync/"
|
||||
cp -r "${temp_restore_dir}/"* "/home/$USERNAME/Sync/"
|
||||
fi
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -76,10 +76,10 @@ function remove_user_tox {
|
|||
|
||||
if [ -d "/home/$remove_username/.config/tox" ]; then
|
||||
if [ -d "/home/$remove_username/.config/tox/chatlogs" ]; then
|
||||
shred -zu "/home/$remove_username/.config/tox/chatlogs/*"
|
||||
shred -zu "/home/$remove_username/.config/tox/chatlogs/"*
|
||||
rm -rf "/home/$remove_username/.config/tox/chatlogs"
|
||||
fi
|
||||
shred -zu "/home/$remove_username/.config/tox/*"
|
||||
shred -zu "/home/$remove_username/.config/tox/"*
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ function restore_local_vim {
|
|||
if [ ! -d "/home/$USERNAME/$VIM_TEMP_DIR" ]; then
|
||||
mkdir "/home/$USERNAME/$VIM_TEMP_DIR"
|
||||
fi
|
||||
cp -r "$temp_restore_dir/*" "/home/$USERNAME/$VIM_TEMP_DIR/"
|
||||
cp -r "$temp_restore_dir/"* "/home/$USERNAME/$VIM_TEMP_DIR/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -117,7 +117,7 @@ function restore_local_vim {
|
|||
backup_unmount_drive
|
||||
exit 664
|
||||
fi
|
||||
cp "/home/$USERNAME/$VIM_TEMP_DIR/*" "/home/$USERNAME"
|
||||
cp "/home/$USERNAME/$VIM_TEMP_DIR/"* "/home/$USERNAME"
|
||||
if [ -f "/home/$USERNAME/.viminfo" ]; then
|
||||
chown "$USERNAME":"$USERNAME" "/home/$USERNAME/.viminfo"
|
||||
fi
|
||||
|
@ -182,7 +182,7 @@ function restore_remote_vim {
|
|||
if [ ! -d "/home/$USERNAME/$VIM_TEMP_DIR" ]; then
|
||||
mkdir "/home/$USERNAME/$VIM_TEMP_DIR"
|
||||
fi
|
||||
cp -r "$temp_restore_dir/*" "/home/$USERNAME/$VIM_TEMP_DIR/"
|
||||
cp -r "$temp_restore_dir/"* "/home/$USERNAME/$VIM_TEMP_DIR/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -193,7 +193,7 @@ function restore_remote_vim {
|
|||
backup_unmount_drive
|
||||
exit 664
|
||||
fi
|
||||
cp "/home/$USERNAME/$VIM_TEMP_DIR/*" "/home/$USERNAME"
|
||||
cp "/home/$USERNAME/$VIM_TEMP_DIR/"* "/home/$USERNAME"
|
||||
if [ -f "/home/$USERNAME/.viminfo" ]; then
|
||||
chown "$USERNAME":"$USERNAME" "/home/$USERNAME/.viminfo"
|
||||
fi
|
||||
|
|
|
@ -380,8 +380,8 @@ function update_prosody_modules {
|
|||
if [ ! -d /var/lib/prosody/prosody-modules ]; then
|
||||
mkdir -p /var/lib/prosody/prosody-modules
|
||||
fi
|
||||
cp -r "$INSTALL_DIR/prosody-modules/*" /var/lib/prosody/prosody-modules/
|
||||
cp -r "$INSTALL_DIR/prosody-modules/*" /usr/lib/prosody/modules/
|
||||
cp -r "$INSTALL_DIR/prosody-modules/"* /var/lib/prosody/prosody-modules/
|
||||
cp -r "$INSTALL_DIR/prosody-modules/"* /usr/lib/prosody/modules/
|
||||
chown -R prosody:prosody /var/lib/prosody/prosody-modules
|
||||
chown -R prosody:prosody /usr/lib/prosody/modules
|
||||
systemctl start prosody
|
||||
|
@ -505,7 +505,7 @@ function upgrade_xmpp {
|
|||
set_completion_param "prosody_filename" "${prosody_filename}"
|
||||
fi
|
||||
|
||||
cp -r "$INSTALL_DIR/prosody-modules/*" /var/lib/prosody/prosody-modules/
|
||||
cp -r "$INSTALL_DIR/prosody-modules/"* /var/lib/prosody/prosody-modules/
|
||||
chown -R prosody:prosody /var/lib/prosody/prosody-modules
|
||||
|
||||
systemctl restart prosody
|
||||
|
|
|
@ -203,7 +203,7 @@ function install_zeronet_blog {
|
|||
|
||||
echo $"ZeroNet Blog address: $ZERONET_BLOG_ADDRESS"
|
||||
echo $"ZeroNet Blog private key: $ZERONET_BLOG_PRIVATE_KEY"
|
||||
cp -r "$MESH_INSTALL_DIR/zeronet/ZeroBlog/*" "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_BLOG_ADDRESS"
|
||||
cp -r "$MESH_INSTALL_DIR/zeronet/ZeroBlog/"* "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_BLOG_ADDRESS"
|
||||
|
||||
if [ ! -d "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_BLOG_ADDRESS/data" ]; then
|
||||
mkdir "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_BLOG_ADDRESS/data"
|
||||
|
@ -286,7 +286,7 @@ function install_zeronet_mail {
|
|||
|
||||
echo $"ZeroNet Mail address: $ZERONET_MAIL_ADDRESS"
|
||||
echo $"ZeroNet Mail private key: $ZERONET_MAIL_PRIVATE_KEY"
|
||||
cp -r "$MESH_INSTALL_DIR/zeronet/ZeroMail/*" "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_MAIL_ADDRESS"
|
||||
cp -r "$MESH_INSTALL_DIR/zeronet/ZeroMail/"* "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_MAIL_ADDRESS"
|
||||
|
||||
if [ ! -d "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_MAIL_ADDRESS/data" ]; then
|
||||
mkdir "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_MAIL_ADDRESS/data"
|
||||
|
@ -368,7 +368,7 @@ function install_zeronet_forum {
|
|||
|
||||
echo $"Forum address: $ZERONET_FORUM_ADDRESS"
|
||||
echo $"Forum private key: $ZERONET_FORUM_PRIVATE_KEY"
|
||||
cp -r "$MESH_INSTALL_DIR/zeronet/ZeroTalk/*" "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_FORUM_ADDRESS"
|
||||
cp -r "$MESH_INSTALL_DIR/zeronet/ZeroTalk/"* "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_FORUM_ADDRESS"
|
||||
sed -i "s/ZeroBoard/$ZERONET_DEFAULT_FORUM_TITLE/g" "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_FORUM_ADDRESS/index.html"
|
||||
sed -i "s/ZeroTalk/$ZERONET_DEFAULT_FORUM_TITLE/g" "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_FORUM_ADDRESS/index.html"
|
||||
sed -i "s|Demo for dynamic, decentralized content publishing.|$ZERONET_DEFAULT_FORUM_TAGLINE|g" "$MESH_INSTALL_DIR/zeronet/data/$ZERONET_FORUM_ADDRESS/index.html"
|
||||
|
|
|
@ -421,7 +421,7 @@ function disperse_key_shares {
|
|||
fi
|
||||
|
||||
# remove the temp file/directory
|
||||
shred -zu "$temp_key_share_fragments/*"
|
||||
shred -zu "$temp_key_share_fragments/"*
|
||||
rm -rf "$temp_key_share_dir"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -1330,7 +1330,7 @@ function configure_gpg {
|
|||
else
|
||||
chown -R "$MY_USERNAME":"$MY_USERNAME" "$gpg_dir"
|
||||
chmod 700 "$gpg_dir"
|
||||
chmod 600 "$gpg_dir/*"
|
||||
chmod 600 "$gpg_dir/"*
|
||||
printf '%%Assuan%%\nsocket=/dev/shm/S.dirmngr\n' > "/home/$MY_USERNAME/.gnupg/S.dirmngr"
|
||||
if [ -d "/home/$MY_USERNAME/.gnupg/crls.d" ]; then
|
||||
chmod +x "/home/$MY_USERNAME/.gnupg/crls.d"
|
||||
|
@ -1362,7 +1362,7 @@ function configure_gpg {
|
|||
|
||||
chown -R "$MY_USERNAME":"$MY_USERNAME" "$gpg_dir"
|
||||
chmod 700 "$gpg_dir"
|
||||
chmod 600 "$gpg_dir/*"
|
||||
chmod 600 "$gpg_dir/"*
|
||||
printf '%%Assuan%%\nsocket=/dev/shm/S.dirmngr\n' > "$gpg_dir/S.dirmngr"
|
||||
if [ -d "$gpg_dir/crls.d" ]; then
|
||||
chmod +x "$gpg_dir/crls.d"
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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" \
|
||||
|
|
|
@ -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
|
||||
|
@ -2153,7 +2155,7 @@ function add_clacks {
|
|||
clacks=$(<"$data")
|
||||
if [ ${#clacks} -gt 1 ]; then
|
||||
|
||||
WEB_FILES="/etc/nginx/sites-available/*"
|
||||
WEB_FILES="/etc/nginx/sites-available/"*
|
||||
for f in $WEB_FILES
|
||||
do
|
||||
if grep -q "X-Clacks-Overhead" "$f"; then
|
||||
|
|
|
@ -243,7 +243,7 @@ function image_setup {
|
|||
makepkg --force --noconfirm
|
||||
makepkg -i --force --noconfirm
|
||||
sudo wget "https://raw.githubusercontent.com/bashrc/freedombone/master/image_build/debootstrap/scripts/${DEBIAN_VERSION}" -O /usr/share/debootstrap/scripts/debscript
|
||||
sudo cp -f "/usr/share/debootstrap/scripts/debscript /usr/share/debootstrap/scripts/${DEBIAN_VERSION}"
|
||||
sudo cp -f "/usr/share/debootstrap/scripts/debscript" "/usr/share/debootstrap/scripts/${DEBIAN_VERSION}"
|
||||
if [ ! -f "/usr/share/debootstrap/scripts/${DEBIAN_VERSION}" ]; then
|
||||
echo $"No debian debootstrap script was found for $DEBIAN_VERSION"
|
||||
return
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
@ -1809,7 +1810,7 @@ function image_setup_utils {
|
|||
echo "export PATH=\$PATH:\$GOPATH" >> "${rootdir}/etc/skel/.bashrc"
|
||||
echo "export PATH=\$PATH:\$GOPATH" >> "${rootdir}/home/go/.bashrc"
|
||||
chroot "$rootdir" chown -R go:go /home/go
|
||||
cp "${rootdir}/home/go/go${GO_VERSION}/bin/*" "${rootdir}/usr/bin"
|
||||
cp "${rootdir}/home/go/go${GO_VERSION}/bin/"* "${rootdir}/usr/bin"
|
||||
|
||||
# Tomb
|
||||
chroot "$rootdir" apt-get -yq install zsh pinentry-curses
|
||||
|
|
|
@ -207,7 +207,7 @@ EOF
|
|||
|
||||
# Copy all DTBs
|
||||
mkdir -p /boot/dtbs
|
||||
cp "/usr/lib/$kernelVersion/*" /boot/dtbs
|
||||
cp "/usr/lib/$kernelVersion/"* /boot/dtbs
|
||||
|
||||
# extra boot modules
|
||||
echo "rtc_sunxi" >> /etc/initramfs-tools/modules
|
||||
|
@ -218,7 +218,7 @@ setup_flash_kernel() {
|
|||
if [ ! -d /etc/flash-kernel ] ; then
|
||||
mkdir /etc/flash-kernel
|
||||
fi
|
||||
echo "$1" > /etc/flash-kernel/machine
|
||||
printf "%s" "$1" > /etc/flash-kernel/machine
|
||||
|
||||
command_line=""
|
||||
if [ -n "$2" ] ; then
|
||||
|
@ -226,7 +226,7 @@ setup_flash_kernel() {
|
|||
fi
|
||||
|
||||
if [ -n "$command_line" ] ; then
|
||||
echo flash-kernel flash-kernel/linux_cmdline string "$command_line" | debconf-set-selections
|
||||
echo "flash-kernel flash-kernel/linux_cmdline string \"$command_line\"" | debconf-set-selections
|
||||
fi
|
||||
|
||||
apt-get install -y flash-kernel
|
||||
|
|
|
@ -247,6 +247,7 @@ echo $"starting $VMDEBOOTSTRAP"
|
|||
|
||||
# Run vmdebootstrap script to create image
|
||||
vmdebootstrap_failed=
|
||||
# shellcheck disable=SC2086
|
||||
sudo -H \
|
||||
SUITE="$SUITE" \
|
||||
MIRROR="$MIRROR" \
|
||||
|
@ -267,8 +268,8 @@ sudo -H \
|
|||
--lock-root-password \
|
||||
--arch "$ARCHITECTURE" \
|
||||
--distribution "$SUITE" \
|
||||
"$extra_opts" \
|
||||
"$pkgopts"
|
||||
$extra_opts \
|
||||
$pkgopts
|
||||
|
||||
echo $'Removing customised customisation script'
|
||||
sudo shred -zu $TEMP_CUSTOMISE
|
||||
|
|
|
@ -843,7 +843,7 @@ function show_desktop_icons {
|
|||
|
||||
# set permissions
|
||||
chmod +x "/home/$MY_USERNAME/Desktop/*.desktop"
|
||||
chown "${MY_USERNAME}":"${MY_USERNAME}" "/home/$MY_USERNAME/Desktop/*"
|
||||
chown "${MY_USERNAME}":"${MY_USERNAME}" "/home/$MY_USERNAME/Desktop/"*
|
||||
chown "${MY_USERNAME}":"${MY_USERNAME}" "/home/$MY_USERNAME/.config"
|
||||
chown -R "${MY_USERNAME}":"${MY_USERNAME}" "/home/$MY_USERNAME/.config/tox"
|
||||
chown -R "${MY_USERNAME}":"${MY_USERNAME}" "/home/$MY_USERNAME/.config/autostart"
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -141,7 +141,7 @@ function clear_passwords {
|
|||
for d in /root/.passwords/*/ ; do
|
||||
USERNAME=$(echo "$d" | awk -F '/' '{print $4}')
|
||||
if [[ "$USERNAME" != 'root' ]]; then
|
||||
shred -zu "/root/.passwords/$USERNAME/*"
|
||||
shred -zu "/root/.passwords/$USERNAME/"*
|
||||
rm -rf "/root/.passwords/$USERNAME"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -123,7 +123,7 @@ if [ "$FRIENDS_SERVERS_LIST" ]; then
|
|||
|
||||
echo -n $"Starting key retrieval from $REMOTE_SERVER..."
|
||||
/usr/bin/sshpass -p "$REMOTE_PASSWORD" \
|
||||
scp -r -P "$REMOTE_SSH_PORT" "$REMOTE_SERVER/.gnupg_fragments/*" "/home/$MY_USERNAME/.gnupg_fragments"
|
||||
scp -r -P "$REMOTE_SSH_PORT" "$REMOTE_SERVER/.gnupg_fragments/"* "/home/$MY_USERNAME/.gnupg_fragments"
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
echo $'FAILED'
|
||||
|
|
|
@ -561,7 +561,7 @@ function restore_spamassassin {
|
|||
if [ ! -d "/home/$USERNAME/.spamassassin" ]; then
|
||||
mkdir "/home/$USERNAME/.spamassassin"
|
||||
fi
|
||||
cp -rf "$temp_restore_dir/*" "/home/$USERNAME/.spamassassin/"
|
||||
cp -rf "$temp_restore_dir/"* "/home/$USERNAME/.spamassassin/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -634,7 +634,7 @@ function restore_user_ssh_keys {
|
|||
if [ ! -d "/home/$USERNAME/.ssh" ]; then
|
||||
mkdir "/home/$USERNAME/.ssh"
|
||||
fi
|
||||
cp -r "$temp_restore_dir/*" "/home/$USERNAME/.ssh/"
|
||||
cp -r "$temp_restore_dir/"* "/home/$USERNAME/.ssh/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -753,7 +753,7 @@ function restore_user_fin {
|
|||
if [ ! -d "/home/$USERNAME/.fin" ]; then
|
||||
mkdir "/home/$USERNAME/.fin"
|
||||
fi
|
||||
cp -r "$temp_restore_dir/*" "/home/$USERNAME/.fin/"
|
||||
cp -r "$temp_restore_dir/"* "/home/$USERNAME/.fin/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -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"
|
||||
|
|
|
@ -432,7 +432,7 @@ function restore_gpg {
|
|||
if [ ! -d "/home/$USERNAME/.gnupg" ]; then
|
||||
mkdir "/home/$USERNAME/.gnupg"
|
||||
fi
|
||||
cp -r "${temp_restore_dir}/*" "/home/$USERNAME/.gnupg/"
|
||||
cp -r "${temp_restore_dir}/"* "/home/$USERNAME/.gnupg/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -599,7 +599,7 @@ function restore_user_config {
|
|||
if [ ! -d "/home/$USERNAME/.config" ]; then
|
||||
mkdir "/home/$USERNAME/.config"
|
||||
fi
|
||||
cp -r "$temp_restore_dir/*" "/home/$USERNAME/.config/"
|
||||
cp -r "$temp_restore_dir/"* "/home/$USERNAME/.config/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -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"
|
||||
|
|
|
@ -113,12 +113,12 @@ fi
|
|||
|
||||
# remove gpg keys
|
||||
if [ -d "/home/$REMOVE_USERNAME/.gnupg" ]; then
|
||||
shred -zu "/home/$REMOVE_USERNAME/.gnupg/*"
|
||||
shred -zu "/home/$REMOVE_USERNAME/.gnupg/"*
|
||||
fi
|
||||
|
||||
# remove ssh keys
|
||||
if [ -d "/home/$REMOVE_USERNAME/.ssh" ]; then
|
||||
shred -zu "/home/$REMOVE_USERNAME/.ssh/*"
|
||||
shred -zu "/home/$REMOVE_USERNAME/.ssh/"*
|
||||
fi
|
||||
|
||||
echo $'Detecting installed apps...'
|
||||
|
|
|
@ -75,7 +75,7 @@ fi
|
|||
if [ -d "$PROJECT_DIR" ]; then
|
||||
if [ -f "$CONFIGURATION_FILE" ]; then
|
||||
cd "$PROJECT_DIR" || exit 246823484
|
||||
rm -rf "$PROJECT_DIR/locale/*"
|
||||
rm -rf "$PROJECT_DIR/locale/"*
|
||||
if [[ "$CURRENT_BRANCH" == *"master" ]]; then
|
||||
git_pull $PROJECT_REPO
|
||||
else
|
||||
|
|
|
@ -260,7 +260,7 @@ function backup_database_local_usb {
|
|||
if [ -f "${local_database_dir}/${1}.${database_file_extension}" ]; then
|
||||
if [ ! -s "${local_database_dir}/${1}.${database_file_extension}" ]; then
|
||||
echo $"${1} database could not be saved"
|
||||
shred -zu "${local_database_dir}/*"
|
||||
shred -zu "${local_database_dir}/"*
|
||||
rm -rf "${local_database_dir}"
|
||||
umount "$USB_MOUNT"
|
||||
rm -rf "$USB_MOUNT"
|
||||
|
@ -286,7 +286,7 @@ function backup_directory_to_usb_duplicity {
|
|||
umount "$USB_MOUNT"
|
||||
rm -rf "$USB_MOUNT"
|
||||
if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
||||
shred -zu "${1}/*"
|
||||
shred -zu "${1}/"*
|
||||
rm -rf "${1}"
|
||||
fi
|
||||
function_check restart_site
|
||||
|
@ -301,7 +301,7 @@ function backup_directory_to_usb_duplicity {
|
|||
umount "$USB_MOUNT"
|
||||
rm -rf "$USB_MOUNT"
|
||||
if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
||||
shred -zu "${1}/*"
|
||||
shred -zu "${1}/"*
|
||||
rm -rf "${1}"
|
||||
fi
|
||||
function_check restart_site
|
||||
|
@ -334,7 +334,7 @@ function backup_directory_to_usb {
|
|||
backup_directory_to_usb_duplicity "${1}" "${2}"
|
||||
|
||||
if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
||||
shred -zu "${1}/*"
|
||||
shred -zu "${1}/"*
|
||||
rm -rf "${1}"
|
||||
fi
|
||||
fi
|
||||
|
@ -416,7 +416,7 @@ function backup_directory_to_friend_duplicity {
|
|||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
if [[ "${1}" == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
||||
shred -zu "${1}/*"
|
||||
shred -zu "${1}/"*
|
||||
rm -rf "${1}"
|
||||
fi
|
||||
function_check restart_site
|
||||
|
@ -429,7 +429,7 @@ function backup_directory_to_friend_duplicity {
|
|||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
if [[ "${1}" == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
||||
shred -zu "${1}/*"
|
||||
shred -zu "${1}/"*
|
||||
rm -rf "${1}"
|
||||
fi
|
||||
function_check restart_site
|
||||
|
@ -459,7 +459,7 @@ function backup_directory_to_friend {
|
|||
backup_directory_to_friend_duplicity "${1}" "${2}"
|
||||
|
||||
if [[ "${1}" == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
||||
shred -zu "/root/temp${2}/*"
|
||||
shred -zu "/root/temp${2}/"*
|
||||
rm -rf "/root/temp${2}"
|
||||
fi
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ function backup_database_remote {
|
|||
if [ -f "${local_database_dir}/${1}.${database_file_extension}" ]; then
|
||||
if [ ! -s "${local_database_dir}/${1}.${database_file_extension}" ]; then
|
||||
echo $"${1} database could not be saved"
|
||||
shred -zu "${local_database_dir}/*"
|
||||
shred -zu "${local_database_dir}/"*
|
||||
rm -rf "${local_database_dir}"
|
||||
# Send a warning email
|
||||
echo $"Unable to export ${1} database" | mail -s $"${PROJECT_NAME} backup to friends" "$ADMIN_EMAIL_ADDRESS"
|
||||
|
@ -629,7 +629,7 @@ function restore_database_from_friend {
|
|||
exit 8735271
|
||||
fi
|
||||
if [ -d "${local_database_dir}/${RESTORE_SUBDIR}/temp${1}data" ]; then
|
||||
shred -zu "${local_database_dir}/${RESTORE_SUBDIR}/temp${1}data/*"
|
||||
shred -zu "${local_database_dir}/${RESTORE_SUBDIR}/temp${1}data/"*
|
||||
else
|
||||
shred -zu "${local_database_dir}/*.${database_file_extension}"
|
||||
fi
|
||||
|
@ -653,9 +653,10 @@ 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/"
|
||||
cp -r "$restore_from_dir/"* "/var/www/${2}/htdocs/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
@ -738,7 +739,7 @@ function restore_database {
|
|||
exit 482638995
|
||||
fi
|
||||
if [ -d "${local_database_dir}/${RESTORE_SUBDIR}/temp${restore_app_name}data" ]; then
|
||||
shred -zu "${local_database_dir}/${RESTORE_SUBDIR}/temp${restore_app_name}data/*"
|
||||
shred -zu "${local_database_dir}/${RESTORE_SUBDIR}/temp${restore_app_name}data/"*
|
||||
else
|
||||
shred -zu "${local_database_dir}/*.${database_file_extension}"
|
||||
fi
|
||||
|
@ -766,9 +767,10 @@ 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/"
|
||||
cp -r "$restore_from_dir/"* "/var/www/${restore_app_domain}/htdocs/"
|
||||
fi
|
||||
# shellcheck disable=SC2181
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
|
|
@ -342,7 +342,7 @@ function install_pleroma_front_end {
|
|||
npm install -g whatwg-fetch@2.0.3
|
||||
yarn
|
||||
if [ -f "$INSTALL_DIR/pleroma/dist/index.html" ]; then
|
||||
rm -rf "$INSTALL_DIR/pleroma/dist/*"
|
||||
rm -rf "$INSTALL_DIR/pleroma/dist/"*
|
||||
fi
|
||||
npm run build
|
||||
if [ ! -d "$INSTALL_DIR/pleroma/dist" ]; then
|
||||
|
@ -355,10 +355,10 @@ function install_pleroma_front_end {
|
|||
fi
|
||||
|
||||
if [[ "$app_name" != 'pleroma' ]]; then
|
||||
cp -r "$INSTALL_DIR/pleroma/dist/*" "/var/www/${pleroma_domain}/htdocs/"
|
||||
cp -r "$INSTALL_DIR/pleroma/dist/"* "/var/www/${pleroma_domain}/htdocs/"
|
||||
pleroma_set_background_image_from_url "/var/www/${pleroma_domain}/htdocs" "$pleroma_domain" "$background_url" "$title"
|
||||
else
|
||||
cp -r "$INSTALL_DIR/pleroma/dist/*" "$PLEROMA_DIR/priv/static"
|
||||
cp -r "$INSTALL_DIR/pleroma/dist/"* "$PLEROMA_DIR/priv/static"
|
||||
pleroma_set_background_image_from_url "$PLEROMA_DIR/priv/static" "$pleroma_domain" "$background_url" "$title"
|
||||
fi
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -412,9 +413,10 @@ function upgrade_pleroma_frontend {
|
|||
if [ -f "$basedir/static/config.json" ]; then
|
||||
cp "$basedir/static/config.json" "$basedir/static/config.json.old"
|
||||
fi
|
||||
cp -r "$INSTALL_DIR/pleroma/dist/*" "$basedir/"
|
||||
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
|
||||
|
|
|
@ -192,7 +192,8 @@ function mesh_upgrade_golang {
|
|||
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/$MY_USERNAME/.bashrc"
|
||||
|
@ -209,7 +210,16 @@ function mesh_upgrade_golang {
|
|||
echo "export PATH=\$PATH:\$GOPATH" >> "${rootdir}/home/go/.bashrc"
|
||||
$prefix chown -R "$MY_USERNAME":"$MY_USERNAME" "/home/$MY_USERNAME"
|
||||
$prefix chown -R go:go /home/go
|
||||
cp "${rootdir}/home/go/go${GO_VERSION}/bin/*" "${rootdir}/usr/bin"
|
||||
if [ ! -d "${rootdir}/home/go/go${GO_VERSION}/bin" ]; then
|
||||
echo $"golang binaries directory not found ${rootdir}/home/go/go${GO_VERSION}/bin"
|
||||
exit 356356785
|
||||
fi
|
||||
ls -la "${rootdir}/home/go/go${GO_VERSION}"
|
||||
if ! cp "${rootdir}/home/go/go${GO_VERSION}/bin/"* "${rootdir}/usr/bin"; then
|
||||
ls -la "${rootdir}/home/go/go${GO_VERSION}"
|
||||
echo $'Copying golang binaries failed'
|
||||
exit 246824628
|
||||
fi
|
||||
}
|
||||
|
||||
function upgrade_golang {
|
||||
|
|
|
@ -143,7 +143,7 @@ function gpg_set_permissions {
|
|||
|
||||
if [[ "$key_username" != 'root' ]]; then
|
||||
chmod 700 "/home/$key_username/.gnupg"
|
||||
chmod -R 600 "/home/$key_username/.gnupg/*"
|
||||
chmod -R 600 "/home/$key_username/.gnupg/"*
|
||||
printf '%%Assuan%%\nsocket=/dev/shm/S.dirmngr\n' > "/home/$key_username/.gnupg/S.dirmngr"
|
||||
if [ -d "/home/$key_username/.gnupg/crls.d" ]; then
|
||||
chmod +x "/home/$key_username/.gnupg/crls.d"
|
||||
|
|
|
@ -85,7 +85,7 @@ function interactive_gpg_from_usb {
|
|||
mkdir /etc/letsencrypt
|
||||
fi
|
||||
echo $'Recovering LetsEncrypt keys'
|
||||
cp -r "$USB_MOUNT/letsencrypt/*" /etc/letsencrypt
|
||||
cp -r "$USB_MOUNT/letsencrypt/"* /etc/letsencrypt
|
||||
addgroup ssl-cert
|
||||
chown -R root:ssl-cert /etc/letsencrypt
|
||||
fi
|
||||
|
@ -121,7 +121,7 @@ function interactive_gpg_from_usb {
|
|||
fi
|
||||
cp -r "$HOME_DIR/.gnupg $HOME_DIR/.gnupg_old"
|
||||
chmod 700 "$HOME_DIR/.gnupg_old"
|
||||
chmod -R 600 "$HOME_DIR/.gnupg_old/*"
|
||||
chmod -R 600 "$HOME_DIR/.gnupg_old/"*
|
||||
chown -R "$MY_USERNAME":"$MY_USERNAME" "$HOME_DIR/.gnupg_old"
|
||||
fi
|
||||
echo $'Removing old gpg keys'
|
||||
|
@ -145,7 +145,7 @@ function interactive_gpg_from_usb {
|
|||
mkdir "$HOME_DIR/.gnupg"
|
||||
fi
|
||||
echo $'Recovering GPG keys'
|
||||
cp -r "$USB_MOUNT/.gnupg/*" "$HOME_DIR/.gnupg"
|
||||
cp -r "$USB_MOUNT/.gnupg/"* "$HOME_DIR/.gnupg"
|
||||
GPG_LOADING="no"
|
||||
dialog --title $"Recover Encryption Keys" \
|
||||
--msgbox $"GPG Keyring directory loaded to $HOME_DIR" 6 70
|
||||
|
@ -154,7 +154,7 @@ function interactive_gpg_from_usb {
|
|||
if [ ! -d "$HOME_DIR/.gnupg_fragments" ]; then
|
||||
mkdir "$HOME_DIR/.gnupg_fragments"
|
||||
fi
|
||||
cp -r "$USB_MOUNT/.gnupg_fragments/*" "$HOME_DIR/.gnupg_fragments"
|
||||
cp -r "$USB_MOUNT/.gnupg_fragments/"* "$HOME_DIR/.gnupg_fragments"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -163,7 +163,7 @@ function interactive_gpg_from_usb {
|
|||
if [ ! -d "$HOME_DIR/.ssh" ]; then
|
||||
mkdir "$HOME_DIR/.ssh"
|
||||
fi
|
||||
cp "$USB_MOUNT/.ssh/*" "$HOME_DIR/.ssh"
|
||||
cp "$USB_MOUNT/.ssh/"* "$HOME_DIR/.ssh"
|
||||
dialog --title $"Recover Encryption Keys" \
|
||||
--msgbox $"ssh keys imported" 6 70
|
||||
SSH_IMPORTED="yes"
|
||||
|
|
|
@ -112,7 +112,8 @@ function install_meteor_script {
|
|||
exit 693252
|
||||
fi
|
||||
|
||||
mv "${INSTALL_TMPDIR}/.meteor" "$meteor_dir"
|
||||
# shellcheck disable=SC2086
|
||||
mv ${INSTALL_TMPDIR}/.meteor $meteor_dir
|
||||
|
||||
meteor_cleanUp
|
||||
|
||||
|
|
|
@ -97,11 +97,11 @@ function remove_onion_service {
|
|||
fi
|
||||
fi
|
||||
if [ -d "${HIDDEN_SERVICE_PATH}${onion_service_name}" ]; then
|
||||
shred -zu "${HIDDEN_SERVICE_PATH}${onion_service_name}/*"
|
||||
shred -zu "${HIDDEN_SERVICE_PATH}${onion_service_name}/"*
|
||||
rm -rf "${HIDDEN_SERVICE_PATH}${onion_service_name}"
|
||||
fi
|
||||
if [ -d "${HIDDEN_SERVICE_PATH}${onion_service_name}_mobile" ]; then
|
||||
shred -zu "${HIDDEN_SERVICE_PATH}${onion_service_name}_mobile/*"
|
||||
shred -zu "${HIDDEN_SERVICE_PATH}${onion_service_name}_mobile/"*
|
||||
rm -rf "${HIDDEN_SERVICE_PATH}${onion_service_name}_mobile"
|
||||
fi
|
||||
remove_completion_param "${onion_service_name} onion domain"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -817,8 +817,8 @@ function update_default_domain {
|
|||
chmod -R 700 /etc/prosody/certs/*
|
||||
chmod 600 /etc/prosody/prosody.cfg.lua
|
||||
if [ -d "$INSTALL_DIR/prosody-modules" ]; then
|
||||
cp -r "$INSTALL_DIR/prosody-modules/*" /var/lib/prosody/prosody-modules/
|
||||
cp -r "$INSTALL_DIR/prosody-modules/*" /usr/lib/prosody/modules/
|
||||
cp -r "$INSTALL_DIR/prosody-modules/"* /var/lib/prosody/prosody-modules/
|
||||
cp -r "$INSTALL_DIR/prosody-modules/"* /usr/lib/prosody/modules/
|
||||
fi
|
||||
chown -R prosody:prosody /var/lib/prosody/prosody-modules
|
||||
chown -R prosody:prosody /usr/lib/prosody/modules
|
||||
|
|
Loading…
Reference in New Issue