From e42f5d2a9ab61f51bb675cef74a90d2763e5274f Mon Sep 17 00:00:00 2001 From: BrainwreckedTech Date: Wed, 25 Jan 2023 00:10:15 -0500 Subject: [PATCH] Add restart hooks for systemd services --- restart_cockpit.hook | 13 +++++++++++++ restart_dbus.hook | 13 +++++++++++++ restart_dovecot.hook | 13 +++++++++++++ restart_fail2ban.hook | 13 +++++++++++++ restart_gitea.hook | 13 +++++++++++++ restart_gotify-server.hook | 13 +++++++++++++ restart_iptables.hook | 12 ++++++++++++ restart_mariadb.hook | 12 ++++++++++++ restart_networkmanager.hook | 12 ++++++++++++ restart_nginx.hook | 12 ++++++++++++ restart_ntpd.hook | 12 ++++++++++++ restart_packagekit.hook | 12 ++++++++++++ restart_pcp.hook | 12 ++++++++++++ restart_php-fpm.hook | 12 ++++++++++++ restart_polkit.hook | 12 ++++++++++++ restart_postfix.hook | 12 ++++++++++++ restart_qemu-guest-agent.hook | 12 ++++++++++++ restart_redis.hook | 12 ++++++++++++ restart_rspamd.hook | 12 ++++++++++++ restart_sshd.hook | 12 ++++++++++++ 20 files changed, 246 insertions(+) create mode 100644 restart_cockpit.hook create mode 100644 restart_dbus.hook create mode 100644 restart_dovecot.hook create mode 100644 restart_fail2ban.hook create mode 100644 restart_gitea.hook create mode 100644 restart_gotify-server.hook create mode 100644 restart_iptables.hook create mode 100644 restart_mariadb.hook create mode 100644 restart_networkmanager.hook create mode 100644 restart_nginx.hook create mode 100644 restart_ntpd.hook create mode 100644 restart_packagekit.hook create mode 100644 restart_pcp.hook create mode 100644 restart_php-fpm.hook create mode 100644 restart_polkit.hook create mode 100644 restart_postfix.hook create mode 100644 restart_qemu-guest-agent.hook create mode 100644 restart_redis.hook create mode 100644 restart_rspamd.hook create mode 100644 restart_sshd.hook diff --git a/restart_cockpit.hook b/restart_cockpit.hook new file mode 100644 index 0000000..8f0c04d --- /dev/null +++ b/restart_cockpit.hook @@ -0,0 +1,13 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = cockpit + +[Action] +Description = Restarting Cockpit socket +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook cockpit.socket + diff --git a/restart_dbus.hook b/restart_dbus.hook new file mode 100644 index 0000000..be829e8 --- /dev/null +++ b/restart_dbus.hook @@ -0,0 +1,13 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = dbus + +[Action] +Description = Restarting D-Bus socket +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook dbus.socket + diff --git a/restart_dovecot.hook b/restart_dovecot.hook new file mode 100644 index 0000000..c0d9bad --- /dev/null +++ b/restart_dovecot.hook @@ -0,0 +1,13 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = dovecot + +[Action] +Description = Restarting dovecot service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook dovecot.service + diff --git a/restart_fail2ban.hook b/restart_fail2ban.hook new file mode 100644 index 0000000..87b2954 --- /dev/null +++ b/restart_fail2ban.hook @@ -0,0 +1,13 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = fail2ban + +[Action] +Description = Restarting Fail2Ban service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook fail2ban.service + diff --git a/restart_gitea.hook b/restart_gitea.hook new file mode 100644 index 0000000..7923b29 --- /dev/null +++ b/restart_gitea.hook @@ -0,0 +1,13 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = gitea + +[Action] +Description = Restarting gitea service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook gitea.service + diff --git a/restart_gotify-server.hook b/restart_gotify-server.hook new file mode 100644 index 0000000..276b299 --- /dev/null +++ b/restart_gotify-server.hook @@ -0,0 +1,13 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = gotify-server + +[Action] +Description = Restarting gotify service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook gotify-server.service + diff --git a/restart_iptables.hook b/restart_iptables.hook new file mode 100644 index 0000000..b759143 --- /dev/null +++ b/restart_iptables.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = iptables + +[Action] +Description = Restarting IPTables service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook iptables.service diff --git a/restart_mariadb.hook b/restart_mariadb.hook new file mode 100644 index 0000000..f092934 --- /dev/null +++ b/restart_mariadb.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = mariadb + +[Action] +Description = Restarting MariaDB service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook mariadb.service diff --git a/restart_networkmanager.hook b/restart_networkmanager.hook new file mode 100644 index 0000000..7caa650 --- /dev/null +++ b/restart_networkmanager.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = networkmanager + +[Action] +Description = Restarting NetworkManaager service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook NetworkManager.service diff --git a/restart_nginx.hook b/restart_nginx.hook new file mode 100644 index 0000000..1e71df0 --- /dev/null +++ b/restart_nginx.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = nginx + +[Action] +Description = Restarting NGINX service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook nginx.service diff --git a/restart_ntpd.hook b/restart_ntpd.hook new file mode 100644 index 0000000..2e027c6 --- /dev/null +++ b/restart_ntpd.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = ntpd + +[Action] +Description = Restarting NTP service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook ntpd.service diff --git a/restart_packagekit.hook b/restart_packagekit.hook new file mode 100644 index 0000000..b9c0566 --- /dev/null +++ b/restart_packagekit.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = packagekit + +[Action] +Description = Restarting PackageKit service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook packagekit.service diff --git a/restart_pcp.hook b/restart_pcp.hook new file mode 100644 index 0000000..24802b2 --- /dev/null +++ b/restart_pcp.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = pcp + +[Action] +Description = Restarting Performance Co-Pilot services +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook pmcd.service pmie.service pmie_farm.service pmlogger.service pmlogger_farm.service diff --git a/restart_php-fpm.hook b/restart_php-fpm.hook new file mode 100644 index 0000000..1958fdf --- /dev/null +++ b/restart_php-fpm.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = php-fpm + +[Action] +Description = Restarting PHP FastCGI Process Manager service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook php-fpm.service diff --git a/restart_polkit.hook b/restart_polkit.hook new file mode 100644 index 0000000..4d2cd36 --- /dev/null +++ b/restart_polkit.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = polkit + +[Action] +Description = Restarting PolicyKit service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook polkit.service diff --git a/restart_postfix.hook b/restart_postfix.hook new file mode 100644 index 0000000..383992b --- /dev/null +++ b/restart_postfix.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = postfix + +[Action] +Description = Restarting postfix service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook postfix.service diff --git a/restart_qemu-guest-agent.hook b/restart_qemu-guest-agent.hook new file mode 100644 index 0000000..c4ad7d1 --- /dev/null +++ b/restart_qemu-guest-agent.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = qemu-guest-agent + +[Action] +Description = Restarting QEMU Guest Agent service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook qemu-guest-agent.service diff --git a/restart_redis.hook b/restart_redis.hook new file mode 100644 index 0000000..42ce7fb --- /dev/null +++ b/restart_redis.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = redis + +[Action] +Description = Restarting redis service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook redis.service diff --git a/restart_rspamd.hook b/restart_rspamd.hook new file mode 100644 index 0000000..895cd90 --- /dev/null +++ b/restart_rspamd.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = rspamd + +[Action] +Description = Restarting rspamd service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook rspamd.service diff --git a/restart_sshd.hook b/restart_sshd.hook new file mode 100644 index 0000000..6d74b54 --- /dev/null +++ b/restart_sshd.hook @@ -0,0 +1,12 @@ +# Reload systemd services on package upgrades + +[Trigger] +Operation = Upgrade +Type = Package +Target = openssh + +[Action] +Description = Restarting OpenSSH service +Depends = systemd +When = PostTransaction +Exec = /etc/pacman.d/scripts/restart-hook sshd.service