mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
cleaning
This commit is contained in:
parent
ee2b79ac13
commit
b6091c4f70
3 changed files with 25 additions and 8 deletions
|
@ -4,14 +4,6 @@
|
||||||
# COMMON FUCTIONS
|
# COMMON FUCTIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Define a function to execute commands with `occ`
|
|
||||||
exec_occ() {
|
|
||||||
(cd "$install_dir" && ynh_exec_as "$app" \
|
|
||||||
php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Define a function to add an external storage
|
# Define a function to add an external storage
|
||||||
# Create the external storage for the given folders and enable sharing
|
# Create the external storage for the given folders and enable sharing
|
||||||
create_external_storage() {
|
create_external_storage() {
|
||||||
|
|
|
@ -79,6 +79,12 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing $app..." --weight=30
|
ynh_script_progression --message="Installing $app..." --weight=30
|
||||||
|
|
||||||
|
# Define a function to execute commands with `occ`
|
||||||
|
exec_occ() {
|
||||||
|
(cd "$install_dir" && ynh_exec_as "$app" \
|
||||||
|
php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
||||||
|
}
|
||||||
|
|
||||||
# Set write access for the following commands
|
# Set write access for the following commands
|
||||||
chown -R $app: "$install_dir" "$data_dir"
|
chown -R $app: "$install_dir" "$data_dir"
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,25 @@ exec_occ() {
|
||||||
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Define a function to execute commands with `occ`
|
||||||
|
exec_occ() {
|
||||||
|
# Backward compatibility to upgrade from older versions
|
||||||
|
if [ $current_major_version = "last" ]
|
||||||
|
then
|
||||||
|
NEXTCLOUD_PHP_VERSION=$phpversion
|
||||||
|
elif [ $current_major_version -ge 24 ]
|
||||||
|
then
|
||||||
|
NEXTCLOUD_PHP_VERSION="8.0"
|
||||||
|
elif [ $current_major_version -ge 15 ]
|
||||||
|
then
|
||||||
|
NEXTCLOUD_PHP_VERSION="7.4"
|
||||||
|
else
|
||||||
|
NEXTCLOUD_PHP_VERSION="7.0"
|
||||||
|
fi
|
||||||
|
(cd "$install_dir" && ynh_exec_as "$app" \
|
||||||
|
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
||||||
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# HANDLE DATABASE MIGRATION
|
# HANDLE DATABASE MIGRATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue