Daniel Gibbs há 1 ano atrás
pai
commit
e8f9955ecf

+ 1 - 1
lgsm/modules/check_deps.sh

@@ -79,7 +79,7 @@ fn_install_mono_repo() {
 		# Did Mono repo install correctly?
 		if [ "${monoautoinstall}" != "1" ]; then
 			exitcode=$?
-			if [ "${exitcode}" != 0 ]; then
+			if [ "${exitcode}" -ne 0 ]; then
 				fn_print_failure_nl "Unable to install Mono repository."
 				fn_script_log_fail "Unable to install Mono repository."
 			else

+ 1 - 1
lgsm/modules/command_update_linuxgsm.sh

@@ -102,7 +102,7 @@ if [ "${script_diff}" != "" ]; then
 		fn_script_log_pass "Backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak"
 	fi
 
-	echo -en "copying ${selfname}...\c"
+	echo -en "copying ${selfname}"
 	fn_script_log_info "Copying ${selfname}"
 	cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}"
 	sed -i "s+shortname=\"core\"+shortname=\"${shortname}\"+g" "${rootdir}/${selfname}"

+ 2 - 2
lgsm/modules/install_config.sh

@@ -133,7 +133,7 @@ fn_set_config_vars() {
 			changes+=$(sed -i "s/SERVERNAME/${servername}/g w /dev/stdout" "${servercfgfullpath}")
 		fi
 		exitcode=$?
-		if [ "${exitcode}" -ne 0 ]; then # shellcheck disable=SC2181
+		if [ "${exitcode}" -ne 0 ]; then
 			fn_print_fail_eol
 			fn_script_log_fail "setting hostname"
 		elif [ "${changes}" != "" ]; then
@@ -152,7 +152,7 @@ fn_set_config_vars() {
 			changes+=$(sed -i "s/ADMINPASSWORD/${adminpass}/g w /dev/stdout" "${servercfgfullpath}")
 		fi
 		exitcode=$?
-		if [ "${exitcode}" -ne 0 ]; then # shellcheck disable=SC2181
+		if [ "${exitcode}" -ne 0 ]; then
 			fn_print_fail_eol
 			fn_script_log_fail "generating admin/rcon password"
 		elif [ "${changes}" != "" ]; then

+ 1 - 1
linuxgsm.sh

@@ -294,7 +294,7 @@ fn_install_menu_whiptail() {
 	done < "${options}"
 	OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3)
 	exitcode=$?
-	if [ "${exitcode}" == 0 ]; then
+	if [ "${exitcode}" -eq 0 ]; then
 		eval "$resultvar=\"${OPTION}\""
 	else
 		eval "$resultvar="