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

40 lines
1.1 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
#=================================================
#=================================================
# 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
}