Fix access to var directory

Fix cron file EOL
Fix access rights when restoring
This commit is contained in:
Jimmy Monin 2016-09-18 11:09:39 +02:00
parent 57708e3169
commit a7c054b535
5 changed files with 3 additions and 21 deletions

View File

@ -10,7 +10,6 @@ app=$YNH_APP_INSTANCE_NAME
source /usr/share/yunohost/helpers
# Backup sources & data
# Note: the last argument is where to save this path, see the restore script.
ynh_backup "/var/www/${app}" "sources"
# Dump the database

View File

@ -3,16 +3,6 @@
# Exit on command errors and treat unset variables as an error
set -eu
# This is a multi-instance app, meaning it can be installed several times independently
# The id of the app as stated in the manifest is available as $YNH_APP_ID
# The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
# The app instance name is available as $YNH_APP_INSTANCE_NAME
# - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample
# - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2
# - ynhexample__{N} for the subsequent installations, with N=3,4, ...
# The app instance name is probably what you are interested the most, since this is
# guaranteed to be unique. This is a good unique identifier to define installation path,
# db names, ...
app=$YNH_APP_INSTANCE_NAME
# Retrieve arguments
@ -37,8 +27,8 @@ sudo mkdir -p $src_path/var
sudo cp -a ../sources/. $src_path
# Set permissions to app files
# you may need to make some file and/or directory writeable by www-data (nginx user)
sudo chown -R root: $src_path
sudo chown -R www-data: $src_path/var
# Generate MySQL password and create database
dbuser=$app

View File

@ -1,6 +1,5 @@
#!/bin/bash
# See comments in install script
app=$YNH_APP_INSTANCE_NAME
# Source YunoHost helpers
@ -15,12 +14,6 @@ sudo rm -rf /var/www/$app
# Remove nginx configuration file
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
### PHP (remove if not used) ###
# If a dedicated php-fpm process is used:
# sudo rm -f /etc/php5/fpm/pool.d/$app.conf
# sudo service php5-fpm reload
### PHP end ###
# Drop MySQL database and user
dbname=$app
dbuser=$app

View File

@ -22,8 +22,8 @@ src_path="/var/www/${app}"
sudo cp -a ./sources "$src_path"
# Restore permissions to app files
# you may need to make some file and/or directory writeable by www-data (nginx user)
sudo chown -R root: "$src_path"
sudo chown -R www-data: "$src_path/var"
# Create and restore the database
dbname=$app