Automatically start dwagent service while system boot in linux
I need to start Dwagent service while System Boot in feodra 22(Before User login).
manually start the service using /etc/init.d/dwagent start
What i did before:
add a script to /root/.bash_profile
/etc/init.d/dwagent start
After Reboot, its not working for me.
add to chkconfig
follow this link to add dwagent to chkconfig
chkconfig --add dwagent chkconfig --list
chkconfig --list Note:
This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. If you want to list systemd services use 'systemctl list-unit-files'. To see services enabled on particular target use 'systemctl list-dependencies [target]'.
dwagent 0:off 1:off 2:on 3:on 4:on 5:on 6:off
its add to chkconfig list after the i reboot the system, now also not working for me.
Use the init scripts
Add my myscript.sh script to the folder named /etc/init.d.
myscript.sh:
#!bin/bash /etc/init.d/dwagent start
After editing and saving, i give file executable permission.
chmod +x /etc/init.d/myscript.sh.
Reboot system and But.its not start the dwagent service for me,
reference: https://ask.fedoraproject.org/en/ques...
Suggest me How to do that?.
Further reading:
https://fedoramagazine.org/systemd-co...