init
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# core/service.sh - start services after install
|
||||
# Migrated verbatim from install.sh (lines 1117-1124).
|
||||
start_services() {
|
||||
# Starting DB
|
||||
[ -d "/etc/mysql" ] && /bin/mv /etc/mysql{,_bk}
|
||||
[ -d "${db_install_dir}/support-files" ] && [ -z "`ps -ef | grep mysqld_safe | grep -v grep`" ] && service mysqld start
|
||||
|
||||
# reload php
|
||||
[ -e "${php_install_dir}/sbin/php-fpm" ] && start_service php-fpm reload
|
||||
[ -n "${mphp_ver}" -a -e "${php_install_dir}${mphp_ver}/sbin/php-fpm" ] && start_service php${mphp_ver}-fpm reload
|
||||
}
|
||||
|
||||
# start_service: unified systemctl|service dispatcher (de-dup of dual-path lines).
|
||||
start_service() {
|
||||
local name="$1" action="$2"
|
||||
[ -e /bin/systemctl ] && systemctl "${action}" "${name}" || service "${name}" "${action}"
|
||||
}
|
||||
Reference in New Issue
Block a user