Files
condor 679e0b4184 init
2026-07-24 18:54:53 +08:00

19 lines
747 B
Bash

#!/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}"
}