0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Debian 系 Linux を電源ボタンでシャットダウンさせる (acpid)

0
Posted at

はじめに

次の記事の内容を Proxmox VE でもやってみました。

使用した環境

Proxmox VE 8.4 で動作を確認していますが、おそらく Debian, Ubuntu でも同様に設定できるはずです。

設定方法

  1. acpid という電源管理に関するパッケージをインストールします。
  2. /etc/acpi/events/powerbtn-acpi-support を編集して、「電源ボタンが押された際に、シャットダウンコマンドを実行する」と設定します。
  3. acpid の自動起動設定を済ませた後、acpid のサービスを起動して完了です。

以下のコマンドの実行には管理者権限が必要です。
必要に応じて sudo をつけて実行してください。( sudo apt install acpid など)

apt install acpid
vi /etc/acpi/events/powerbtn-acpi-support
-------------------------------------------------------------
event=button[ /]power
action=/sbin/shutdown -h now  # シャットダウンコマンドを実行するように変更
-------------------------------------------------------------
systemctl restart acpid  # サービス再起動
systemctl enable acpid   # サービス自動起動有効化
systemctl status acpid   # 状態確認
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?