1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

Merge pull request #75 from labriqueinternet/testing

Testing: fix permission issue
This commit is contained in:
Alexandre Aubin 2021-05-13 16:27:28 +02:00 committed by GitHub
commit 881a80a1c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 4 deletions

View file

@ -7,7 +7,7 @@
"fr": "Créer et configurer des réseaux wifi, partager l'accès a Internet et utiliser les applications Yunohost via wifi" "fr": "Créer et configurer des réseaux wifi, partager l'accès a Internet et utiliser les applications Yunohost via wifi"
}, },
"url": "https://github.com/labriqueinternet/hotspot_ynh", "url": "https://github.com/labriqueinternet/hotspot_ynh",
"version": "1.2.0~ynh3", "version": "1.2.0~ynh4",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"maintainer": { "maintainer": {
"name": "Julien Vaubourg", "name": "Julien Vaubourg",

View file

@ -215,9 +215,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
mkdir -pm 0755 ${final_path}/ mkdir -pm 0755 ${final_path}/
cp -a ../sources/* ${final_path}/ cp -a ../sources/* ${final_path}/
chown -R $app: ${final_path}/ chown -R $app:$app ${final_path}/
chmod -R 0644 ${final_path}/* chmod -R 0644 ${final_path}/*
find ${final_path}/ -type d -exec chmod +x {} \; find ${final_path}/ -type d -exec chmod +x {} \;
chmod o-rwx ${final_path}
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -249,6 +250,7 @@ echo "DAEMON_CONF=/etc/hostapd/hostapd.conf" > /etc/default/hostapd
# Apply configuration # Apply configuration
ynh_add_config --template="config.php.tpl" --destination="$final_path/config.php" ynh_add_config --template="config.php.tpl" --destination="$final_path/config.php"
chown $app:$app "$final_path/config.php"
# Set default inits # Set default inits
# The boot order of these services are important, so they are disabled by default # The boot order of these services are important, so they are disabled by default

View file

@ -97,7 +97,10 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Restoring user rights..." ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files # Restore permissions on app files
chown -R $app: $final_path chown -R $app:$app ${final_path}/
chmod -R 0644 ${final_path}/*
find ${final_path}/ -type d -exec chmod +x {} \;
chmod o-rwx ${final_path}
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE THE PHP-FPM CONFIGURATION

View file

@ -163,6 +163,7 @@ ynh_replace_string --match_string="__PHPVERSION__" --replace_string="${phpversio
ynh_script_progression --message="Modifying a config file..." ynh_script_progression --message="Modifying a config file..."
ynh_add_config --template="config.php.tpl" --destination="$final_path/config.php" ynh_add_config --template="config.php.tpl" --destination="$final_path/config.php"
chown $app:$app "$final_path/config.php"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
@ -180,9 +181,10 @@ ynh_add_systemd_config --service=$service_name
ynh_script_progression --message="Securing files and directories..." ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files # Set permissions on app files
chown -R $app: ${final_path}/ chown -R $app:$app ${final_path}/
chmod -R 0644 ${final_path}/* chmod -R 0644 ${final_path}/*
find ${final_path}/ -type d -exec chmod +x {} \; find ${final_path}/ -type d -exec chmod +x {} \;
chmod o-rwx "${final_path}"
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST