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
2018-08-10 17:27:41 +02:00

27 lines
532 B
Bash

#!/bin/bash
#
# Common variables
#
# App package root directory should be the parent folder
PKGDIR=$(cd ../; pwd)
#
# Common helpers
#
# Execute a command as movim user in the destination directory
# usage: exec_cmd COMMAND [ARG ...]
exec_cmd() {
(cd "$final_path" \
&& sudo sudo -u movim "$@")
}
# Undo the SSO patch to Movim source code (applied by default with ynh_setup_source)
# usage: undo_sso_patch
undo_sso_patch() {
(
cd $final_path
patch -p1 -R < $YNH_CWD/../sources/patches/app-00-sso-logout.patch
)
}