Skip to content

Commit aab52da

Browse files
committed
don't use grep to verify the mysql audit logger
1 parent d5802d5 commit aab52da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

share/github-backup-utils/ghe-restore-audit-log

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ mysql_table_schema_available(){
4242
# Check whether the remote host is running a version where the MySQL backend
4343
# is supported, i.e: < 2.19
4444
is_mysql_supported(){
45-
ghe-ssh "$GHE_HOSTNAME" "sudo grep \"ENTERPRISE_AUDIT_LOG_MYSQL_LOGGER_ENABLED='1'\" /data/github/current/.app-config/env.d/99-instance.sh"
45+
echo 'sudo bash -c ". /data/github/current/.app-config/env.d/99-instance.sh;' \
46+
'test \"\$ENTERPRISE_AUDIT_LOG_MYSQL_LOGGER_ENABLED\" = \"1\""' | ghe-ssh "$GHE_HOSTNAME" -- /bin/bash
4647
}
4748

4849
# Helper function to set remote flags in `/data/user/common/audit-log-import`

0 commit comments

Comments
 (0)