Browse Source

Fix typos and code spacing

pull/16/head
Jimmy Monin 9 years ago
parent
commit
6766374482
  1. 4
      scripts/install
  2. 2
      scripts/restore
  3. 22
      scripts/upgrade

4
scripts/install

@ -83,7 +83,7 @@ ynh_add_nginx_config
# CREATE DEDICATED USER
#=================================================
# Create a standart user (not a system user for sftp)
# Create a standard user (not a system user for sftp)
ynh_system_user_exists "$user" || \
useradd -d "$final_path" -M --user-group "$user"
# Add the password to this user
@ -140,7 +140,7 @@ cp -r ../sources "$final_path"
# Set permissions to app files
chown -R $user: "$final_path"
# Home directory of the user need to be owned by root to allow
# Home directory of the user needs to be owned by root to allow
# SFTP connections
chown root: "$final_path"

2
scripts/restore

@ -66,7 +66,7 @@ fi
# RECREATE THE DEDICATED USER
#=================================================
# Create a standart user (not a system user for sftp)
# Create a standard user (not a system user for sftp)
ynh_system_user_exists "$user" || \
useradd -d "$final_path" -M --user-group "$user"
# Add the password to this user

22
scripts/upgrade

@ -29,7 +29,7 @@ user=$(ynh_app_setting_get $app user)
([[ -n "$with_mysql" ]] && [[ -n "$password" ]] && [[ -n "$user" ]]) \
|| ynh_die "The app changed and can not be automatically upgraded. \
You will have to manually upgrade it following those instructions: \
You will have to manually upgrade it following these instructions: \
https://github.com/YunoHost-Apps/my_webapp_ynh#upgrade"
#=================================================
@ -76,15 +76,15 @@ is_checksum_different () {
local checksum_value=$(ynh_app_setting_get $app $checksum_setting_name)
if [ -n "$checksum_value" ]
then # Proceed only if a value was stored into the app settings
if ! echo "$checksum_value $file" | sudo md5sum -c --status
then # If the checksum is now different
echo "File $file has been manually modified since the installation or last upgrade. So it will be not replace." >&2
echo "1"
else
echo "0"
fi
if ! echo "$checksum_value $file" | sudo md5sum -c --status
then # If the checksum is now different
echo "File $file has been manually modified since the installation or last upgrade. So it will not be replaced." >&2
echo "1"
else
echo "0"
fi
else
echo "0"
echo "0"
fi
}
@ -102,7 +102,7 @@ fi
# CREATE DEDICATED USER
#=================================================
# Create a standart user (not a system user for sftp)
# Create a standard user (not a system user for sftp)
ynh_system_user_exists "$user" || \
useradd -d "$final_path" -M --user-group "$user"
# Add the password to this user
@ -146,7 +146,7 @@ systemctl reload ssh
# SECURE FILES AND DIRECTORIES
#=================================================
# Home directory of the user need to be owned by root to allow
# Home directory of the user needs to be owned by root to allow
# SFTP connections
chown root: "$final_path"

Loading…
Cancel
Save