This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ACPI_BALANCE="\_SB_.PC00.LPCB.EC0_.VPC0.DYTC 0x000FB001" | |
ACPI_POWER="\_SB_.PC00.LPCB.EC0_.VPC0.DYTC 0x0012B001" | |
ACPI_ECO="\_SB_.PC00.LPCB.EC0_.VPC0.DYTC 0x0013B001" | |
ACPI_MODE="\_SB_.PC00.LPCB.EC0_.SPMO" | |
MODE=$(sudo sh -c "echo '$ACPI_MODE' > /proc/acpi/call; tr -d '\0' < /proc/acpi/call") | |
MODE=${MODE:2} | |
TARGET=$(((MODE+1)%3)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
####################### | |
# Setup: | |
# 1. Setup a VPN in the Synology web interface | |
# 2. Log in via SSH | |
# 3. Take a look at /usr/syno/etc/synovpnclient/openvpn/ovpnclient.conf | |
# 3. Find your VPN entry and fill in the variables below. | |
# ID = the CLIENT ID, shown between square brackets, e.g. "[o123456789]" | |
# CONFNAME = value of "conf_name" | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# HOW TO USE | |
# based on https://gist.github.com/MLescaudron/e8248d32d3a5b8caaf622c1a829cf067 | |
# ./updateSecret.sh secretName newFile | |
# It's that simple ! | |
if [ "$#" -ne 2 ]; | |
then | |
echo "#####" |