mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Move exec_occ to common.sh
This commit is contained in:
parent
e942be4961
commit
ee2b79ac13
2 changed files with 9 additions and 9 deletions
|
@ -1,11 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# COMMON VARIABLES
|
||||
# COMMON FUCTIONS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
# 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
|
||||
|
@ -20,6 +24,8 @@ local mount_id=$(exec_occ files_external:create --output=json \
|
|||
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
||||
# Check if an URL is already handled
|
||||
|
|
|
@ -79,12 +79,6 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
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
|
||||
chown -R $app: "$install_dir" "$data_dir"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue