Tag: systemctl

  • How To Use Systemctl to Manage Systemd Services and Units

    All credits to: @ Digitalocean.com Justin Ellingwood   Introduction Systemd is an init system and system manager that is widely becoming the new standard for Linux machines. While there are considerable opinions about whether systemd is an improvement over the traditional SysV init systems it is replacing, the majority of distributions plan to adopt it or…

  • Docker autostart container

    Docker autostart container

    Create service make file in /etc/systemd/system/ cd /etc/systemd/system nano /docker-[containername].service Insert following code: [Unit] Description=Docker [containername] server Requires=docker.service After=docker.service [Service] Restart=always ExecStart=/usr/bin/docker start -a [containername] ExecStop=/usr/bin/docker stop -t 2 [containername] [Install] WantedBy=default.target Add service to systemd systemctl enable docker-[containername].service When system reboots, service will be started.