create two files:
- /etc/acpi/events/lm_lid
- /etc/acpi/lid.sh (chmod +x /etc/acpi/lid.sh)
restart acpid service:
- systemctl restart acpid.service
alias downloadtime='curl -s -w "%{time_total}\n" -o /dev/null $1' | |
alias pgoogle='ping google.com' | |
alias pindex='ping index.hu' | |
alias pdefroute='ping $(netstat -rn | grep "^0.0.0.0" | tr -s [:space:] | cut -f 2 -d " ")' | |
alias ifconfig-ext='host myip.opendns.com resolver1.opendns.com | grep "myip.opendns.com has addres"' | |
alias mkdirdatetime='mkdir $(date +%Y%m%d-%H%M)' | |
alias showwifichannles='sudo iwlist wlp4s0 scan | grep Frequency | sort | uniq -c | sort -n' | |
sssh (){ | |
if [ -n "$2" ]; then |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: repcached | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: repcached - Memory caching daemon replicated |
[Unit] | |
Description=Kurento Media Server daemon | |
After=network.target | |
[Service] | |
ExecStart=/usr/bin/kurento-media-server | |
Type=simple | |
PIDFile=/var/run/kurento-media-server.pid | |
Restart=always |
create two files:
restart acpid service:
[Unit] | |
Description=turnserver - coturn TURN server | |
After=network.target | |
[Service] | |
ExecStart=/usr/local/bin/turnserver -c /etc/turnserver.conf -o --no-stdout-log | |
Type=forking | |
PIDFile=/var/run/turnserver.pid | |
Restart=always |
# /etc/turnserver.conf | |
external-ip=11.22.33.44/10.0.0.44 | |
tls-listening-port=443 | |
listening-port=443 | |
min-port=49152 | |
max-port=65535 | |
verbose | |
lt-cred-mech | |
user=demo:asdf1234 |
# /etc/logrotate.d/turnserver | |
/var/log/turnserver.log { | |
daily | |
rotate 14 | |
compress | |
missingok | |
notifempty | |
create 644 root root | |
su root root |
#!/bin/sh | |
/usr/sbin/ntpdate -s 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org |
#!/bin/bash | |
index=$(date --date='14 days ago' +%Y.%m.%d) | |
curl -s -XDELETE "http://localhost:9200/filebeat-$index?pretty" |
# /etc/apt/apt.conf | |
Acquire::Check-Valid-Until false; |