diff --git a/netoik-home.spec b/netoik-home.spec index 871e6ad..2376eae 100644 --- a/netoik-home.spec +++ b/netoik-home.spec @@ -21,10 +21,14 @@ Netoik home page %make_install %post +# Create symbolic link in order to access generated captcha images. ln --symbolic %{_var}/netoik-api/captcha %{_var}/www/%{name}/assets/img/captcha %preun -[ $1 -eq 0 ] && rm %{_var}/www/%{name}/assets/img/captcha +# Remove symbolic link only if uninstalling. +if [ $1 -eq 0 ]; then + rm %{_var}/www/%{name}/assets/img/captcha +fi %files %define bootstrap_version %(make bootstrap_version)