diff --git a/smartgears/smartgears/tasks/smartgears-app.yml b/smartgears/smartgears/tasks/smartgears-app.yml
index e3839dd7..a432b4f8 100644
--- a/smartgears/smartgears/tasks/smartgears-app.yml
+++ b/smartgears/smartgears/tasks/smartgears-app.yml
@@ -33,11 +33,21 @@
     - ( smartgears_download | changed )
   tags: [ 'smartgears', 'tomcat' ]
 
+- name: Check if the smartgears stop script exists
+  become: True
+  become_user: '{{ smartgears_user }}'
+  stat: path=/home/{{ smartgears_user }}/stopContainer.sh
+  when: smartgears_upgrade or ( smartgears_download | changed )
+  register: smartgears_stop_script
+  tags: [ 'smartgears', 'tomcat', 'stop_smartgears_service' ]
+
 - name: Stop the smartgears container before launching the upgrade script
   become: True
   become_user: '{{ smartgears_user }}'
   shell: /home/{{ smartgears_user }}/stopContainer.sh
-  when: smartgears_upgrade or ( smartgears_download | changed )
+  when:
+    - smartgears_upgrade or ( smartgears_download | changed )
+    - smartgears_stop_script.exists
   tags: [ 'smartgears', 'tomcat', 'stop_smartgears_service' ]
 
 - name: Install the additional tomcat default file