Avoid sydent generation step

This commit is contained in:
Bob Mottram 2017-02-08 17:19:55 +00:00
parent cc3321ab82
commit e36ec5c0fb
1 changed files with 16 additions and 14 deletions

View File

@ -548,21 +548,16 @@ function install_identity_server {
exit 798362
fi
function_check matrix_generate_identityserver_file
matrix_generate_identityserver_file /etc/sydent/sydent.conf
#function_check matrix_generate_identityserver_file
#matrix_generate_identityserver_file /etc/sydent/sydent.conf
if [ ! -f /etc/sydent/sydent.conf ]; then
echo $'Matrix identity server configuration not generated'
exit 72528
fi
#if [ ! -f /etc/sydent/sydent.conf ]; then
# echo $'Matrix identity server configuration not generated'
# exit 72528
#fi
function_check matrix_configure_identityserver
matrix_configure_identityserver
if [ ! -f /etc/sydent/sydent.conf ]; then
echo $'Matrix identity server config was not generated'
exit 82352
fi
#function_check matrix_configure_identityserver
#matrix_configure_identityserver
chmod -R 700 /etc/sydent/sydent.conf
chown -R matrix:matrix /etc/sydent
@ -575,7 +570,7 @@ function install_identity_server {
echo 'Type=simple' >> /etc/systemd/system/sydent.service
echo 'User=matrix' >> /etc/systemd/system/sydent.service
echo "WorkingDirectory=/etc/sydent" >> /etc/systemd/system/sydent.service
echo "ExecStart=/usr/bin/python -m sydent.sydent --config-path /etc/sydent/sydent.conf" >> /etc/systemd/system/sydent.service
echo "ExecStart=/usr/bin/python -m sydent.sydent --config-path /etc/sydent/sydent.conf --report-stats ${REPORT_STATS} --server-name ${DEFAULT_DOMAIN_NAME}" >> /etc/systemd/system/sydent.service
echo 'Restart=always' >> /etc/systemd/system/sydent.service
echo 'RestartSec=10' >> /etc/systemd/system/sydent.service
echo '' >> /etc/systemd/system/sydent.service
@ -585,6 +580,13 @@ function install_identity_server {
systemctl daemon-reload
systemctl start sydent
sleep 5
if [ ! -f /etc/sydent/sydent.conf ]; then
echo $'Matrix identity server config was not generated'
exit 82352
fi
if [ ! -f /etc/sydent/sydent.db ]; then
echo $'No matrix identity server database was created'
exit 7354383