diff --git a/debian/obs-api.postinst b/debian/obs-api.postinst
index fbc4afb5ce3677b0018d4cb080218f7dc4d74215..618b06381c7371ff70bd1882268f2a0dd3b952b5 100644
--- a/debian/obs-api.postinst
+++ b/debian/obs-api.postinst
@@ -9,10 +9,10 @@ dbc_go obs-api $@
 
 chown www-data:root /etc/obs/api/config/environment.rb
 
-if [ ! -l /var/log/obs ] ; then
+if [ ! -f /var/log/obs ] ; then
   ln -fs /usr/share/obs/api/log /var/log/obs
 fi
-if [ ! -l /var/cache/obs/tmp ] ; then
+if [ ! -f /var/cache/obs/tmp ] ; then
   mkdir -p /var/cache/obs
   ln -fs /usr/share/obs/api/tmp /var/cache/obs/tmp
 fi
@@ -119,4 +119,3 @@ reload_apache()
 reload_apache restart
 
 #DEBHELPER#
-