|
48 | 48 | # Define variables for later use |
49 | 49 | ee_branch=$1 |
50 | 50 | readonly ee_version_old="2.2.3" |
51 | | -readonly ee_version_new="3.3.5" |
| 51 | +readonly ee_version_new="3.3.6" |
52 | 52 | readonly ee_log_dir=/var/log/ee/ |
53 | 53 | readonly ee_install_log=/var/log/ee/install.log |
54 | 54 | readonly ee_linux_distro=$(lsb_release -i | awk '{print $3}') |
@@ -302,77 +302,80 @@ function ee_update_latest() |
302 | 302 | fi |
303 | 303 | fi |
304 | 304 | fi |
305 | | - ee_lib_echo "Updating Nginx configuration, please wait..." |
306 | | - # From version 3.1.10 we are using Suse builder for repository |
307 | | - if [ "$ee_distro_version" == "precise" ]; then |
308 | | - grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_12.04/ /' /etc/apt/sources.list.d/ &>> /dev/null |
309 | | - if [[ $? -ne 0 ]]; then |
310 | | - if [ -f /etc/apt/sources.list.d/rtcamp-nginx-precise.list ]; then |
311 | | - rm -rf /etc/apt/sources.list.d/rtcamp-nginx-precise.list |
312 | | - fi |
313 | | - echo -e "\ndeb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_12.04/ /" >> /etc/apt/sources.list.d/ee-repo.list |
314 | | - gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' |
315 | | - gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - |
316 | | - if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then |
317 | | - mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null |
318 | | - fi |
319 | | - mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null |
320 | | - apt-get update |
321 | | - apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom |
322 | 305 |
|
323 | | - fi |
324 | | - elif [ "$ee_distro_version" == "trusty" ]; then |
325 | | - grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_14.04/ /' /etc/apt/sources.list.d/ &>> /dev/null |
326 | | - if [[ $? -ne 0 ]]; then |
327 | | - if [ -f /etc/apt/sources.list.d/rtcamp-nginx-trusty.list ]; then |
328 | | - rm -rf /etc/apt/sources.list.d/rtcamp-nginx-trusty.list |
| 306 | + if [ -f /etc/nginx/nginx.conf ]; then |
| 307 | + ee_lib_echo "Updating Nginx configuration, please wait..." |
| 308 | + # From version 3.1.10 we are using Suse builder for repository |
| 309 | + if [ "$ee_distro_version" == "precise" ]; then |
| 310 | + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_12.04/ /' /etc/apt/sources.list.d/ &>> /dev/null |
| 311 | + if [[ $? -ne 0 ]]; then |
| 312 | + if [ -f /etc/apt/sources.list.d/rtcamp-nginx-precise.list ]; then |
| 313 | + rm -rf /etc/apt/sources.list.d/rtcamp-nginx-precise.list |
| 314 | + fi |
| 315 | + echo -e "\ndeb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_12.04/ /" >> /etc/apt/sources.list.d/ee-repo.list |
| 316 | + gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' |
| 317 | + gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - |
| 318 | + if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then |
| 319 | + mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null |
| 320 | + fi |
| 321 | + mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null |
| 322 | + apt-get update |
| 323 | + apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom |
| 324 | + |
329 | 325 | fi |
330 | | - echo -e "\ndeb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_14.04/ /" >> /etc/apt/sources.list.d/ee-repo.list |
331 | | - gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' |
332 | | - gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - |
333 | | - if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then |
334 | | - mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null |
| 326 | + elif [ "$ee_distro_version" == "trusty" ]; then |
| 327 | + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_14.04/ /' /etc/apt/sources.list.d/ &>> /dev/null |
| 328 | + if [[ $? -ne 0 ]]; then |
| 329 | + if [ -f /etc/apt/sources.list.d/rtcamp-nginx-trusty.list ]; then |
| 330 | + rm -rf /etc/apt/sources.list.d/rtcamp-nginx-trusty.list |
| 331 | + fi |
| 332 | + echo -e "\ndeb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_14.04/ /" >> /etc/apt/sources.list.d/ee-repo.list |
| 333 | + gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' |
| 334 | + gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - |
| 335 | + if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then |
| 336 | + mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null |
| 337 | + fi |
| 338 | + mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null |
| 339 | + apt-get update |
| 340 | + apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom |
335 | 341 | fi |
336 | | - mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null |
337 | | - apt-get update |
338 | | - apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom |
339 | | - fi |
340 | | - elif [ "$ee_distro_version" == "wheezy" ]; then |
341 | | - grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_7.0/ /' /etc/apt/sources.list.d/ &>> /dev/null |
342 | | - #grep -Hr "deb http://packages.dotdeb.org wheezy all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null |
343 | | - if [[ $? -ne 0 ]]; then |
344 | | - # if [ -f /etc/apt/sources.list.d/dotdeb-wheezy.list ]; then |
345 | | - # rm -rf /etc/apt/sources.list.d/dotdeb-wheezy.list |
346 | | - # else |
347 | | - # sed -i "/deb http:\/\/packages.dotdeb.org wheezy all/d" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null |
348 | | - # fi |
349 | | - echo -e "deb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_7.0/ /" >> /etc/apt/sources.list.d/ee-repo.list |
350 | | - gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' |
351 | | - gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - |
352 | | - if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then |
353 | | - mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null |
| 342 | + elif [ "$ee_distro_version" == "wheezy" ]; then |
| 343 | + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_7.0/ /' /etc/apt/sources.list.d/ &>> /dev/null |
| 344 | + #grep -Hr "deb http://packages.dotdeb.org wheezy all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null |
| 345 | + if [[ $? -ne 0 ]]; then |
| 346 | + # if [ -f /etc/apt/sources.list.d/dotdeb-wheezy.list ]; then |
| 347 | + # rm -rf /etc/apt/sources.list.d/dotdeb-wheezy.list |
| 348 | + # else |
| 349 | + # sed -i "/deb http:\/\/packages.dotdeb.org wheezy all/d" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null |
| 350 | + # fi |
| 351 | + echo -e "deb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_7.0/ /" >> /etc/apt/sources.list.d/ee-repo.list |
| 352 | + gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' |
| 353 | + gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - |
| 354 | + if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then |
| 355 | + mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null |
| 356 | + fi |
| 357 | + mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null |
| 358 | + mv /etc/nginx/fastcgi_params /etc/nginx/fastcgi_params.old &>> /dev/null |
| 359 | + apt-get update |
| 360 | + apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom |
354 | 361 | fi |
355 | | - mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null |
356 | | - mv /etc/nginx/fastcgi_params /etc/nginx/fastcgi_params.old &>> /dev/null |
357 | | - apt-get update |
358 | | - apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom |
359 | | - fi |
360 | | - elif [ "$ee_distro_version" == "jessie" ]; then |
361 | | - |
362 | | - grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null |
363 | | - #grep -Hr "deb http://packages.dotdeb.org jessie all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null |
364 | | - if [[ $? -ne 0 ]]; then |
365 | | - #sed -i "/deb http:\/\/packages.dotdeb.org jessie all/d" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null |
366 | | - echo -e "deb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /" >> /etc/apt/sources.list.d/ee-repo.list |
367 | | - gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' |
368 | | - gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - |
369 | | - if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then |
370 | | - mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null |
| 362 | + elif [ "$ee_distro_version" == "jessie" ]; then |
| 363 | + |
| 364 | + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null |
| 365 | + #grep -Hr "deb http://packages.dotdeb.org jessie all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null |
| 366 | + if [[ $? -ne 0 ]]; then |
| 367 | + #sed -i "/deb http:\/\/packages.dotdeb.org jessie all/d" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null |
| 368 | + echo -e "deb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /" >> /etc/apt/sources.list.d/ee-repo.list |
| 369 | + gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' |
| 370 | + gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - |
| 371 | + if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then |
| 372 | + mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null |
| 373 | + fi |
| 374 | + mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null |
| 375 | + mv /etc/nginx/fastcgi_params /etc/nginx/fastcgi_params.old &>> /dev/null |
| 376 | + apt-get update |
| 377 | + apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom |
371 | 378 | fi |
372 | | - mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null |
373 | | - mv /etc/nginx/fastcgi_params /etc/nginx/fastcgi_params.old &>> /dev/null |
374 | | - apt-get update |
375 | | - apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom |
376 | 379 | fi |
377 | 380 | fi |
378 | 381 |
|
|
0 commit comments