[fix] Rewrite spec scriptlets

This commit is contained in:
samuel 2023-02-02 17:57:46 +01:00
parent a93ed4637b
commit b29f85d864
1 changed files with 5 additions and 1 deletions

View File

@ -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)