Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if systemd is available #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions packaging/scripts/postinstall.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
systemctl daemon-reload
systemctl enable process-exporter.service
systemctl restart process-exporter.service
#!/bin/sh
# postinstall script for prometheus-process-exporter
# Script executed after the package is removed.

if [ -d /run/systemd/system ]; then
systemctl daemon-reload
systemctl enable process-exporter.service
systemctl restart process-exporter.service
fi
8 changes: 7 additions & 1 deletion packaging/scripts/postremove.sh
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
systemctl daemon-reload
#!/bin/sh
# postremove script for prometheus-process-exporter
# Script executed after the package is removed.

if [ -d /run/systemd/system ]; then
systemctl daemon-reload
fi
10 changes: 8 additions & 2 deletions packaging/scripts/preremove.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
systemctl stop process-exporter.service
systemctl disable process-exporter.service
#!/bin/sh
# preremove script for prometheus-process-exporter
# Script executed after the package is removed.

if [ -d /run/systemd/system ]; then
systemctl stop process-exporter.service
systemctl disable process-exporter.service
fi