#!/bin/sh

. /etc/control.d/functions

CONFIG="/etc/my.cnf.d/server.cnf"

new_subst enabled \
    '^!include[[:space:]]+/etc/my.cnf.server/chroot.cnf' \
    's,^!include[[:space:]]*/etc/my.cnf.server/no-chroot.cnf,!include /etc/my.cnf.server/chroot.cnf,'

new_subst disabled \
    '^!include[[:space:]]+/etc/my.cnf.server/no-chroot.cnf' \
    's,^!include[[:space:]]*/etc/my.cnf.server/chroot.cnf,!include /etc/my.cnf.server/no-chroot.cnf,'

new_help enabled "Enable chroot for MySQL/MariaDB server"
new_help disabled "Disable chroot for MySQL/MariaDB server"

control_subst "$CONFIG" "$*" || exit 1
