mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge branch 'stretch-unstable' into stretch-testing
This commit is contained in:
commit
d681b47b3e
4 changed files with 14 additions and 17 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
MYSQL_PKG="mariadb-server-10.1"
|
||||||
|
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
@ -31,19 +32,14 @@ do_post_regen() {
|
||||||
"applications, and is going to reset the MySQL root password." \
|
"applications, and is going to reset the MySQL root password." \
|
||||||
"You can find this new password in /etc/yunohost/mysql." >&2
|
"You can find this new password in /etc/yunohost/mysql." >&2
|
||||||
|
|
||||||
# retrieve MySQL package provider
|
|
||||||
ynh_package_is_installed "mariadb-server-10.0" \
|
|
||||||
&& mysql_pkg="mariadb-server-10.0" \
|
|
||||||
|| mysql_pkg="mysql-server-5.5"
|
|
||||||
|
|
||||||
# set new password with debconf
|
# set new password with debconf
|
||||||
sudo debconf-set-selections << EOF
|
sudo debconf-set-selections << EOF
|
||||||
$mysql_pkg mysql-server/root_password password $mysql_password
|
$MYSQL_PKG mysql-server/root_password password $mysql_password
|
||||||
$mysql_pkg mysql-server/root_password_again password $mysql_password
|
$MYSQL_PKG mysql-server/root_password_again password $mysql_password
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# reconfigure Debian package
|
# reconfigure Debian package
|
||||||
sudo dpkg-reconfigure -freadline -u "$mysql_pkg" 2>&1
|
sudo dpkg-reconfigure -freadline -u "$MYSQL_PKG" 2>&1
|
||||||
else
|
else
|
||||||
echo "It seems that you have already configured MySQL." \
|
echo "It seems that you have already configured MySQL." \
|
||||||
"YunoHost needs to have a root access to MySQL to runs its" \
|
"YunoHost needs to have a root access to MySQL to runs its" \
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
backup_dir="$1/conf/ynh/mysql"
|
backup_dir="$1/conf/ynh/mysql"
|
||||||
|
MYSQL_PKG="mariadb-server-10.1"
|
||||||
|
|
||||||
# ensure that mysql is running
|
# ensure that mysql is running
|
||||||
service mysql status >/dev/null 2>&1 \
|
service mysql status >/dev/null 2>&1 \
|
||||||
|
@ -23,19 +24,14 @@ sudo mysqladmin -s -u root -p"$curr_pwd" password "$new_pwd" || {
|
||||||
"applications, and is going to reset the MySQL root password." \
|
"applications, and is going to reset the MySQL root password." \
|
||||||
"You can find this new password in /etc/yunohost/mysql." >&2
|
"You can find this new password in /etc/yunohost/mysql." >&2
|
||||||
|
|
||||||
# retrieve MySQL package provider
|
|
||||||
ynh_package_is_installed "mariadb-server-10.0" \
|
|
||||||
&& mysql_pkg="mariadb-server-10.0" \
|
|
||||||
|| mysql_pkg="mysql-server-5.5"
|
|
||||||
|
|
||||||
# set new password with debconf
|
# set new password with debconf
|
||||||
sudo debconf-set-selections << EOF
|
sudo debconf-set-selections << EOF
|
||||||
$mysql_pkg mysql-server/root_password password $new_pwd
|
$MYSQL_PKG mysql-server/root_password password $new_pwd
|
||||||
$mysql_pkg mysql-server/root_password_again password $new_pwd
|
$MYSQL_PKG mysql-server/root_password_again password $new_pwd
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# reconfigure Debian package
|
# reconfigure Debian package
|
||||||
sudo dpkg-reconfigure -freadline -u "$mysql_pkg" 2>&1
|
sudo dpkg-reconfigure -freadline -u "$MYSQL_PKG" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
# store new root password
|
# store new root password
|
||||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -16,7 +16,7 @@ Depends: ${python:Depends}, ${misc:Depends}
|
||||||
, glances
|
, glances
|
||||||
, dnsutils, bind9utils, unzip, git, curl, cron, wget
|
, dnsutils, bind9utils, unzip, git, curl, cron, wget
|
||||||
, ca-certificates, netcat-openbsd, iproute
|
, ca-certificates, netcat-openbsd, iproute
|
||||||
, mariadb-server | mysql-server, php-mysql | php-mysqlnd
|
, mariadb-server, php-mysql | php-mysqlnd
|
||||||
, slapd, ldap-utils, sudo-ldap, libnss-ldapd, unscd
|
, slapd, ldap-utils, sudo-ldap, libnss-ldapd, unscd
|
||||||
, postfix-ldap, postfix-policyd-spf-perl, postfix-pcre, procmail, mailutils
|
, postfix-ldap, postfix-policyd-spf-perl, postfix-pcre, procmail, mailutils
|
||||||
, dovecot-ldap, dovecot-lmtpd, dovecot-managesieved
|
, dovecot-ldap, dovecot-lmtpd, dovecot-managesieved
|
||||||
|
|
|
@ -48,6 +48,11 @@ class MyMigration(Migration):
|
||||||
c = "sed -i '1i {}' {}".format(MIGRATION_COMMENT, dest)
|
c = "sed -i '1i {}' {}".format(MIGRATION_COMMENT, dest)
|
||||||
os.system(c)
|
os.system(c)
|
||||||
|
|
||||||
|
# Some old comments starting with '#' instead of ';' are not
|
||||||
|
# compatible in php7
|
||||||
|
c = "sed -i 's/^#/;#/g' {}".format(dest)
|
||||||
|
os.system(c)
|
||||||
|
|
||||||
# Reload/restart the php pools
|
# Reload/restart the php pools
|
||||||
_run_service_command("restart", "php7.0-fpm")
|
_run_service_command("restart", "php7.0-fpm")
|
||||||
os.system("systemctl stop php5-fpm")
|
os.system("systemctl stop php5-fpm")
|
||||||
|
|
Loading…
Add table
Reference in a new issue