fix permissions
This commit is contained in:
parent
e827fbe4a8
commit
b8c794784b
4 changed files with 13 additions and 10 deletions
|
|
@ -61,7 +61,6 @@ ram.runtime = "500M"
|
|||
allow_email = true
|
||||
|
||||
[resources.install_dir]
|
||||
group = "www-data:r-x"
|
||||
|
||||
[resources.permissions]
|
||||
main.url = "/"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ ynh_script_progression "Setting up source files..."
|
|||
|
||||
ynh_setup_source --dest_dir="$install_dir/live"
|
||||
|
||||
chmod -R 775 "$install_dir"
|
||||
chmod o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
|
|
|||
|
|
@ -83,14 +83,14 @@ ynh_nodejs_install
|
|||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed
|
||||
if ynh_app_upstream_version_changed
|
||||
then
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir/live" --full_replace --keep="public/system .env.production"
|
||||
fi
|
||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir/live" --full_replace --keep="public/system .env.production"
|
||||
|
||||
chmod -R 775 "$install_dir"
|
||||
chmod o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BUILD ASSETS
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@ ynh_add_swap () {
|
|||
# Can't swap inside an LXD
|
||||
if [ "$(systemd-detect-virt)" == "lxc" ]
|
||||
then
|
||||
ynh_print_warn --message="You are inside a LXC container, swap will not be added, but that can cause troubles for the app $app. Please make sure you have more than 2.5G available RAM."
|
||||
ynh_print_warn "You are inside a LXC container, swap will not be added, but that can cause troubles for the app $app. Please make sure you have more than 2.5G available RAM."
|
||||
return
|
||||
fi
|
||||
|
||||
# Swap on SD card only if it's is specified
|
||||
if ynh_is_main_device_a_sd_card && [ "$SD_CARD_CAN_SWAP" == "0" ]
|
||||
then
|
||||
ynh_print_warn --message="The main mountpoint of your system '/' is on an SD card, swap will not be added to prevent some damage of this one, but that can cause troubles for the app $app. If you still want activate the swap, you can relaunch the command preceded by 'SD_CARD_CAN_SWAP=1'"
|
||||
ynh_print_warn "The main mountpoint of your system '/' is on an SD card, swap will not be added to prevent some damage of this one, but that can cause troubles for the app $app. If you still want activate the swap, you can relaunch the command preceded by 'SD_CARD_CAN_SWAP=1'"
|
||||
return
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue