Skip to content

Commit

Permalink
Merge pull request #51 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 2.17.2
  • Loading branch information
andyone committed Nov 2, 2023
2 parents 271e868 + 3cefb3d commit c010506
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 37 deletions.
12 changes: 11 additions & 1 deletion SOURCES/kaosv
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
###############################################################################

# Current version of KAOSv
KV_VERSION="2.17.1"
KV_VERSION="2.17.2"

###############################################################################

Expand Down Expand Up @@ -2474,6 +2474,16 @@ kvIsSystemdCompatibleCommand() {
return 1
fi

# Extra check if service was started before with previous version of
# kaosv without redirect to systemd
if [[ "$(kv.getStatus)" == "$STATUS_RUNNING" ]] ; then
local systemdState
systemdState=$(systemctl show "${kv[prog_name]}.service" -p ActiveState | tr -d '\r\n')
if [[ "$systemdState" != "ActiveState=active" ]] ; then
return 1
fi
fi

case "$1" in
"start") return 0 ;;
"restart") return 0 ;;
Expand Down
43 changes: 7 additions & 36 deletions kaosv.spec
Original file line number Diff line number Diff line change
@@ -1,40 +1,8 @@
################################################################################

%define _posixroot /
%define _root /root
%define _bin /bin
%define _sbin /sbin
%define _srv /srv
%define _home /home
%define _lib32 %{_posixroot}lib
%define _lib64 %{_posixroot}lib64
%define _libdir32 %{_prefix}%{_lib32}
%define _libdir64 %{_prefix}%{_lib64}
%define _logdir %{_localstatedir}/log
%define _rundir %{_localstatedir}/run
%define _lockdir %{_localstatedir}/lock/subsys
%define _cachedir %{_localstatedir}/cache
%define _spooldir %{_localstatedir}/spool
%define _crondir %{_sysconfdir}/cron.d
%define _loc_prefix %{_prefix}/local
%define _loc_exec_prefix %{_loc_prefix}
%define _loc_bindir %{_loc_exec_prefix}/bin
%define _loc_libdir %{_loc_exec_prefix}/%{_lib}
%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32}
%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64}
%define _loc_libexecdir %{_loc_exec_prefix}/libexec
%define _loc_sbindir %{_loc_exec_prefix}/sbin
%define _loc_datarootdir %{_loc_prefix}/share
%define _loc_includedir %{_loc_prefix}/include
%define _loc_mandir %{_loc_datarootdir}/man
%define _rpmstatedir %{_sharedstatedir}/rpm-state
%define _pkgconfigdir %{_libdir}/pkgconfig

################################################################################

Summary: Bash lib for SysV init scripts
Name: kaosv
Version: 2.17.1
Version: 2.17.2
Release: 0%{?dist}
Group: Applications/System
License: Apache License, Version 2.0
Expand Down Expand Up @@ -64,10 +32,10 @@ Bash lib for SysV init scripts.
rm -rf %{buildroot}

install -dm 755 %{buildroot}%{_initddir}
install -dm 755 %{buildroot}%{_loc_datarootdir}/%{name}
install -dm 755 %{buildroot}%{_prefix}/local/share/%{name}

install -pm 644 %{name} %{buildroot}%{_initddir}/
install -pm 755 supervisor %{buildroot}%{_loc_datarootdir}/%{name}/
install -pm 755 supervisor %{buildroot}%{_prefix}/local/share/%{name}/

%clean
rm -rf %{buildroot}
Expand All @@ -78,11 +46,14 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%doc LICENSE
%{_initddir}/%{name}
%{_loc_datarootdir}/%{name}/supervisor
%{_prefix}/local/share/%{name}/supervisor

################################################################################

%changelog
* Sat Oct 28 2023 Anton Novojilov <andy@essentialkaos.com> - 2.17.2-0
- Improved compatibility with systemd

* Wed Feb 01 2023 Anton Novojilov <andy@essentialkaos.com> - 2.17.1-0
- Fixed bug with checking systemd call on EL 7

Expand Down

0 comments on commit c010506

Please sign in to comment.