What is the systemctl equivalent
I am converting a package from .rpm to .deb using this tutorial. However, to test and debug the application I need to run it. The programs readme explains to run it as a service with:
systemctl enable progname.service
systemctl start progname.service
What is the equivalent on ubuntu for these commands?
Ubuntu is currently planning/developing to use systemd in the future. See following links for info: Vivid will switch to booting with systemd... and Release notes: Boot and service management
I am using 14.04.
You can use the more native command update-rc.d
. Check the man page.
Enabling a service with defaults (see man page):
sudo update-rc.d foo_service defaults
Disabling a service:
sudo update-rc.d foo_service remove
Note that in order to remove without error message the foo_service file must not be present. However you can force:
sudo update-rc.d -f foo_service remove
systemctl is the control utility for systemd:
http://www.freedesktop.org/software/systemd/man/systemctl.html
Note that Ubuntu doesn't use systemd, it uses upstart, which does a few of the same things in principle, but has some different concepts.
Without much knowledge about systemd, and based on what I read in the document I posted, I think you don't need to "enable" a service. Just dropping the .conf file for your service in /etc/init should make upstart aware of it.
That's the crux of the matter, though: the systemd config file for your service won't work unmodified on Ubuntu, you have to "translate" that to an equivalent version for Upstart. Here's documentation for upstart:
http://upstart.ubuntu.com/cookbook/
Once you have a suitable upstart .conf file, you can start a service (equivalent, I think, to systemctl start) using:
start your-service
Default package on 14.04 is systemd-services
that doesn't provides the systemdctl
command.
Read
You must read the article How To Install And Test Systemd On Ubuntu 14.04 Trusty Tahr And Ubuntu 12.04 Precise Pangolin if you want to use systemd
.
Pitti PPA
There is a PPA ppa:pitti/systemd
that provide the adequate package for LTS 12.04, 14.04 and upcoming.