mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-26 19:30:24 +00:00
Merge pull request #300 from sirlucjan/pacman-hooks-openrc
Add pacman hooks for openrc
This commit is contained in:
commit
eeb2151804
19
libalpm/openrc/90-scx-scheds-upgrade.hook
Normal file
19
libalpm/openrc/90-scx-scheds-upgrade.hook
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[Trigger]
|
||||||
|
Type = Path
|
||||||
|
Operation = Upgrade
|
||||||
|
Target = etc/conf.d/scx
|
||||||
|
Target = etc/default/scx
|
||||||
|
Target = etc/init.d/scx
|
||||||
|
Target = usr/bin/scx_*
|
||||||
|
|
||||||
|
[Trigger]
|
||||||
|
Type = Package
|
||||||
|
Operation = Upgrade
|
||||||
|
Target = scx-scheds
|
||||||
|
Target = scx-scheds-git
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Checking scx_scheduler...
|
||||||
|
When = PostTransaction
|
||||||
|
Exec = /usr/share/libalpm/scripts/scx-openrc-restart
|
||||||
|
NeedsTargets
|
4
libalpm/openrc/meson.build
Normal file
4
libalpm/openrc/meson.build
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Install the 'scx-openrc-restart' file to the '/usr/share/libalpm/scripts' directory
|
||||||
|
install_data('scx-openrc-restart', install_dir: '/usr/share/libalpm/scripts')
|
||||||
|
# Install the '90-scx-scheds-upgrade.hook' file to the '/usr/share/libalpm/hooks' directory
|
||||||
|
install_data('90-scx-scheds-upgrade.hook', install_dir: '/usr/share/libalpm/hooks')
|
11
libalpm/openrc/scx-openrc-restart
Executable file
11
libalpm/openrc/scx-openrc-restart
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
# Check the status of the service
|
||||||
|
if /etc/init.d/scx status > /dev/null; then
|
||||||
|
echo "The service is active. Restarting..."
|
||||||
|
/usr/bin/rc-service scx restart
|
||||||
|
echo "Service has been restarted."
|
||||||
|
else
|
||||||
|
echo "The service is not active."
|
||||||
|
fi
|
@ -337,3 +337,7 @@ libalpm = dependency('libalpm', required: get_option('libalpm'))
|
|||||||
if libalpm.found() and systemd.found()
|
if libalpm.found() and systemd.found()
|
||||||
subdir('libalpm/systemd')
|
subdir('libalpm/systemd')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if libalpm.found() and openrc.found()
|
||||||
|
subdir('libalpm/openrc')
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user