mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
* Apply last example_ynh (#117) * Apply last example_ynh * Cleanup backup * Create DISCLAIMER.md * Create DISCLAIMER_fr.md * Auto-update README * Add files via upload * Fix heading size * Auto-update README * Fix heading size * Auto-update README * Fix charset * Auto-update README * Update check_process * 2.4.3 (#125) * Upgrade to 2.4.2~ynh1 * Fix craue_config_setting * Upgrade to 2.4.3~ynh1 * Upgrade to 2.4.3~ynh1 * Auto-update README Co-authored-by: yalh76 <yalh@yahoo.com> Co-authored-by: Yunohost-Bot <> * Specify PHP version in every calls (#132) * Specify PHP version in every calls * Switch (back) to php7.4 * Add PHP-xml dependency for DOM extension Co-authored-by: lapineige <lapineige@users.noreply.github.com> * Auto-update README * Fix php version reference (#136) * Auto-update README * Use YNH_PHP_VERSION * Proper YNH_PHP_VERSION syntax * Proper YNH_PHP_VERSION syntax : typo * YNH_PHP_VERSION: fix missing change * Fix phpversion → YNH_PHP_VERSION Co-authored-by: yalh76 <yalh@yahoo.com> Co-authored-by: Yunohost-Bot <> Co-authored-by: tituspijean <tituspijean@outlook.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org>
43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# COMMON VARIABLES
|
|
#=================================================
|
|
|
|
YNH_PHP_VERSION="7.4"
|
|
|
|
# dependencies used by the app
|
|
pkg_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-tidy php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gettext php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-xml"
|
|
|
|
#=================================================
|
|
# PERSONAL HELPERS
|
|
#=================================================
|
|
|
|
function set_permissions {
|
|
# Set permissions to app files
|
|
chown -R $app:www-data $final_path
|
|
chmod -R g=u,g-w,o-rwx $final_path
|
|
|
|
# Restrict rights to Wallabag user only
|
|
chmod 600 $wb_conf
|
|
if [ -e $final_path/var/cache/prod/appProdProjectContainer.php ]; then
|
|
chmod 700 $final_path/var/cache/prod/appProdProjectContainer.php
|
|
fi
|
|
}
|
|
|
|
#=================================================
|
|
# EXPERIMENTAL HELPERS
|
|
#=================================================
|
|
|
|
# Execute a command as another user
|
|
# usage: exec_as USER COMMAND [ARG ...]
|
|
ynh_exec_as() {
|
|
local USER=$1
|
|
shift 1
|
|
|
|
if [[ $USER = $(whoami) ]]; then
|
|
eval "$@"
|
|
else
|
|
sudo -u "$USER" "$@"
|
|
fi
|
|
}
|