diff --git a/scripts/_common.sh b/scripts/_common.sh index 3d62fc4..4966b58 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -32,7 +32,7 @@ mariadb-to-pg() { pushd $install_dir ynh_systemd_action --service_name="$app" --action="stop" set +e - sudo -u mattermost timeout --preserve-status 300 "./bin/mattermost" + sudo -u $app timeout --preserve-status 300 "./bin/mattermost" if [ "$?" != "0" ] && [ "$?" != "143" ] ; then ynh_die --message="Failed to run Mattermost to create PostgreSQL database tables" --ret_code=1 fi