You can choose the signs either way round, the final result will be the same because the same physics is involved. You have presumably started by finding the number of distinguishable stationary states such as $\Omega=\sum_n N!/\prod_in_i$ subject to $\sum_i n_i=N; \; \sum_,n_i\epsilon_i=E$. As it turns out the maximum terms is greater than all the rest put together, i.e. the equilibrium condition is overwhelmingly probable, and so $\Omega_m= N!/\prod_in_i$ and from this we aim to find the maximum value which leads to $\displaystyle \frac{\partial \Omega_m}{\partial n_i}+\alpha+\beta\epsilon_i=0$ where $\alpha,\,\beta$ are the undetermined multipliers but they are not indeterminate. The $\alpha$ is related to the partition function and $\beta$ in a simple way to the temperature so they have a physical meaning so that their values are fixed because of that, thus it does not matter if the equation were $\displaystyle \frac{\partial \Omega_m}{\partial n_i}-\alpha-\beta\epsilon_i=0$
Mathematically it is easier to use the log thus, start with $\displaystyle \frac{\partial \ln(\Omega_m)}{\partial n_i}-\alpha-\beta\epsilon_i=0$ and after several steps and as each $n_i$ is independent then $\ln(n_i)+\alpha+\beta=0$. This gives $n_i=e^\alpha e^{-\beta e_i}$ which is the Maxwell Boltzmann distribution and $n_i=g_ie^\alpha e^{-\beta e_i}$ if degeneracy is included.
To go further the multipliers have to be found. As $\sum_in_i=N$ then $N=e^{-\alpha}\sum_n g_ie^{-\beta\epsilon_i}$ and the partition function is $Z=\sum_n g_ie^{-\beta\epsilon_i}$.
It is more difficult to calculate $\beta$ and the entropy is needed to do so. But we know that $\beta$ must be a positive number (as defined above in $ \partial \ln(\Omega_m)/\partial n_i-\alpha-\beta\epsilon_i=0$) otherwise the partition function would diverge towards infinity (and if zero the partition function would be an infinite sum). The same is true for your integral.
$\beta$ must be related to temperature because if there were two isolated systems that were then brought into contact and so exchange energy and come to equilibrium this then is possible only with the same value of $\beta$. Finally an increase in $\beta$ is associated with a decrease in temperature. The ratio of two distributions is $\displaystyle \frac{n_k}{n_i}=\frac{g_k}{g_i}e^{-\beta(\epsilon_k-\epsilon_i)}$. If $\epsilon_k>\epsilon_i$ when $\beta$ decreases the ration $n_k/n_i$ must increase. Hence the total energy of the system must increase as population moves from lower levels $i$ to those of $k$. Thermodynamically such a change is associated with a rise in temperature.
As the entropy is defined as $S=k\ln(\Omega_m)$ and given by classical thermodynamics as $\displaystyle \left(\frac{\partial S}{\partial E}\right)_{V,N}=\frac{1}{T}$ we find that $\displaystyle \left(\frac{\partial S}{\partial E}\right)_{V,N}=\frac{1}{T}=k\beta$, where $k$ is a (Boltzmann's) constant.
Had we used positive signs in the starting equation $\partial \ln(\Omega_m)/\partial n_i$ then we would have to change the sign in front of each $\beta$ and end up with the same definition of the partition function $Z$.