From b29f85d8649e062d0755ef0c198341bb4f1c0530 Mon Sep 17 00:00:00 2001 From: samuel Date: Thu, 2 Feb 2023 17:57:46 +0100 Subject: [PATCH] [fix] Rewrite spec scriptlets --- netoik-home.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)