-
Notifications
You must be signed in to change notification settings - Fork 98
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
Changes in check for systemd #269
base: master
Are you sure you want to change the base?
Changes from 11 commits
0c7cb26
d973296
1669231
dc86f0e
70a8c5c
125fe42
aca0c5d
7d74842
b331dac
0961e33
84e8454
4ee1ba3
6765088
83a6352
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,8 @@ case "$1" in | |
rm -rf ${WAZUH_TMP_DIR} | ||
fi | ||
|
||
if [ -d /run/systemd/system ] ; then | ||
|
||
if [ ! -z "$(file /sbin/init |grep "systemd")" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 6765088 |
||
systemctl disable wazuh-agent > /dev/null 2>&1 | ||
systemctl daemon-reload | ||
systemctl reset-failed | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,7 +339,7 @@ case "$1" in | |
|
||
# Service | ||
if [ -x /etc/init.d/wazuh-manager ]; then | ||
if [ -d /run/systemd/system ]; then | ||
if [ ! -z "$(file /sbin/init |grep "systemd")" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 6765088 |
||
systemctl daemon-reload | ||
systemctl enable wazuh-manager > /dev/null 2>&1 | ||
fi | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ case "$1" in | |
|
||
|
||
|
||
if [ -d /run/systemd/system ] ; then | ||
if [ ! -z "$(file /sbin/init |grep "systemd")" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 6765088 |
||
systemctl disable wazuh-manager > /dev/null 2>&1 | ||
systemctl daemon-reload | ||
systemctl reset-failed | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: what about to use:
if [ ! -z "$(file /sbin/init |grep 'systemd')" ]; then
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 6765088