khanat-server-docker-NeL/server/debian/common/serverimage_init_khanat.sh
2017-11-21 22:10:28 +01:00

44 lines
1.7 KiB
Bash
Executable file

#!/bin/bash
#
# Script to initialize khanat server
# Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
function msg_critical()
{
echo "$(date "+%Y/%m/%d %H:%M:%S") CRITICAL - $*" >&2
exit 2
}
/opt/serverimage_init_basic.sh || msg_critical "serverimage_init_basic.sh issue"
/opt/serverimage_install_package.sh || msg_critical "serverimage_install_package.sh issue"
/opt/serverimage_configure_apache.sh || msg_critical "serverimage_configure_apache.sh issue"
/opt/serverimage_configure_database.sh || msg_critical "serverimage_configure_database.sh issue"
/opt/serverimage_initialize_khanat_server.sh || msg_critical "serverimage_initialize_khanat_server.sh issue"
/opt/serverimage_initialize_patch_server.sh || msg_critical "serverimage_initialize_patch_server.sh issue"
/opt/serverimage_prepare_khanat_client.sh || msg_critical "serverimage_prepare_khanat_client.sh issue"
#
# Stop All
#
service ssh stop || msg_critical "ssh stop issue"
service apache2 stop|| msg_critical "apache2 stop issue"
service mysql stop || msg_critical "mysql stop issue"
exit 0