restart shell code example
Example 1: centos stop apache
systemctl restart httpd.service
systemctl start httpd.service
systemctl stop httpd.service
Example 2: ubuntu restart systemctl
systemctl restart <name>
systemctl restart httpd.service
systemctl start httpd.service
systemctl stop httpd.service
systemctl restart <name>