Page 1 of 1

copying services from centos 6 into centos 7

Posted: 2018/03/13 13:38:16
by yonatanvi
hi guys,

i have a Centos 6.4 and i would like to upgrade it to 7.4.
i already created a new server and copied all the desired configuration.
the issue is i have a startup service that has to be running every startup.
i copied the service to the new server into /etc/systemd/system/ and when i try enabling it, it says:

Failed to execute operation: Bad message

Re: copying services from centos 6 into centos 7

Posted: 2018/03/13 14:04:15
by TrevorH
You cannot put old style initscripts directly into /usr/lib/systemd/system or /etc/systemd/system as those are expected to be unit files which have a different syntax altogether. You can still use /etc/init.d/ to contain old style initscripts though it is better to rewrite those to become unit files instead. Use apropos systemd to get a long list of all the man pages you can read, some of the more useful ones are systemd.exec, systemd.directives and systemd.service.