📢 Webサイト閉鎖と移転のお知らせ
このWebサイトは2026年9月に閉鎖いたします。
新しい記事は移転先で追加しております。(旧サイトでは記事を追加しておりません)

548行目: 548行目:
     if [ -n "KVM_STATUS" ]; then
     if [ -n "KVM_STATUS" ]; then
       sudo systemctl stop libvirtd libvirtd.socket libvirtd-admin.socket libvirtd-ro.socket
       sudo systemctl stop libvirtd libvirtd.socket libvirtd-admin.socket libvirtd-ro.socket
    fi
}
# Apache2とMySQLの起動
function startlamp()
{
    local APACHE2_STATUS=$(sudo systemctl status apache2 | grep -ie "Active:" | grep -ie "dead")
    if [ -n "APACHE2_STATUS" ]; then
      sudo systemctl start apache2
    fi
    local MYSQL8_STATUS=$(sudo systemctl status mysql | grep -ie "Active:" | grep -ie "dead")
    if [ -n "MYSQL8_STATUS" ]; then
      sudo systemctl start mysql
    fi
}
# Apache2とMySQLの停止
function stoplamp()
{
    local APACHE2_STATUS=$(sudo systemctl status libvirtd | grep "Active:" | grep -ie "running")
    if [ -n "APACHE2_STATUS" ]; then
      sudo systemctl stop apache2
    fi
    local MYSQL8_STATUS=$(sudo systemctl status libvirtd | grep "Active:" | grep -ie "running")
    if [ -n "MYSQL8_STATUS" ]; then
      sudo systemctl stop mysql
     fi
     fi
  }
  }