mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
41 lines
No EOL
995 B
Bash
41 lines
No EOL
995 B
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# COMMON VARIABLES
|
|
#=================================================
|
|
|
|
# dependencies used by the app
|
|
pkg_dependencies="postgresql postgresql-contrib apt-transport-https"
|
|
|
|
nodejs_version=12
|
|
|
|
# Dependencies for AbiWord
|
|
abiword_app_depencencies="abiword"
|
|
|
|
# Dependencies for LibreOffice
|
|
libreoffice_app_dependencies="unoconv libreoffice-writer"
|
|
|
|
#=================================================
|
|
# 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
|
|
} |