1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
movim_ynh/scripts/_common.sh

45 lines
1.2 KiB
Bash
Raw Normal View History

2018-08-10 14:59:24 +02:00
#!/bin/bash
2020-07-24 12:31:07 +02:00
#=================================================
# COMMON VARIABLES
#=================================================
# dependencies used by the app
2020-07-24 19:08:00 +02:00
pkg_dependencies="postgresql postgresql-contrib apt-transport-https"
#composer
2020-07-24 18:32:57 +02:00
2020-09-16 21:18:58 +02:00
YNH_PHP_VERSION="7.3"
2020-07-24 18:32:57 +02:00
extra_php_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-xml"
2020-07-24 12:31:07 +02:00
#=================================================
# PERSONAL HELPERS
#=================================================
2020-09-17 19:35:57 +02:00
undo_sso_patch() {
(
cd $final_path
patch -p1 -R < $YNH_CWD/../sources/patches/app-00-sso-logout.patch
)
}
2020-07-24 12:31:07 +02:00
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
2020-09-17 10:25:34 +02:00
# Execute a command as another user
# usage: ynh_exec_as USER COMMAND [ARG ...]
ynh_exec_as() {
local USER=$1
shift 1
if [[ $USER = $(whoami) ]]; then
eval "$@"
else
sudo -u "$USER" "$@"
fi
}