Skip to content

Commit

Permalink
added permissions changes to configs
Browse files Browse the repository at this point in the history
  • Loading branch information
kochetovd committed Mar 1, 2024
1 parent 7c99a79 commit bc597e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ else
printf "\033[37m\n * The $MYSQL_MY_CNF_PATH file is used for automatic Releem settings. \n\033[0m"
printf "\033[37m\n * Adding directive includedir to the MySQL configuration $MYSQL_MY_CNF_PATH.\n\033[0m"
$sudo_cmd mkdir -p $MYSQL_CONF_DIR
$sudo_cmd chmod 755 $MYSQL_CONF_DIR
#Исключить дублирование
if [ `$sudo_cmd grep -cE "!includedir $MYSQL_CONF_DIR" $MYSQL_MY_CNF_PATH` -eq 0 ];
then
Expand Down
2 changes: 2 additions & 0 deletions mysqlconfigurer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ function releem_ps_mysql() {
if [ -n "$RELEEM_MYSQL_CONFIG_DIR" -a -d "$RELEEM_MYSQL_CONFIG_DIR" ]; then
printf "\033[37m\n * Enabling Performance schema and SlowLog to collect metrics...\n\033[0m\n"
echo -e "### This configuration was recommended by Releem. https://releem.com\n[mysqld]\nperformance_schema = 1\nslow_query_log = 1" > "$RELEEM_MYSQL_CONFIG_DIR/collect_metrics.cnf"
chmod 644 $RELEEM_MYSQL_CONFIG_DIR/collect_metrics.cnf
else
printf "\033[31m\n MySQL configuration directory is not found.\033[0m"
printf "\033[31m\n Try to reinstall Releem Agent.\033[0m"
Expand Down Expand Up @@ -317,6 +318,7 @@ function releem_apply_manual() {
yes | cp -f "${RELEEM_MYSQL_CONFIG_DIR}/${MYSQLCONFIGURER_FILE_NAME}" "${MYSQLCONFIGURER_PATH}${MYSQLCONFIGURER_FILE_NAME}.bkp"
fi
yes | cp -fr $MYSQLCONFIGURER_CONFIGFILE $RELEEM_MYSQL_CONFIG_DIR/
chmod 644 $RELEEM_MYSQL_CONFIG_DIR/*

#echo "-------Test config-------"
printf "\n`date +%Y%m%d-%H:%M:%S`\033[37m Restarting MySQL with the command '$RELEEM_MYSQL_RESTART_SERVICE'...\033[0m\n"
Expand Down

0 comments on commit bc597e0

Please sign in to comment.