2020-10-20 13:46:23 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# COMMON VARIABLES
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# dependencies used by the app
|
2020-10-20 14:05:43 +02:00
|
|
|
pkg_dependencies="postgresql postgresql-contrib apt-transport-https"
|
2020-10-20 13:46:23 +02:00
|
|
|
|
2020-12-23 23:10:48 +01:00
|
|
|
nodejs_version=12
|
2020-10-20 13:46:23 +02:00
|
|
|
|
2020-12-23 23:33:29 +01:00
|
|
|
# Dependencies for AbiWord
|
|
|
|
abiword_app_depencencies="abiword"
|
|
|
|
|
|
|
|
# Dependencies for LibreOffice
|
|
|
|
libreoffice_app_dependencies="unoconv libreoffice-writer"
|
|
|
|
|
2020-10-20 13:46:23 +02:00
|
|
|
#=================================================
|
|
|
|
# PERSONAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# EXPERIMENTAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# FUTURE OFFICIAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# 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
|
|
|
|
}
|