From 5876111070d26191c780b6b890795a9c553dbff4 Mon Sep 17 00:00:00 2001 From: frju365 Date: Fri, 4 Jan 2019 20:43:04 +0100 Subject: [PATCH 1/2] Update install.sql --- conf/install.sql | 3 --- 1 file changed, 3 deletions(-) diff --git a/conf/install.sql b/conf/install.sql index 2bc3eb0..16d4768 100644 --- a/conf/install.sql +++ b/conf/install.sql @@ -1,6 +1,3 @@ --- Disable Foreign keys to avoid errors in dropping -SET FOREIGN_KEY_CHECKS = 0; - CREATE TABLE IF NOT EXISTS `acp_settings` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `setting_ref` varchar(25) NOT NULL, From 73e19ffae4b4b412fca714d3f0f3b8cb1daa84d9 Mon Sep 17 00:00:00 2001 From: frju365 Date: Fri, 4 Jan 2019 20:44:00 +0100 Subject: [PATCH 2/2] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 84327a3..31f2a99 100644 --- a/scripts/install +++ b/scripts/install @@ -117,6 +117,7 @@ db_user=$db_name echo "Creating pufferpanel account and installing database..." #mysql -h localhost -P 3306 -u $db_name --password="$db_pwd" < ..config/install.sql +ynh_mysql_execute_as_root "SET FOREIGN_KEY_CHECKS = 0;" $db_name ynh_mysql_connect_as $db_user $db_pwd $db_name < ..config/install.sql #mysql -h localhost -P 3306 -u $db_name --password="$db_pwd" -e "SET GLOBAL event_scheduler = ON;" ynh_mysql_connect_as $db_user $db_pwd <<< "SET GLOBAL event_scheduler = ON;" @@ -231,4 +232,4 @@ fi # Reload services systemctl reload nginx systemctl start pufferd -systemctl enable pufferd \ No newline at end of file +systemctl enable pufferd