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.
/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/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/etc/init.d
....also while responding to someone's comment please use "@name" e.g. @heemayl – heemayl Sep 16 '15 at 13:01#! /bin/sh
if [ "$1" = "status" ]
then service rsyslog status
elif [ "$1" = "start" ]
then service rsyslog start
elif [ "$1" = "stop" ]
then service rsyslog stop
fi
– Sanjib Sep 18 '15 at 08:38