/etc/init.d/rsyslog {start | stop | restart} : Need this to work
up vote
0
down vote
favorite
I have read the answer/comments for the thread
Diffrence between /etc/init.d/ssh start and service ssh start.
But I need this /etc/init.d
method to be working. I have some auto-generated scripts which invoke /etc/init.d
method only. Could you kindly provide me some fix/workaround for this?
services init.d
|
show 2 more comments
up vote
0
down vote
favorite
I have read the answer/comments for the thread
Diffrence between /etc/init.d/ssh start and service ssh start.
But I need this /etc/init.d
method to be working. I have some auto-generated scripts which invoke /etc/init.d
method only. Could you kindly provide me some fix/workaround for this?
services init.d
The old SysV method of putting script in/etc/init.d
will still work if everything is in place. Also note thatservice
is a good option in the sense that it will first look in/etc/init
and then/etc/init.d
for the script so if a script is only in/etc/init.d
thenservice
will do the same as/etc/init.d/script start|stop|restart
..what is your goal ?
– heemayl
Sep 16 '15 at 12:06
@heemayl I'd be curious to know if that's actually the case though. Upstart (et al) have very different ways of monitoring the PID and status of things, so if Upstart starts rsyslog, will the sysv-init version be able to stop it? Would the upstart command be able to stop a sysv-init version?
– Oli♦
Sep 16 '15 at 12:10
@Oli if both scripts exist then the one in/etc/init.d
would contain some logic that would skip it if the init is upstart/systemd..if the script is only in /etc/init.d then it would work as expected..
– heemayl
Sep 16 '15 at 12:13
Hi Heemay, thanks for your comments..well, actually I am trying to install defense4all package & this guy keeps on complaining about "Failed to start rsyslog service". After some investigation I saw it uses one auto/runtime generated script to start 'rsyslogd' through /etc/init.d. I am very new to this defense4all & I donno where to change that script (if at all possible). To me, making /etc/init.d working looked easier compared to that other option. I understand /etc/init.d is not the recommended method, but I thought there might be some workaround for this.
– Sanjib
Sep 16 '15 at 12:14
Hard to tell without seeing the insights..please edit your question and the mentioned script residing in/etc/init.d
....also while responding to someone's comment please use "@name" e.g. @heemayl
– heemayl
Sep 16 '15 at 13:01
|
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have read the answer/comments for the thread
Diffrence between /etc/init.d/ssh start and service ssh start.
But I need this /etc/init.d
method to be working. I have some auto-generated scripts which invoke /etc/init.d
method only. Could you kindly provide me some fix/workaround for this?
services init.d
I have read the answer/comments for the thread
Diffrence between /etc/init.d/ssh start and service ssh start.
But I need this /etc/init.d
method to be working. I have some auto-generated scripts which invoke /etc/init.d
method only. Could you kindly provide me some fix/workaround for this?
services init.d
services init.d
edited Apr 3 at 6:19
Melebius
4,22451837
4,22451837
asked Sep 16 '15 at 11:59
Sanjib
614
614
The old SysV method of putting script in/etc/init.d
will still work if everything is in place. Also note thatservice
is a good option in the sense that it will first look in/etc/init
and then/etc/init.d
for the script so if a script is only in/etc/init.d
thenservice
will do the same as/etc/init.d/script start|stop|restart
..what is your goal ?
– heemayl
Sep 16 '15 at 12:06
@heemayl I'd be curious to know if that's actually the case though. Upstart (et al) have very different ways of monitoring the PID and status of things, so if Upstart starts rsyslog, will the sysv-init version be able to stop it? Would the upstart command be able to stop a sysv-init version?
– Oli♦
Sep 16 '15 at 12:10
@Oli if both scripts exist then the one in/etc/init.d
would contain some logic that would skip it if the init is upstart/systemd..if the script is only in /etc/init.d then it would work as expected..
– heemayl
Sep 16 '15 at 12:13
Hi Heemay, thanks for your comments..well, actually I am trying to install defense4all package & this guy keeps on complaining about "Failed to start rsyslog service". After some investigation I saw it uses one auto/runtime generated script to start 'rsyslogd' through /etc/init.d. I am very new to this defense4all & I donno where to change that script (if at all possible). To me, making /etc/init.d working looked easier compared to that other option. I understand /etc/init.d is not the recommended method, but I thought there might be some workaround for this.
– Sanjib
Sep 16 '15 at 12:14
Hard to tell without seeing the insights..please edit your question and the mentioned script residing in/etc/init.d
....also while responding to someone's comment please use "@name" e.g. @heemayl
– heemayl
Sep 16 '15 at 13:01
|
show 2 more comments
The old SysV method of putting script in/etc/init.d
will still work if everything is in place. Also note thatservice
is a good option in the sense that it will first look in/etc/init
and then/etc/init.d
for the script so if a script is only in/etc/init.d
thenservice
will do the same as/etc/init.d/script start|stop|restart
..what is your goal ?
– heemayl
Sep 16 '15 at 12:06
@heemayl I'd be curious to know if that's actually the case though. Upstart (et al) have very different ways of monitoring the PID and status of things, so if Upstart starts rsyslog, will the sysv-init version be able to stop it? Would the upstart command be able to stop a sysv-init version?
– Oli♦
Sep 16 '15 at 12:10
@Oli if both scripts exist then the one in/etc/init.d
would contain some logic that would skip it if the init is upstart/systemd..if the script is only in /etc/init.d then it would work as expected..
– heemayl
Sep 16 '15 at 12:13
Hi Heemay, thanks for your comments..well, actually I am trying to install defense4all package & this guy keeps on complaining about "Failed to start rsyslog service". After some investigation I saw it uses one auto/runtime generated script to start 'rsyslogd' through /etc/init.d. I am very new to this defense4all & I donno where to change that script (if at all possible). To me, making /etc/init.d working looked easier compared to that other option. I understand /etc/init.d is not the recommended method, but I thought there might be some workaround for this.
– Sanjib
Sep 16 '15 at 12:14
Hard to tell without seeing the insights..please edit your question and the mentioned script residing in/etc/init.d
....also while responding to someone's comment please use "@name" e.g. @heemayl
– heemayl
Sep 16 '15 at 13:01
The old SysV method of putting script in
/etc/init.d
will still work if everything is in place. Also note that service
is a good option in the sense that it will first look in /etc/init
and then /etc/init.d
for the script so if a script is only in /etc/init.d
then service
will do the same as /etc/init.d/script start|stop|restart
..what is your goal ?– heemayl
Sep 16 '15 at 12:06
The old SysV method of putting script in
/etc/init.d
will still work if everything is in place. Also note that service
is a good option in the sense that it will first look in /etc/init
and then /etc/init.d
for the script so if a script is only in /etc/init.d
then service
will do the same as /etc/init.d/script start|stop|restart
..what is your goal ?– heemayl
Sep 16 '15 at 12:06
@heemayl I'd be curious to know if that's actually the case though. Upstart (et al) have very different ways of monitoring the PID and status of things, so if Upstart starts rsyslog, will the sysv-init version be able to stop it? Would the upstart command be able to stop a sysv-init version?
– Oli♦
Sep 16 '15 at 12:10
@heemayl I'd be curious to know if that's actually the case though. Upstart (et al) have very different ways of monitoring the PID and status of things, so if Upstart starts rsyslog, will the sysv-init version be able to stop it? Would the upstart command be able to stop a sysv-init version?
– Oli♦
Sep 16 '15 at 12:10
@Oli if both scripts exist then the one in
/etc/init.d
would contain some logic that would skip it if the init is upstart/systemd..if the script is only in /etc/init.d then it would work as expected..– heemayl
Sep 16 '15 at 12:13
@Oli if both scripts exist then the one in
/etc/init.d
would contain some logic that would skip it if the init is upstart/systemd..if the script is only in /etc/init.d then it would work as expected..– heemayl
Sep 16 '15 at 12:13
Hi Heemay, thanks for your comments..well, actually I am trying to install defense4all package & this guy keeps on complaining about "Failed to start rsyslog service". After some investigation I saw it uses one auto/runtime generated script to start 'rsyslogd' through /etc/init.d. I am very new to this defense4all & I donno where to change that script (if at all possible). To me, making /etc/init.d working looked easier compared to that other option. I understand /etc/init.d is not the recommended method, but I thought there might be some workaround for this.
– Sanjib
Sep 16 '15 at 12:14
Hi Heemay, thanks for your comments..well, actually I am trying to install defense4all package & this guy keeps on complaining about "Failed to start rsyslog service". After some investigation I saw it uses one auto/runtime generated script to start 'rsyslogd' through /etc/init.d. I am very new to this defense4all & I donno where to change that script (if at all possible). To me, making /etc/init.d working looked easier compared to that other option. I understand /etc/init.d is not the recommended method, but I thought there might be some workaround for this.
– Sanjib
Sep 16 '15 at 12:14
Hard to tell without seeing the insights..please edit your question and the mentioned script residing in
/etc/init.d
....also while responding to someone's comment please use "@name" e.g. @heemayl– heemayl
Sep 16 '15 at 13:01
Hard to tell without seeing the insights..please edit your question and the mentioned script residing in
/etc/init.d
....also while responding to someone's comment please use "@name" e.g. @heemayl– heemayl
Sep 16 '15 at 13:01
|
show 2 more comments
2 Answers
2
active
oldest
votes
up vote
0
down vote
The last answer is a way to solve the defense4all
installation problem about "Failed to start rsyslog service".This problem is caused by the bug of rsyslog (maybe, I found on the other webs), you can use service rsyslog
instead of /etc/init.d/rsyslog
, so you can edit the file in defense4all
code files to solve this problem.
In the file:
../defense4all/dfapp.aggregate/src/install/config_rsyslog.bash
change the last sentences:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog stop
and:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog start
And then rebuild the project to create .deb or .rpm files.Hope this may help you.
add a comment |
up vote
0
down vote
You faced this problem because the rsyslog script in newer Ubuntu is written to be handled by upstart and not the traditional init daemon.
I saw your fix in the comments above. Another workaround that allows your automation scripts to continue using /etc/init.d/rsyslog start|stop
is -
Edit the file /etc/init.d/rsyslog
, comment/delete all instances of following code block -
if init_is_upstart; then
exit 1 (or exit 0)
fi
Now
/etc/init.d/rsyslog start|stop
should work.
For more information, see this.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The last answer is a way to solve the defense4all
installation problem about "Failed to start rsyslog service".This problem is caused by the bug of rsyslog (maybe, I found on the other webs), you can use service rsyslog
instead of /etc/init.d/rsyslog
, so you can edit the file in defense4all
code files to solve this problem.
In the file:
../defense4all/dfapp.aggregate/src/install/config_rsyslog.bash
change the last sentences:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog stop
and:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog start
And then rebuild the project to create .deb or .rpm files.Hope this may help you.
add a comment |
up vote
0
down vote
The last answer is a way to solve the defense4all
installation problem about "Failed to start rsyslog service".This problem is caused by the bug of rsyslog (maybe, I found on the other webs), you can use service rsyslog
instead of /etc/init.d/rsyslog
, so you can edit the file in defense4all
code files to solve this problem.
In the file:
../defense4all/dfapp.aggregate/src/install/config_rsyslog.bash
change the last sentences:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog stop
and:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog start
And then rebuild the project to create .deb or .rpm files.Hope this may help you.
add a comment |
up vote
0
down vote
up vote
0
down vote
The last answer is a way to solve the defense4all
installation problem about "Failed to start rsyslog service".This problem is caused by the bug of rsyslog (maybe, I found on the other webs), you can use service rsyslog
instead of /etc/init.d/rsyslog
, so you can edit the file in defense4all
code files to solve this problem.
In the file:
../defense4all/dfapp.aggregate/src/install/config_rsyslog.bash
change the last sentences:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog stop
and:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog start
And then rebuild the project to create .deb or .rpm files.Hope this may help you.
The last answer is a way to solve the defense4all
installation problem about "Failed to start rsyslog service".This problem is caused by the bug of rsyslog (maybe, I found on the other webs), you can use service rsyslog
instead of /etc/init.d/rsyslog
, so you can edit the file in defense4all
code files to solve this problem.
In the file:
../defense4all/dfapp.aggregate/src/install/config_rsyslog.bash
change the last sentences:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog stop
and:
/etc/init.d/rsyslog stop > /dev/null
to:
service rsyslog start
And then rebuild the project to create .deb or .rpm files.Hope this may help you.
edited Nov 7 '15 at 12:04
KGIII
1,2311817
1,2311817
answered Nov 7 '15 at 8:25
Yona
1
1
add a comment |
add a comment |
up vote
0
down vote
You faced this problem because the rsyslog script in newer Ubuntu is written to be handled by upstart and not the traditional init daemon.
I saw your fix in the comments above. Another workaround that allows your automation scripts to continue using /etc/init.d/rsyslog start|stop
is -
Edit the file /etc/init.d/rsyslog
, comment/delete all instances of following code block -
if init_is_upstart; then
exit 1 (or exit 0)
fi
Now
/etc/init.d/rsyslog start|stop
should work.
For more information, see this.
add a comment |
up vote
0
down vote
You faced this problem because the rsyslog script in newer Ubuntu is written to be handled by upstart and not the traditional init daemon.
I saw your fix in the comments above. Another workaround that allows your automation scripts to continue using /etc/init.d/rsyslog start|stop
is -
Edit the file /etc/init.d/rsyslog
, comment/delete all instances of following code block -
if init_is_upstart; then
exit 1 (or exit 0)
fi
Now
/etc/init.d/rsyslog start|stop
should work.
For more information, see this.
add a comment |
up vote
0
down vote
up vote
0
down vote
You faced this problem because the rsyslog script in newer Ubuntu is written to be handled by upstart and not the traditional init daemon.
I saw your fix in the comments above. Another workaround that allows your automation scripts to continue using /etc/init.d/rsyslog start|stop
is -
Edit the file /etc/init.d/rsyslog
, comment/delete all instances of following code block -
if init_is_upstart; then
exit 1 (or exit 0)
fi
Now
/etc/init.d/rsyslog start|stop
should work.
For more information, see this.
You faced this problem because the rsyslog script in newer Ubuntu is written to be handled by upstart and not the traditional init daemon.
I saw your fix in the comments above. Another workaround that allows your automation scripts to continue using /etc/init.d/rsyslog start|stop
is -
Edit the file /etc/init.d/rsyslog
, comment/delete all instances of following code block -
if init_is_upstart; then
exit 1 (or exit 0)
fi
Now
/etc/init.d/rsyslog start|stop
should work.
For more information, see this.
answered Apr 13 '16 at 13:50
Siddu
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f674769%2fetc-init-d-rsyslog-start-stop-restart-need-this-to-work%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The old SysV method of putting script in
/etc/init.d
will still work if everything is in place. Also note thatservice
is a good option in the sense that it will first look in/etc/init
and then/etc/init.d
for the script so if a script is only in/etc/init.d
thenservice
will do the same as/etc/init.d/script start|stop|restart
..what is your goal ?– heemayl
Sep 16 '15 at 12:06
@heemayl I'd be curious to know if that's actually the case though. Upstart (et al) have very different ways of monitoring the PID and status of things, so if Upstart starts rsyslog, will the sysv-init version be able to stop it? Would the upstart command be able to stop a sysv-init version?
– Oli♦
Sep 16 '15 at 12:10
@Oli if both scripts exist then the one in
/etc/init.d
would contain some logic that would skip it if the init is upstart/systemd..if the script is only in /etc/init.d then it would work as expected..– heemayl
Sep 16 '15 at 12:13
Hi Heemay, thanks for your comments..well, actually I am trying to install defense4all package & this guy keeps on complaining about "Failed to start rsyslog service". After some investigation I saw it uses one auto/runtime generated script to start 'rsyslogd' through /etc/init.d. I am very new to this defense4all & I donno where to change that script (if at all possible). To me, making /etc/init.d working looked easier compared to that other option. I understand /etc/init.d is not the recommended method, but I thought there might be some workaround for this.
– Sanjib
Sep 16 '15 at 12:14
Hard to tell without seeing the insights..please edit your question and the mentioned script residing in
/etc/init.d
....also while responding to someone's comment please use "@name" e.g. @heemayl– heemayl
Sep 16 '15 at 13:01