2012-03-05 08:18:35 +08:00
|
|
|
#!/bin/bash
|
2011-08-26 06:47:03 +08:00
|
|
|
#
|
2013-01-27 22:44:40 +08:00
|
|
|
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
2011-08-26 06:47:03 +08:00
|
|
|
#
|
2013-01-27 22:44:40 +08:00
|
|
|
# Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
2011-08-26 06:47:03 +08:00
|
|
|
#
|
2013-01-27 22:44:40 +08:00
|
|
|
# This program is free software; you can redistribute it and/or modify it under the
|
2011-08-26 06:47:03 +08:00
|
|
|
# terms of the GNU Lesser General Public License as published by the Free Software
|
2013-01-27 22:44:40 +08:00
|
|
|
# Foundation; either version 3.0 of the License, or (at your option) any later
|
2011-08-26 06:47:03 +08:00
|
|
|
# version.
|
|
|
|
#
|
|
|
|
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
|
|
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License along
|
|
|
|
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
# Author(s):
|
|
|
|
# Fred Dixon <ffdixon@bigbluebutton.org>
|
2013-01-27 22:44:40 +08:00
|
|
|
# Gustavo Salazar <guga.salazar.loor@gmail.com>
|
2016-09-27 18:46:38 +08:00
|
|
|
# Ghazi Triki <ghazi.nocturne@gmail.com>
|
2011-08-26 06:47:03 +08:00
|
|
|
#
|
|
|
|
# Changelog:
|
|
|
|
# 2011-08-18 FFD Inital Version
|
2011-11-20 22:33:55 +08:00
|
|
|
# 2011-11-20 FFD Added more checks for processing of recording
|
2012-01-06 06:07:34 +08:00
|
|
|
# 2012-01-04 GUG Add option to check for errors
|
2012-02-28 00:40:35 +08:00
|
|
|
# 2012-02-27 GUG Add option to delete one meeting and recording
|
2012-08-14 05:25:57 +08:00
|
|
|
# 2012-08-13 GUG Republish recording
|
2012-10-23 05:13:16 +08:00
|
|
|
# 2012-10-22 FFD Use combination of /var/bigbluebutton and /var/bigbluebutton/recording/raw
|
|
|
|
# to get the list of recent recordings for bbb-record --watch
|
2013-04-06 06:37:05 +08:00
|
|
|
# 2013-04-03 GUG Enable/Disable a recording workflow
|
|
|
|
# 2013-04-05 GUG Description is optional in bbb-record --watch
|
|
|
|
# 2013-04-05 GUG Map internal meeting id with external meeting id
|
2017-03-29 01:30:07 +08:00
|
|
|
# 2016-07-02 FFD Updates for 1.1-beta
|
2016-10-17 16:08:29 +08:00
|
|
|
# 2016-10-17 GTR Stricter rule for detection of recording directories names
|
2017-03-29 01:30:07 +08:00
|
|
|
# 2017-04-28 FFD Updated references to systemd processing units
|
2019-05-14 04:59:08 +08:00
|
|
|
# 2019-05-13 GTR Delete caption files
|
2019-08-30 22:37:18 +08:00
|
|
|
# 2019-08-30 GTR Count SVG slides fallaback
|
|
|
|
|
2011-08-26 06:47:03 +08:00
|
|
|
|
2012-08-22 08:43:31 +08:00
|
|
|
#set -e
|
2011-08-26 06:47:03 +08:00
|
|
|
#set -x
|
|
|
|
|
|
|
|
BASE=/var/bigbluebutton/recording
|
|
|
|
STATUS=$BASE/status
|
2012-02-28 23:06:29 +08:00
|
|
|
source /etc/bigbluebutton/bigbluebutton-release
|
2011-08-26 06:47:03 +08:00
|
|
|
|
2019-02-09 00:53:57 +08:00
|
|
|
BBB_WEB=$(cat /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties | sed -n '/^bigbluebutton.web.serverURL/{s/.*\///;p}')
|
2012-09-13 02:52:36 +08:00
|
|
|
|
2011-11-20 22:33:55 +08:00
|
|
|
RECORDING_DIR=$(cat /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml | sed -n '/\(recording_dir\)/{s/.*recording_dir:[ ]*//;s/;//;p}')
|
|
|
|
PUBLISHED_DIR=$(cat /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml | sed -n '/\(published_dir\)/{s/.*published_dir:[ ]*//;s/;//;p}')
|
|
|
|
RAW_AUDIO_SRC=$(cat /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml | sed -n '/\(raw_audio_src\)/{s/.*raw_audio_src:[ ]*//;s/;//;p}')
|
|
|
|
RAW_VIDEO_SRC=$(cat /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml | sed -n '/\(raw_video_src\)/{s/.*raw_video_src:[ ]*//;s/;//;p}')
|
2016-07-03 05:57:49 +08:00
|
|
|
RAW_SCREENSHARE_SRC=$(cat /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml | sed -n '/\(raw_screenshare_src\)/{s/.*raw_screenshare_src:[ ]*//;s/;//;p}')
|
2011-11-20 22:33:55 +08:00
|
|
|
RAW_PRESENTATION_SRC=$(cat /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml | sed -n '/\(raw_presentation_src\)/{s/.*raw_presentation_src:[ ]*//;s/;//;p}')
|
|
|
|
|
2011-08-31 04:12:37 +08:00
|
|
|
TYPES=$(cd /usr/local/bigbluebutton/core/scripts/process; ls *.rb | sed s/.rb//g)
|
|
|
|
|
|
|
|
mark_for_rebuild() {
|
|
|
|
MEETING_ID=$1
|
2013-09-24 06:36:53 +08:00
|
|
|
echo "Marking for rebuild $MEETING_ID"
|
2014-07-21 23:36:40 +08:00
|
|
|
if [[ ! -d $BASE/raw/$MEETING_ID ]]; then
|
|
|
|
echo "Raw files for $MEETING_ID do not exist, can't rebuild"
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-04-15 06:14:14 +08:00
|
|
|
|
2015-03-11 23:14:55 +08:00
|
|
|
# Clear out the relevant done files
|
|
|
|
rm -vf $STATUS/archived/$MEETING_ID.norecord
|
|
|
|
rm -vf $STATUS/sanity/$MEETING_ID*
|
|
|
|
rm -vf $STATUS/processed/$MEETING_ID*
|
|
|
|
rm -vf $STATUS/published/$MEETING_ID*
|
2011-09-01 05:45:38 +08:00
|
|
|
|
2015-03-11 23:14:55 +08:00
|
|
|
# Remove the existing 'published' recording files
|
2014-07-21 23:36:40 +08:00
|
|
|
for type in $TYPES; do
|
2015-03-11 23:14:55 +08:00
|
|
|
rm -rf /var/bigbluebutton/published/$type/$MEETING_ID
|
|
|
|
rm -rf /var/bigbluebutton/unpublished/$type/$MEETING_ID
|
2016-02-17 04:14:46 +08:00
|
|
|
rm -rf /var/bigbluebutton/deleted/$type/$MEETING_ID
|
2011-08-31 04:12:37 +08:00
|
|
|
done
|
2014-07-21 23:36:40 +08:00
|
|
|
|
|
|
|
# Restart processing at the 'archived' step
|
|
|
|
touch $STATUS/archived/$MEETING_ID.done
|
2011-08-31 04:12:37 +08:00
|
|
|
}
|
|
|
|
|
2012-08-14 05:25:57 +08:00
|
|
|
mark_for_republish() {
|
|
|
|
MEETING_ID=$1
|
2015-03-11 23:16:17 +08:00
|
|
|
echo "Marking for republish $MEETING_ID"
|
|
|
|
if [[ ! -d $BASE/process/$MEETING_ID ]]; then
|
|
|
|
echo "Processed files for $MEETING_ID do not exist, can't republish"
|
|
|
|
echo "Try rebuilding the recording instead."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Clear out the publish done files
|
|
|
|
rm -vf $STATUS/published/$MEETING_ID*
|
|
|
|
|
|
|
|
# Remove the existing 'published' recording files
|
|
|
|
for type in $TYPES; do
|
|
|
|
rm -rf /var/bigbluebutton/published/$type/$MEETING_ID
|
|
|
|
rm -rf /var/bigbluebutton/unpublished/$type/$MEETING_ID
|
2016-02-17 04:14:46 +08:00
|
|
|
rm -rf /var/bigbluebutton/deleted/$type/$MEETING_ID
|
2012-08-14 05:25:57 +08:00
|
|
|
done
|
2015-03-11 23:16:17 +08:00
|
|
|
|
|
|
|
# Restart processing at the 'processed' step
|
2015-03-11 23:01:53 +08:00
|
|
|
touch $STATUS/processed/$MEETING_ID.done
|
2012-08-14 05:25:57 +08:00
|
|
|
}
|
|
|
|
|
2011-08-26 06:47:03 +08:00
|
|
|
need_root() {
|
|
|
|
if [ $EUID != 0 ]; then
|
|
|
|
echo "Need to be root to run this option"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-11-17 06:58:47 +08:00
|
|
|
need_root_or_bigbluebutton() {
|
2020-11-30 20:44:10 +08:00
|
|
|
if [ $EUID != 0 -a "$USER" != 'bigbluebutton' ]; then
|
2020-11-17 06:58:47 +08:00
|
|
|
echo "Need to be user root or bigbluebutton to run this option"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-02-27 04:00:37 +08:00
|
|
|
print_header() {
|
|
|
|
if [ ! $HEADER ]; then
|
|
|
|
echo
|
|
|
|
echo "** Potential problems described below **"
|
|
|
|
HEADER=1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2011-08-26 06:47:03 +08:00
|
|
|
usage() {
|
2012-02-28 23:06:29 +08:00
|
|
|
echo "BigBlueButton Recording Diagnostic Utility (BigBlueButton Version $BIGBLUEBUTTON_RELEASE)"
|
2011-08-26 06:47:03 +08:00
|
|
|
echo
|
|
|
|
echo " bbb-record [options]"
|
|
|
|
echo
|
2011-09-10 21:35:32 +08:00
|
|
|
echo "Reporting:"
|
2013-09-24 06:36:53 +08:00
|
|
|
echo " --list List all recordings"
|
2011-09-10 21:35:32 +08:00
|
|
|
echo
|
2011-08-26 06:47:03 +08:00
|
|
|
echo "Monitoring:"
|
2013-04-06 06:37:05 +08:00
|
|
|
echo " --watch Watch processing of recordings"
|
|
|
|
echo " --watch --withDesc Watch processing of recordings and show their description"
|
2012-08-22 09:05:22 +08:00
|
|
|
echo
|
|
|
|
echo "Administration:"
|
2013-09-24 06:36:53 +08:00
|
|
|
echo " --rebuild <internal meetingID> rebuild the output for the given internal meetingID"
|
|
|
|
echo " --rebuildall rebuild every recording"
|
|
|
|
echo " --delete <internal meetingID> delete one meeting and recording"
|
2013-05-10 07:49:08 +08:00
|
|
|
echo " --deleteall delete all meetings and recordings"
|
2013-04-06 06:37:05 +08:00
|
|
|
echo " --debug check for recording errors"
|
|
|
|
echo " --check check for configuration errors"
|
2013-09-24 05:51:46 +08:00
|
|
|
echo " --enable <workflow> enable a recording workflow"
|
|
|
|
echo " --disable <workflow> disable a recording workflow"
|
2013-09-24 06:36:53 +08:00
|
|
|
echo " --tointernal <external meetingId> get the internal meeting ids for the given external meetingId"
|
|
|
|
echo " --toexternal <internal meetingId> get the external meeting id for the given internal meetingId"
|
2013-09-24 07:15:07 +08:00
|
|
|
echo " --republish <internal meetingID> republish the recording for meetingID. (Only for Matterhorn Integration)"
|
2013-09-24 06:36:53 +08:00
|
|
|
#echo " --rearchive [meetingId] rearchive the recording (created before a restart)"
|
2011-08-26 06:47:03 +08:00
|
|
|
echo
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Parse the parameters
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
if [ "$1" = "-watch" -o "$1" = "--watch" ]; then
|
|
|
|
WATCH=1
|
2013-04-06 04:57:34 +08:00
|
|
|
if [ "$2" = "--withDesc" ]; then
|
|
|
|
WITHDESC=1
|
|
|
|
shift
|
|
|
|
fi
|
2011-08-26 06:47:03 +08:00
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
2011-09-10 21:35:32 +08:00
|
|
|
if [ "$1" = "-list" -o "$1" = "--list" ]; then
|
|
|
|
LIST=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
2017-03-29 01:30:07 +08:00
|
|
|
if [ "$1" = "--list-recent" ]; then
|
2011-09-10 21:35:32 +08:00
|
|
|
LIST=1
|
2017-03-29 01:30:07 +08:00
|
|
|
HEAD=10
|
2013-04-06 04:57:34 +08:00
|
|
|
if [ "$2" ]; then
|
|
|
|
WITHDESC=1
|
|
|
|
shift
|
|
|
|
fi
|
2011-09-10 21:35:32 +08:00
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
2011-08-26 06:47:03 +08:00
|
|
|
if [ "$1" = "-rebuild" -o "$1" = "--rebuild" ]; then
|
|
|
|
need_root
|
2011-08-31 04:12:37 +08:00
|
|
|
if [ ! -z "${2}" ]; then
|
|
|
|
MEETING_ID="${2}"
|
|
|
|
shift
|
|
|
|
fi
|
2011-08-26 06:47:03 +08:00
|
|
|
REBUILD=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
2013-09-24 06:36:53 +08:00
|
|
|
if [ "$1" = "-rebuildall" -o "$1" = "--rebuildall" ]; then
|
|
|
|
need_root
|
|
|
|
if [ ! -z "${2}" ]; then
|
|
|
|
MEETING_ID="${2}"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
REBUILDALL=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
2012-08-14 05:25:57 +08:00
|
|
|
|
|
|
|
if [ "$1" = "-republish" -o "$1" = "--republish" ]; then
|
|
|
|
need_root
|
|
|
|
if [ ! -z "${2}" ]; then
|
|
|
|
MEETING_ID="${2}"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
REPUBLISH=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
2012-02-28 00:40:35 +08:00
|
|
|
|
2012-08-14 05:25:57 +08:00
|
|
|
if [ "$1" = "-delete" -o "$1" = "--delete" ]; then
|
2020-11-17 06:58:47 +08:00
|
|
|
need_root_or_bigbluebutton
|
2012-02-28 00:40:35 +08:00
|
|
|
if [ ! -z "${2}" ]; then
|
|
|
|
MEETING_ID="${2}"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
DELETE=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2011-09-01 02:55:20 +08:00
|
|
|
if [ "$1" = "-deleteall" -o "$1" = "--deleteall" ]; then
|
2011-08-26 06:47:03 +08:00
|
|
|
need_root
|
2011-09-01 02:55:20 +08:00
|
|
|
DELETEALL=1
|
2011-08-26 06:47:03 +08:00
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
2012-01-06 06:07:34 +08:00
|
|
|
if [ "$1" = "-check" -o "$1" = "--check" ]; then
|
|
|
|
need_root
|
|
|
|
CHECK=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
2011-11-22 01:20:31 +08:00
|
|
|
|
2012-02-27 04:00:37 +08:00
|
|
|
if [ "$1" = "-debug" -o "$1" = "--debug" ]; then
|
|
|
|
need_root
|
|
|
|
DEBUG=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2012-08-22 09:05:22 +08:00
|
|
|
if [ "$1" = "-clean" -o "$1" = "--clean" ]; then
|
|
|
|
need_root
|
|
|
|
CLEAN=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2013-04-04 07:00:47 +08:00
|
|
|
if [ "$1" = "-disable" -o "$1" = "--disable" ]; then
|
|
|
|
need_root
|
|
|
|
if [ ! -z "${2}" ]; then
|
|
|
|
WORKFLOW="${2}"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
DISABLE=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" = "-enable" -o "$1" = "--enable" ]; then
|
|
|
|
need_root
|
|
|
|
if [ ! -z "${2}" ]; then
|
|
|
|
WORKFLOW="${2}"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
ENABLE=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2013-04-06 06:37:05 +08:00
|
|
|
if [ "$1" = "-toexternal" -o "$1" = "--toexternal" ]; then
|
|
|
|
need_root
|
|
|
|
if [ ! -z "${2}" ]; then
|
|
|
|
INTERNAL_MEETINGID="${2}"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
TOEXTERNAL=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" = "-tointernal" -o "$1" = "--tointernal" ]; then
|
|
|
|
need_root
|
|
|
|
if [ ! -z "${2}" ]; then
|
|
|
|
EXTERNAL_MEETINGID="${2}"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
TOINTERNAL=1
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2013-04-06 04:57:34 +08:00
|
|
|
# if [ "$1" = "-rearchive" -o "$1" = "--rearchive" ]; then
|
|
|
|
# need_root
|
|
|
|
# if [ ! -z "${2}" ]; then
|
|
|
|
# MEETING_ID="${2}"
|
|
|
|
# shift
|
|
|
|
# fi
|
|
|
|
# REARCHIVE=1
|
|
|
|
# shift
|
|
|
|
# continue
|
|
|
|
# fi
|
2013-04-04 08:13:02 +08:00
|
|
|
|
2011-08-26 06:47:03 +08:00
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $REBUILD ]; then
|
2011-08-31 04:12:37 +08:00
|
|
|
if [ -z "$MEETING_ID" ]; then
|
2013-09-24 06:36:53 +08:00
|
|
|
echo "Pass an internal meeting id as parameter."
|
2011-08-31 04:12:37 +08:00
|
|
|
else
|
2011-11-20 22:33:55 +08:00
|
|
|
mark_for_rebuild $MEETING_ID
|
2012-08-14 05:25:57 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-09-24 06:36:53 +08:00
|
|
|
if [ $REBUILDALL ]; then
|
|
|
|
echo "Rebuilding all recordings"
|
|
|
|
for recording in $(dir $BASE/raw); do
|
2019-11-21 03:30:31 +08:00
|
|
|
[[ ! -e $STATUS/archived/$recording.norecord ]] && mark_for_rebuild $recording
|
2013-09-24 06:36:53 +08:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2012-08-14 05:25:57 +08:00
|
|
|
if [ $REPUBLISH ]; then
|
|
|
|
if [ -z "$MEETING_ID" ]; then
|
|
|
|
#
|
|
|
|
# Republish all meetings
|
|
|
|
#
|
|
|
|
for recording in $(dir $BASE/raw); do
|
|
|
|
echo "Marking for republish: $recording"
|
|
|
|
mark_for_republish $recording
|
|
|
|
done
|
|
|
|
else
|
|
|
|
echo "Marking for republish: $MEETING_ID"
|
|
|
|
mark_for_republish $MEETING_ID
|
2011-08-31 04:12:37 +08:00
|
|
|
fi
|
|
|
|
fi
|
2011-08-26 06:47:03 +08:00
|
|
|
|
2012-08-22 09:05:22 +08:00
|
|
|
if [ $CLEAN ]; then
|
2014-09-02 04:53:57 +08:00
|
|
|
sudo /etc/init.d/bbb-record-core stop
|
2012-08-22 09:05:22 +08:00
|
|
|
for type in $TYPES; do
|
|
|
|
echo " clearning logs in /var/log/bigbluebutton/$type"
|
|
|
|
find /var/log/bigbluebutton/$type -name "*.log" -exec sudo rm '{}' \;
|
|
|
|
done
|
2014-09-02 04:53:57 +08:00
|
|
|
sudo /etc/init.d/bbb-record-core start
|
2012-08-22 09:05:22 +08:00
|
|
|
fi
|
|
|
|
|
2012-02-28 00:40:35 +08:00
|
|
|
if [ $DELETE ]; then
|
2014-07-22 02:55:55 +08:00
|
|
|
if [[ -z $MEETING_ID ]]; then
|
|
|
|
echo "No meeting id given"
|
|
|
|
exit 1
|
2012-02-28 00:40:35 +08:00
|
|
|
fi
|
2014-07-22 02:55:55 +08:00
|
|
|
|
|
|
|
echo "deleting: $MEETING_ID"
|
|
|
|
# Remove the status files first to avoid issues with concurrent
|
|
|
|
# recording processing
|
2018-12-12 04:37:31 +08:00
|
|
|
rm -f /var/bigbluebutton/recording/status/ended/$MEETING_ID*
|
2014-07-22 02:55:55 +08:00
|
|
|
rm -f /var/bigbluebutton/recording/status/recorded/$MEETING_ID*
|
|
|
|
rm -f /var/bigbluebutton/recording/status/archived/$MEETING_ID*
|
|
|
|
rm -f /var/bigbluebutton/recording/status/sanity/$MEETING_ID*
|
|
|
|
rm -f /var/bigbluebutton/recording/status/processed/$MEETING_ID*
|
|
|
|
rm -f /var/bigbluebutton/recording/status/published/$MEETING_ID*
|
|
|
|
|
|
|
|
# Remove all of the related files
|
|
|
|
for type in $TYPES; do
|
|
|
|
rm -rf /var/bigbluebutton/published/$type/$MEETING_ID*
|
|
|
|
rm -rf /var/bigbluebutton/unpublished/$type/$MEETING_ID*
|
2016-02-17 04:14:46 +08:00
|
|
|
rm -rf /var/bigbluebutton/deleted/$type/$MEETING_ID*
|
2014-07-22 02:55:55 +08:00
|
|
|
|
|
|
|
rm -rf /var/bigbluebutton/recording/process/$type/$MEETING_ID*
|
|
|
|
rm -rf /var/bigbluebutton/recording/publish/$type/$MEETING_ID*
|
|
|
|
|
|
|
|
rm -rf /var/log/bigbluebutton/$type/*$MEETING_ID*
|
|
|
|
done
|
|
|
|
|
2019-05-14 04:59:08 +08:00
|
|
|
rm -rf /var/bigbluebutton/captions/$MEETING_ID*
|
|
|
|
rm -f /var/bigbluebutton/inbox/$MEETING_ID*.json
|
|
|
|
rm -f /var/bigbluebutton/inbox/$MEETING_ID*.txt
|
|
|
|
|
2014-07-22 02:55:55 +08:00
|
|
|
rm -rf /var/bigbluebutton/recording/raw/$MEETING_ID*
|
|
|
|
|
|
|
|
rm -rf /usr/share/red5/webapps/video/streams/$MEETING_ID
|
2015-10-01 03:51:40 +08:00
|
|
|
rm -rf /usr/share/red5/webapps/video-broadcast/streams/$MEETING_ID
|
2016-07-03 05:57:49 +08:00
|
|
|
rm -f /var/bigbluebutton/screenshare/$MEETING_ID*.flv
|
2014-07-22 02:55:55 +08:00
|
|
|
rm -f /var/freeswitch/meetings/$MEETING_ID*.wav
|
2020-08-28 14:21:00 +08:00
|
|
|
rm -f /var/freeswitch/meetings/$MEETING_ID*.opus
|
2014-07-22 02:55:55 +08:00
|
|
|
rm -rf /var/bigbluebutton/$MEETING_ID
|
2012-02-28 00:40:35 +08:00
|
|
|
fi
|
|
|
|
|
2011-09-01 02:55:20 +08:00
|
|
|
if [ $DELETEALL ]; then
|
2014-07-22 02:55:55 +08:00
|
|
|
# Remove the status files first to avoid issues with concurrent
|
|
|
|
# recording processing
|
|
|
|
rm -f /var/bigbluebutton/recording/status/recorded/*
|
|
|
|
rm -f /var/bigbluebutton/recording/status/archived/*
|
|
|
|
rm -f /var/bigbluebutton/recording/status/sanity/*
|
|
|
|
rm -f /var/bigbluebutton/recording/status/processed/*
|
|
|
|
rm -f /var/bigbluebutton/recording/status/published/*
|
|
|
|
|
|
|
|
for type in $TYPES; do
|
|
|
|
rm -rf /var/bigbluebutton/published/$type/*
|
|
|
|
rm -rf /var/bigbluebutton/unpublished/$type/*
|
2016-02-17 04:14:46 +08:00
|
|
|
rm -rf /var/bigbluebutton/deleted/$type/*
|
2014-07-22 02:55:55 +08:00
|
|
|
|
|
|
|
rm -rf /var/bigbluebutton/recording/process/$type/*
|
|
|
|
rm -rf /var/bigbluebutton/recording/publish/$type/*
|
|
|
|
|
|
|
|
rm -rf /var/log/bigbluebutton/$type/*
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -rf /var/bigbluebutton/recording/raw/*
|
2019-05-14 04:59:08 +08:00
|
|
|
|
|
|
|
rm -f /var/bigbluebutton/captions/inbox/*
|
|
|
|
|
2015-03-24 08:08:07 +08:00
|
|
|
find /usr/share/red5/webapps/video/streams -name "*.flv" -exec rm '{}' \;
|
2015-10-01 03:51:40 +08:00
|
|
|
find /usr/share/red5/webapps/video-broadcast/streams -name "*.flv" -exec rm '{}' \;
|
2016-07-03 05:57:49 +08:00
|
|
|
rm -f /var/bigbluebutton/screenshare/*.flv
|
2014-07-22 02:55:55 +08:00
|
|
|
rm -f /var/freeswitch/meetings/*.wav
|
2020-08-28 14:21:00 +08:00
|
|
|
rm -f /var/freeswitch/meetings/*.opus
|
2014-07-22 02:55:55 +08:00
|
|
|
|
2016-10-17 16:08:29 +08:00
|
|
|
for meeting in $(ls /var/bigbluebutton | grep "^[0-9a-f]\{40\}-[[:digit:]]\{13\}$"); do
|
2014-07-22 02:55:55 +08:00
|
|
|
echo "deleting: $meeting"
|
|
|
|
rm -rf /var/bigbluebutton/$meeting
|
2019-05-14 04:59:08 +08:00
|
|
|
rm -rf /var/bigbluebutton/captions/$meeting
|
2014-07-22 02:55:55 +08:00
|
|
|
done
|
2011-08-26 06:47:03 +08:00
|
|
|
fi
|
|
|
|
|
2011-09-10 21:35:32 +08:00
|
|
|
if [ $LIST ]; then
|
2011-08-26 06:47:03 +08:00
|
|
|
|
2012-02-20 01:34:21 +08:00
|
|
|
# Does the meeting contain:
|
|
|
|
# A -- Audio
|
|
|
|
# P -- Presentation
|
|
|
|
# V -- Video
|
|
|
|
# D -- Desktop
|
|
|
|
#
|
|
|
|
# Does the archive contain
|
|
|
|
# A -- Audio
|
|
|
|
# P -- Presentation
|
|
|
|
# V -- Video
|
|
|
|
# D -- Desktop
|
|
|
|
# E -- Events
|
|
|
|
#
|
|
|
|
# Is there a done flag (trigger rap-worker.rb to process) for
|
|
|
|
# R -- Recording
|
|
|
|
# A -- Archiving
|
|
|
|
#
|
2011-08-26 06:47:03 +08:00
|
|
|
|
2013-04-06 04:57:34 +08:00
|
|
|
if [ $WITHDESC ]; then
|
2013-04-17 10:23:20 +08:00
|
|
|
echo "Internal MeetingID Time APVD APVDE RAS Slides Processed Published External MeetingID Description"
|
|
|
|
echo "------------------------------------------------------ ---------------------------- ---- ----- --- ------ -------------------- ------------------ ------------------- -----------"
|
2013-04-06 04:57:34 +08:00
|
|
|
else
|
2013-04-17 10:23:20 +08:00
|
|
|
echo "Internal MeetingID Time APVD APVDE RAS Slides Processed Published External MeetingID"
|
|
|
|
echo "------------------------------------------------------ ---------------------------- ---- ----- --- ------ -------------------- ------------------ -------------------"
|
2013-04-06 04:57:34 +08:00
|
|
|
fi
|
2011-09-10 21:35:32 +08:00
|
|
|
|
|
|
|
if [ -z $HEAD ]; then
|
2017-03-29 01:30:07 +08:00
|
|
|
# If we're not called with --list-recent, show all recordings
|
2011-09-10 21:35:32 +08:00
|
|
|
HEAD=99999
|
|
|
|
fi
|
2012-10-23 05:13:16 +08:00
|
|
|
|
|
|
|
tmp_file=$(mktemp)
|
2016-10-17 16:08:29 +08:00
|
|
|
ls -t /var/bigbluebutton | grep "^[0-9a-f]\{40\}-[[:digit:]]\{13\}$" | head -n $HEAD > $tmp_file
|
|
|
|
ls -t /var/bigbluebutton/recording/raw | grep "^[0-9a-f]\{40\}-[[:digit:]]\{13\}$" | head -n $HEAD >> $tmp_file
|
2012-10-31 09:19:10 +08:00
|
|
|
|
2016-10-17 16:08:29 +08:00
|
|
|
#for meeting in $(ls -t /var/bigbluebutton | grep "^[0-9a-f]\{40\}-[[:digit:]]\{13\}$" | head -n $HEAD); do
|
2012-10-23 05:13:16 +08:00
|
|
|
for meeting in $(cat $tmp_file | sort -t - -k 2 -r| uniq); do
|
2011-08-26 06:47:03 +08:00
|
|
|
echo -n "$meeting"
|
2011-08-31 04:12:37 +08:00
|
|
|
timestamp=$(echo $meeting | sed s/.*-//g)
|
|
|
|
epoc=$(($timestamp/1000))
|
|
|
|
echo -n " "
|
2011-09-10 21:35:32 +08:00
|
|
|
echo -n $(date --date "Jan 1, 1970 00:00:00 +0000 + $epoc seconds") | awk '{ printf("%-28s",$0) }'
|
2011-11-20 22:33:55 +08:00
|
|
|
echo -n " "
|
|
|
|
|
|
|
|
#
|
|
|
|
# Monitor the live recordings
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check if there is any recorded audio
|
|
|
|
if ls -A $RAW_AUDIO_SRC/$meeting-*.wav &> /dev/null; then
|
|
|
|
echo -n "X"
|
|
|
|
else
|
|
|
|
echo -n " "
|
|
|
|
fi
|
2011-08-26 06:47:03 +08:00
|
|
|
|
2011-11-20 22:33:55 +08:00
|
|
|
#
|
2016-09-27 18:46:38 +08:00
|
|
|
# Check if there is any uploaded presentations
|
2011-11-20 22:33:55 +08:00
|
|
|
if [ -d $RAW_PRESENTATION_SRC/$meeting/$meeting ]; then
|
|
|
|
if [ "$(ls -A $RAW_PRESENTATION_SRC/$meeting/$meeting)" ]; then
|
|
|
|
echo -n "X"
|
|
|
|
else
|
|
|
|
echo -n " "
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo -n " "
|
|
|
|
fi
|
2011-08-26 06:47:03 +08:00
|
|
|
|
|
|
|
|
2011-11-20 22:33:55 +08:00
|
|
|
#
|
|
|
|
# Check if there is any recorded videos
|
|
|
|
if [ -d $RAW_VIDEO_SRC/$meeting ]; then
|
|
|
|
if [ "$(ls -A $RAW_VIDEO_SRC/$meeting)" ]; then
|
|
|
|
echo -n "X"
|
|
|
|
else
|
|
|
|
echo -n " "
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo -n " "
|
|
|
|
fi
|
2011-08-26 06:47:03 +08:00
|
|
|
|
2016-07-03 05:57:49 +08:00
|
|
|
#echo "## $RAW_SCREENSHARE_SRC/$meeting-*.flv"
|
|
|
|
#exit
|
2011-08-26 06:47:03 +08:00
|
|
|
#
|
2011-11-20 22:33:55 +08:00
|
|
|
# Check if there is any recorded desktop sharing
|
2016-07-03 05:57:49 +08:00
|
|
|
if ls -A $RAW_SCREENSHARE_SRC/$meeting/*.flv &> /dev/null; then
|
2011-11-20 22:33:55 +08:00
|
|
|
echo -n "X"
|
2011-08-26 06:47:03 +08:00
|
|
|
else
|
2011-11-20 22:33:55 +08:00
|
|
|
echo -n " "
|
2011-08-26 06:47:03 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#
|
2011-11-20 22:33:55 +08:00
|
|
|
# Monitor the archived files
|
|
|
|
#
|
|
|
|
RAW_DIR=$RAW_PRESENTATION_SRC/recording/raw/$meeting
|
|
|
|
echo -n " "
|
|
|
|
|
|
|
|
# Check if there area uploaded presentations
|
|
|
|
#echo "$RAW/audio"
|
|
|
|
DIRS="audio presentation video deskshare"
|
|
|
|
for dir in $DIRS; do
|
|
|
|
if [ -d $RAW_DIR/$dir ]; then
|
|
|
|
if [ "$(ls -A $RAW_DIR/$dir)" ]; then
|
|
|
|
echo -n "X"
|
|
|
|
else
|
|
|
|
echo -n " "
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo -n " "
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -f $RAW_DIR/events.xml ]; then
|
|
|
|
echo -n "X"
|
2011-08-26 06:47:03 +08:00
|
|
|
else
|
2011-11-20 22:33:55 +08:00
|
|
|
echo -n " "
|
2011-08-26 06:47:03 +08:00
|
|
|
fi
|
|
|
|
|
2011-11-20 22:33:55 +08:00
|
|
|
#
|
|
|
|
# Check the status files
|
|
|
|
#
|
|
|
|
echo -n " "
|
|
|
|
STATUS_DIR=$RAW_PRESENTATION_SRC/recording/status
|
2012-08-31 06:00:26 +08:00
|
|
|
DIRS="recorded archived sanity"
|
2011-11-20 22:33:55 +08:00
|
|
|
for dir in $DIRS; do
|
|
|
|
if [ -f $STATUS_DIR/$dir/$meeting.done ]; then
|
|
|
|
echo -n "X"
|
|
|
|
else
|
|
|
|
echo -n " "
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
#
|
2016-09-27 18:46:38 +08:00
|
|
|
# Number of slides
|
2012-10-31 09:19:10 +08:00
|
|
|
if [ -d /var/bigbluebutton/$meeting/$meeting ]; then
|
2019-08-30 22:37:18 +08:00
|
|
|
SLIDES_COUNT=$(find /var/bigbluebutton/$meeting/$meeting -name "*.swf" | wc -l)
|
|
|
|
if [ $SLIDES_COUNT -eq 0 ]; then
|
|
|
|
SLIDES_COUNT=$(find /var/bigbluebutton/$meeting/$meeting -name "*.svg" | wc -l)
|
|
|
|
fi
|
|
|
|
printf "%7s" $SLIDES_COUNT
|
|
|
|
else
|
|
|
|
SLIDES_COUNT=$(find /var/bigbluebutton/recording/raw/$meeting -name "*.swf" | wc -l)
|
|
|
|
if [ $SLIDES_COUNT -eq 0 ]; then
|
|
|
|
SLIDES_COUNT=$(find /var/bigbluebutton/recording/raw/$meeting -name "*.svg" | wc -l)
|
|
|
|
fi
|
|
|
|
printf "%7s" $SLIDES_COUNT
|
2012-10-31 09:19:10 +08:00
|
|
|
fi
|
2011-11-20 22:33:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
echo -n " "
|
|
|
|
#echo $BASE/raw/$meeting
|
|
|
|
if [ -d $BASE/raw/$meeting ]; then
|
|
|
|
recording=$meeting
|
2011-08-26 06:47:03 +08:00
|
|
|
|
|
|
|
#
|
2016-09-27 18:46:38 +08:00
|
|
|
# Check processed
|
2011-09-01 02:55:20 +08:00
|
|
|
processed=""
|
2011-08-31 04:12:37 +08:00
|
|
|
for type in $TYPES; do
|
|
|
|
if [ -f $STATUS/processed/$recording-$type.done ]; then
|
2011-09-01 02:55:20 +08:00
|
|
|
if [ ! -z "$processed" ]; then
|
|
|
|
processed="$processed,"
|
2011-08-31 04:12:37 +08:00
|
|
|
fi
|
2011-09-01 02:55:20 +08:00
|
|
|
processed="$processed$type"
|
2011-08-31 04:12:37 +08:00
|
|
|
fi
|
|
|
|
done
|
2011-09-01 02:55:20 +08:00
|
|
|
printf "%-21s" $processed
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check archived
|
|
|
|
published=""
|
|
|
|
for type in $TYPES; do
|
|
|
|
if [ -f /var/bigbluebutton/published/$type/$recording/metadata.xml ]; then
|
|
|
|
if [ ! -z "$published" ]; then
|
|
|
|
published="$published,"
|
|
|
|
fi
|
|
|
|
published="$published$type"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
printf "%-17s" $published
|
|
|
|
|
2011-08-26 06:47:03 +08:00
|
|
|
|
|
|
|
if [ -f /var/bigbluebutton/recording/raw/$recording/events.xml ]; then
|
2013-04-06 04:57:34 +08:00
|
|
|
echo -n " "
|
2013-04-09 00:15:46 +08:00
|
|
|
echo -n $(head -n 5 /var/bigbluebutton/recording/raw/$recording/events.xml | grep meetingId | sed s/.*meetingId=\"//g | sed s/\".*//g) | sed -e 's/<[^>]*>//g' -e 's/</</g' -e 's/>/>/g' -e 's/&/\&/g' -e 's/ \{1,\}/ /g' | tr -d '\n'
|
2013-04-06 04:57:34 +08:00
|
|
|
if [ $WITHDESC ]; then
|
|
|
|
echo -n " "
|
|
|
|
echo -n $(head -n 5 /var/bigbluebutton/recording/raw/$recording/events.xml | grep description | sed s/.*description=\"//g | sed s/\".*//g) | sed -e 's/<[^>]*>//g' -e 's/</</g' -e 's/>/>/g' -e 's/&/\&/g' -e 's/ \{1,\}/ /g' | tr -d '\n'
|
|
|
|
fi
|
2011-08-26 06:47:03 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
echo
|
|
|
|
done
|
2016-11-05 01:05:41 +08:00
|
|
|
if [ -f $tmp_file ]; then
|
|
|
|
rm $tmp_file
|
|
|
|
fi
|
2011-08-26 06:47:03 +08:00
|
|
|
echo
|
|
|
|
echo "--"
|
2016-09-13 05:26:40 +08:00
|
|
|
systemctl --all --no-pager list-timers bbb-record-core.timer
|
|
|
|
echo "--"
|
2017-03-29 01:30:07 +08:00
|
|
|
systemctl --no-pager status bbb-rap-archive-worker.service bbb-rap-sanity-worker.service bbb-rap-process-worker.service bbb-rap-publish-worker.service
|
2011-08-26 06:47:03 +08:00
|
|
|
echo "--"
|
|
|
|
|
|
|
|
if tail -n 20 /var/log/bigbluebutton/bbb-web.log | grep -q "is recorded. Process it."; then
|
|
|
|
echo -n "Last meeting processed (bbb-web.log): "
|
|
|
|
tail -n 20 /var/log/bigbluebutton/bbb-web.log | grep "is recorded. Process it." | sed "s/.*\[//g" | sed "s/\].*//g"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2011-09-10 21:35:32 +08:00
|
|
|
if [ $WATCH ]; then
|
2017-03-29 01:30:07 +08:00
|
|
|
watch -n 2 "bbb-record --list-recent $WITHDESC"
|
2011-09-10 21:35:32 +08:00
|
|
|
fi
|
2012-01-06 06:07:34 +08:00
|
|
|
|
2013-04-04 07:00:47 +08:00
|
|
|
if [ $ENABLE ]; then
|
|
|
|
SCRIPTS_DIR=/usr/local/bigbluebutton/core/scripts
|
|
|
|
PROCESS_SCRIPT=$SCRIPTS_DIR/process/$WORKFLOW
|
|
|
|
PUBLISH_SCRIPT=$SCRIPTS_DIR/publish/$WORKFLOW
|
|
|
|
if [ -f $PROCESS_SCRIPT.rb.bk ]; then
|
|
|
|
echo "Enabling process script in workflow '$WORKFLOW'"
|
|
|
|
mv $PROCESS_SCRIPT.rb.bk $PROCESS_SCRIPT.rb
|
|
|
|
echo "Enabling publish script in workflow '$WORKFLOW'"
|
|
|
|
mv $PUBLISH_SCRIPT.rb.bk $PUBLISH_SCRIPT.rb
|
|
|
|
elif [ -f $PROCESS_SCRIPT.rb ]; then
|
|
|
|
echo "Workflow '$WORKFLOW' is already enabled."
|
|
|
|
else
|
|
|
|
echo "Workflow '$WORKFLOW' does not exist or is not installed"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $DISABLE ]; then
|
|
|
|
SCRIPTS_DIR=/usr/local/bigbluebutton/core/scripts
|
|
|
|
PROCESS_SCRIPT=$SCRIPTS_DIR/process/$WORKFLOW
|
|
|
|
PUBLISH_SCRIPT=$SCRIPTS_DIR/publish/$WORKFLOW
|
|
|
|
if [ -f $PROCESS_SCRIPT.rb ]; then
|
|
|
|
echo "Disabling process script in workflow '$WORKFLOW'"
|
|
|
|
mv $PROCESS_SCRIPT.rb $PROCESS_SCRIPT.rb.bk
|
|
|
|
echo "Disabling publish script in workflow '$WORKFLOW'"
|
|
|
|
mv $PUBLISH_SCRIPT.rb $PUBLISH_SCRIPT.rb.bk
|
|
|
|
elif [ -f $PROCESS_SCRIPT.rb.bk ]; then
|
|
|
|
echo "Workflow '$WORKFLOW' is already disabled."
|
|
|
|
else
|
|
|
|
echo "Workflow '$WORKFLOW' does not exist or is not installed"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-04-06 06:37:05 +08:00
|
|
|
if [ $TOEXTERNAL ]; then
|
|
|
|
echo
|
|
|
|
echo "External meeting id related to the given internal meeting id:"
|
|
|
|
echo "-------------------------------------------------------------"
|
|
|
|
expr "$(grep meetingId /var/bigbluebutton/recording/raw/$INTERNAL_MEETINGID/events.xml 2> /dev/null)" : '.*meetingId="\(.*\)"'
|
|
|
|
echo "-------------------------------------------------------------"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $TOINTERNAL ]; then
|
|
|
|
echo
|
|
|
|
echo "Internal meeting ids related to the given external meeting id:"
|
|
|
|
echo "-------------------------------------------------------------"
|
|
|
|
grep "meetingId=\"$EXTERNAL_MEETINGID\"" /var/bigbluebutton/recording/raw/*/events.xml | cut -f6 -d'/'
|
|
|
|
echo "-------------------------------------------------------------"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2013-04-06 04:57:34 +08:00
|
|
|
#if [ $REARCHIVE ]; then
|
2013-04-09 04:26:37 +08:00
|
|
|
# ARCHIVE_DONE_FILE=/var/bigbluebutton/recording/status/archived/$MEETING_ID.done
|
|
|
|
# SANITY_FAIL_FILE=/var/bigbluebutton/recording/status/sanity/$MEETING_ID.fail
|
|
|
|
# if [ -f $SANITY_FAIL_FILE ]; then
|
|
|
|
# max_days=$(expr "$(grep history= /etc/cron.daily/bigbluebutton)" : 'history=\(.*\)')
|
|
|
|
# # The recording has not been removed.
|
|
|
|
# still_exists=$(find /var/bigbluebutton/recording/status/recorded/*.done -mtime -$max_days | grep $MEETING_ID)
|
|
|
|
# if [ -n "$still_exists" ]; then
|
|
|
|
# if [ -f $ARCHIVE_DONE_FILE ]; then
|
|
|
|
# echo "Removing archived .done file, sanity .fail fail, and raw directory for meeting $MEETING_ID"
|
|
|
|
# rm $ARCHIVE_DONE_FILE
|
|
|
|
# rm -r /var/bigbluebutton/recording/raw/$MEETING_ID
|
|
|
|
# rm $SANITY_FAIL_FILE
|
|
|
|
# else
|
|
|
|
# echo "$MEETING_ID is not archived."
|
|
|
|
# fi
|
|
|
|
# fi
|
|
|
|
# else
|
|
|
|
# echo "The meeting you want to re archive has not failed in sanity check."
|
|
|
|
# fi
|
2013-04-06 04:57:34 +08:00
|
|
|
#fi
|
2013-04-04 08:13:02 +08:00
|
|
|
|
2012-01-06 06:07:34 +08:00
|
|
|
if [ $CHECK ]; then
|
2012-02-28 08:10:18 +08:00
|
|
|
if [ -f /var/bigbluebutton/recording/process/slides ]; then
|
|
|
|
if [ ! -w /var/bigbluebutton/recording/process/slides ]; then
|
2012-02-27 04:00:37 +08:00
|
|
|
print_header
|
|
|
|
echo "# Error: The output director for slides"
|
|
|
|
echo "#"
|
|
|
|
echo "# /var/bigbluebutton/recording/process/slides"
|
|
|
|
echo "#"
|
|
|
|
echo "# is not writeable."
|
|
|
|
echo
|
2012-02-28 08:10:18 +08:00
|
|
|
fi
|
2012-02-27 04:00:37 +08:00
|
|
|
fi
|
2012-09-13 02:52:36 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Check that the playback of slides have the proper URL
|
|
|
|
#
|
|
|
|
#set -x
|
|
|
|
for type in $TYPES; do
|
|
|
|
for recording in $(find $BASE/publish/$type -name metadata.xml); do
|
2017-06-22 16:53:10 +08:00
|
|
|
url_playback_http=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>http:\/\/\([^\"\/]*\)[^>]*>/\1/g')
|
|
|
|
url_playback_https=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>https:\/\/\([^\"\/]*\)[^>]*>/\1/g')
|
|
|
|
if [ "$BBB_WEB" != "$url_playback_http" ] && [ "$BBB_WEB" != "$url_playback_https" ]; then
|
2012-09-13 02:52:36 +08:00
|
|
|
echo
|
2017-06-22 16:53:10 +08:00
|
|
|
echo "# The hostname in <link> .. </link> ($url_playback_http)"
|
2012-09-13 02:52:36 +08:00
|
|
|
echo "# $recording"
|
|
|
|
echo "# do not match the hostname for bigbluebutton.web.serverURL ($BBB_WEB)"
|
|
|
|
echo "# /usr/share/red5/webapps/bigbluebutton/WEB-INF/bigbluebutton.properties"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
done
|
2012-09-13 03:14:45 +08:00
|
|
|
for recording in $(find /var/bigbluebutton/published/$type -name metadata.xml); do
|
2017-06-22 16:53:10 +08:00
|
|
|
url_playback_http=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>http:\/\/\([^\"\/]*\)[^>]*>/\1/g')
|
|
|
|
url_playback_https=$(cat $recording | grep "<link>" | sed 's/[ ]*<link>https:\/\/\([^\"\/]*\)[^>]*>/\1/g')
|
|
|
|
if [ "$BBB_WEB" != "$url_playback_http" ] && [ "$BBB_WEB" != "$url_playback_https" ]; then
|
2012-09-13 03:14:45 +08:00
|
|
|
echo
|
2017-06-22 16:53:10 +08:00
|
|
|
echo "# The hostname in <link> .. </link> ($url_playback_http)"
|
2012-09-13 03:14:45 +08:00
|
|
|
echo "# $recording"
|
|
|
|
echo "# do not match the hostname for bigbluebutton.web.serverURL ($BBB_WEB)"
|
|
|
|
echo "# /usr/share/red5/webapps/bigbluebutton/WEB-INF/bigbluebutton.properties"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
done
|
2012-09-13 02:52:36 +08:00
|
|
|
done
|
|
|
|
|
2012-02-27 04:00:37 +08:00
|
|
|
fi
|
2012-01-06 06:07:34 +08:00
|
|
|
|
2012-02-27 04:00:37 +08:00
|
|
|
if [ $DEBUG ]; then
|
2012-01-06 06:07:34 +08:00
|
|
|
|
2012-02-20 01:34:21 +08:00
|
|
|
LOG_DIR=/var/log/bigbluebutton
|
|
|
|
|
2012-02-27 04:00:37 +08:00
|
|
|
if [ -f /var/log/bigbluebutton/bbb-rap-worker.log ]; then
|
|
|
|
grep -i error /var/log/bigbluebutton/bbb-rap-worker.*
|
|
|
|
fi
|
|
|
|
|
2012-01-06 06:07:34 +08:00
|
|
|
#
|
|
|
|
#Failures while archiving files
|
|
|
|
#
|
2012-02-20 01:34:21 +08:00
|
|
|
if [ -f $LOG_DIR/archive.log ]; then
|
|
|
|
grep "Failed to" "$LOG_DIR/archive.log" > /tmp/t
|
2012-01-06 06:07:34 +08:00
|
|
|
if [ -s /tmp/t ]; then
|
|
|
|
echo " -- ERRORS found while archiving files -- "
|
|
|
|
cat /tmp/t
|
|
|
|
echo
|
2012-01-07 07:31:24 +08:00
|
|
|
grep "on ASCII" /tmp/t > /tmp/u
|
2012-01-07 01:34:33 +08:00
|
|
|
if [ -s /tmp/u ]; then
|
|
|
|
echo " -- events.xml was not created. There is a problem with the character encoding "
|
|
|
|
echo
|
|
|
|
fi
|
2012-01-06 06:07:34 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
2012-02-20 01:34:21 +08:00
|
|
|
# We're going to look through the output files for each of the processed types
|
2012-01-06 06:07:34 +08:00
|
|
|
#
|
2012-02-20 01:34:21 +08:00
|
|
|
STAGES="process publish"
|
|
|
|
for type in $TYPES; do
|
2012-08-22 08:13:50 +08:00
|
|
|
for stage in $STAGES; do
|
|
|
|
LOC=$LOG_DIR/$type/$stage
|
|
|
|
if ls -A $LOC-* &> /dev/null; then
|
|
|
|
rm -rf /tmp/t
|
2012-08-22 08:51:24 +08:00
|
|
|
grep -B 3 "ERROR -- : Error:" $LOC-* | egrep -w 'Error:' | grep -v "ffmpeg version" > /tmp/t
|
2012-08-22 08:13:50 +08:00
|
|
|
if [ -s /tmp/t ]; then
|
|
|
|
echo " -- ERRORS found while processing slides $LOC-* -- "
|
|
|
|
cat /tmp/t
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
2012-01-06 06:07:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Additional checks for record and playback
|
|
|
|
#
|
|
|
|
rm -rf /tmp/t
|
|
|
|
if ls /var/log/bigbluebutton/slides-process-* > /dev/null 2>1; then
|
|
|
|
sudo grep -i Error /var/log/bigbluebutton/slides-process-* > /tmp/t
|
|
|
|
if [ -s /tmp/t ]; then
|
|
|
|
echo " -- Ingest and Processing errors found in /var/log/bigbluebutton/slides-process-*.log -- "
|
|
|
|
cat /tmp/t
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -rf /tmp/t
|
|
|
|
if ls /var/log/bigbluebutton/slides-publish-* > /dev/null 2>1; then
|
|
|
|
sudo grep -i Error /var/log/bigbluebutton/slides-publish-* > /tmp/t
|
|
|
|
if [ -s /tmp/t ]; then
|
|
|
|
echo " -- Ingest and Processing errors found in /var/log/bigbluebutton/slides-publish-*.log -- "
|
|
|
|
cat /tmp/t
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -rf /tmp/t
|
|
|
|
if ls /var/log/bigbluebutton/slides-process-* > /dev/null 2>1; then
|
|
|
|
for file in /var/log/bigbluebutton/slides-process-*; do
|
|
|
|
if [ ! -f $(echo $file | sed 's/process/publish/g') ]; then
|
|
|
|
echo " $file" >> /tmp/t
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -s /tmp/t ]; then
|
|
|
|
echo " -- Ingest and Processing: found process file but not publish -- "
|
|
|
|
cat /tmp/t
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
rm -rf /tmp/t
|
|
|
|
if ls /var/bigbluebutton/recording/status/recorded/*.done > /dev/null 2>1; then
|
|
|
|
for file in /var/bigbluebutton/recording/status/recorded/*.done; do
|
|
|
|
if [ ! -f $(echo $file | sed 's/recorded/archived/g') ]; then
|
|
|
|
echo " $file" >> /tmp/t
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -s /tmp/t ]; then
|
|
|
|
echo " -- Ingest and Processing: found recorded meeting but no archive files-- "
|
|
|
|
cat /tmp/t
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
fi
|