Aller au contenu
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Debian]Configurer bouton power

Featured Replies

Posté(e)

Salut,

Je voudrais configurer le bouton power pour faire en sorte de l'arreter proprement par une simple pression :transpi: quelqu'un peut m'aider svp ?

Posté(e)

Salut,

Je voudrais configurer le bouton power pour faire en sorte de l'arreter proprement par une simple pression :roll: quelqu'un peut m'aider svp ?

Il faudrait voir à faire une recherche du côté des évènements ACPI, mais je ne vois pas de tuto bien fait pour Debian...

Le tuto sur TLDP

Bonne recherche :transpi:

Posté(e)

Salut

Tu fait :

apt-get remove apmd
apt-get install acpi acpid
sh /etc/init.d/apcid start

a+

Posté(e)
  • Auteur

Salut

Tu fait :

apt-get remove apmd
apt-get install acpi acpid
sh /etc/init.d/apcid start

a+

Salut,

Et après il faut faire comment pour configurer le bouton stp ? J'ai tout fait comme tu as dis mais après je ne sais pas...

Posté(e)
  • Auteur

Dans /etc/acpi/powerbtn.sh j'ai mis:

#!/bin/sh
# /etc/acpi/powerbtn.sh
# Initiates a shutdown when the power putton has been
# pressed.

#if ps -Af | grep -q '[k]desktop' && test -f /usr/bin/dcop
#then
#	dcop --all-sessions --all-users ksmserver ksmserver logout 0 2 0 && exit 0
#else
/sbin/shutdown -h now
#fi

Mais quand j'appuie sur le bouton ça coupe tout mais "méchamment" d'un coup. Je pense pas que ce soit très propre... J'ai pas bon où svp ?

Posté(e)
  • Auteur

Et j'ai regardé si ACPI était supporté par le noyau par un

dmesg | grep -i acpi

BIOS-e820: 000000003fe70000 - 000000003fe72000 (ACPI NVS)
BIOS-e820: 000000003fe72000 - 000000003fe93000 (ACPI data)
ACPI: RSDP (v000 DELL									  ) @ 0x000feb90
ACPI: RSDT (v001 DELL	DE051   0x00000008 ASL  0x00000061) @ 0x000fd283
ACPI: FADT (v001 DELL	DE051   0x00000008 ASL  0x00000061) @ 0x000fd2b7
ACPI: SSDT (v001   DELL	st_ex 0x00001000 MSFT 0x0100000d) @ 0xfffd1e41
ACPI: MADT (v001 DELL	DE051   0x00000008 ASL  0x00000061) @ 0x000fd32b
ACPI: BOOT (v001 DELL	DE051   0x00000008 ASL  0x00000061) @ 0x000fd397
ACPI: DSDT (v001   DELL	dt_ex 0x00001000 MSFT 0x0100000d) @ 0x00000000
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] disabled)
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x01] disabled)
ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] disabled)
Using ACPI for processor (LAPIC) configuration information
ACPI: Subsystem revision 20040326
ACPI: Interpreter disabled.
PCI: ACPI tables contain no PCI IRQ routing entries
shpchp: acpi_shpchprm:get_device PCI ROOT HID fail=0x1001
pciehp: acpi_pciehprm:get_device PCI ROOT HID fail=0x1001

Mais euh c'est pas très explicite pour moi :p quelqu'un peut me dire ce que ça veut dire svp ? Ce serait très gentil

Posté(e)
  • Auteur

Ah c'est déjà bien, mais quand j'appuie sur le bouton ça coupe d'un coup sans fermer proprement, ya pas une manip à faire ou je sais pas ? C'est une Debian Sarge

Posté(e)
  • Auteur

Svp, j'ai jusqu'à vendredi pour trouver un moyen pratique pour les employés d'éteindre le serveur facilement et rapidement, quelqu'un peut m'aider svp ?

Posté(e)
  • Auteur

Si quelqu'un a une solution autre que le bouton power et Cron pour arreter facilement je suis preneur. Quelque chose qu'un employé pourrait faire facilement et rapidement chaque soir... svp ?

Posté(e)

Si quelqu'un a une solution autre que le bouton power et Cron pour arreter facilement je suis preneur. Quelque chose qu'un employé pourrait faire facilement et rapidement chaque soir... svp ?

Console... Halt sa t'évite de devoir appuyer sur le bouton ^^

Perso lorsque je presse le buton il me coupe la machine.

voici mon fichier:

#!/bin/sh

# /etc/acpi/powerbtn.sh

# Initiates a shutdown when the power putton has been

# pressed.

[ -f /var/lock/acpisleep ] && exit 0

# If PowerManager is running, let it handle policy

if [ `pidof PowerManager` ]; then

exit

fi

if ps -Af | grep -q '[k]desktop' && test -f /usr/bin/dcop

then

dcop --all-sessions --all-users ksmserver ksmserver logout 0 2 0 && exit 0

else

/sbin/shutdown -h now "Power button pressed"

fi

Si sa ne fontionne pas essaye sa:

#!/bin/sh

# /etc/acpi/powerbtn.sh

# Initiates a shutdown when the power putton has beeb

# pressed.

#if ps -Af | grep -q ' [k]desktop' && test -f /usr/bin/dcop

#then

#dcop --all-sessions --all-users ksmserver ksmserver logout 0 2 0 && exit 0

#else

/sbin/shutdown -fh now

#fi

Dis moi si sa fonctionne

++

Mike

Modifié par lambda

Posté(e)

Salut

Il y a une autre solution .

Le serveur s'eteind tous seul comme un grand .

Tu fixe une heure puis dans la crontab tu met qu'a tel heure le serveur doit s'eteindre :) .

a+

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.