소스 검색

check if $final_path/conf/zabbix.conf.php before attempt to delete it

Mickael-Martin 5 년 전
부모
커밋
e17c086ce0
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      scripts/install

+ 3 - 1
scripts/install

@@ -111,7 +111,9 @@ ynh_replace_string --match_string="# fr_FR.UTF-8 UTF-8" --replace_string="fr_FR.
 locale-gen
 
 ln -s /usr/share/zabbix "$final_path"
-ynh_secure_remove "$final_path/conf/zabbix.conf.php"
+if [ -f "$final_path/conf/zabbix.conf.php" ];then
+    ynh_secure_remove "$final_path/conf/zabbix.conf.php"
+fi
 
 #=================================================
 # CREATE A MYSQL DATABASE