Added logging to the scripts
This commit is contained in:
@@ -25,7 +25,7 @@ const (
|
||||
PATH_TO_LOCAL_PHP_ROOT = "php_sel"
|
||||
PATH_TO_LOCAL_PHP = PATH_TO_LOCAL_PHP_ROOT + PATH_TO_CONFIG_NAME
|
||||
LOCK_PATH = "lock"
|
||||
PHP_SEL_CONF = "/etc/hestia_php_selector/php_sel_path.conf"
|
||||
PHP_SEL_CONF = "/etc/hestia_php_selector/php_sel_path_%s.conf"
|
||||
PHP_TEMPLATE_REMI = "/usr/bin/php%s"
|
||||
PHP_TEMPLATE_BREPO = "/opt/brepo/php%s/bin/php"
|
||||
HESTIA_CONF = "/usr/local/hestia/conf/hestia.conf"
|
||||
@@ -89,7 +89,9 @@ func isExecOther(mode os.FileMode) bool {
|
||||
}
|
||||
|
||||
func getPathtpPHP(phpVer string) string {
|
||||
cont, err := os.ReadFile(PHP_SEL_CONF)
|
||||
php_tp := get_php_type()
|
||||
options := fmt.Sprintf(PHP_SEL_CONF, php_tp)
|
||||
cont, err := os.ReadFile(options)
|
||||
if err == nil {
|
||||
result := strings.Split(strings.TrimSpace(string(cont)), "\n")
|
||||
if len(result) > 0 {
|
||||
@@ -99,7 +101,7 @@ func getPathtpPHP(phpVer string) string {
|
||||
}
|
||||
}
|
||||
}
|
||||
if get_php_type() == "remi" {
|
||||
if php_tp == "remi" {
|
||||
return fmt.Sprintf(PHP_TEMPLATE_REMI, phpVer)
|
||||
} else {
|
||||
return fmt.Sprintf(PHP_TEMPLATE_BREPO, phpVer)
|
||||
|
||||
Reference in New Issue
Block a user