Skip to content

Instantly share code, notes, and snippets.

pid_file /var/run/mosquitto.pid
persistence false
persistence_location /var/lib/mosquitto/
include_dir /etc/mosquitto/conf.d
allow_anonymous false
password_file /etc/mosquitto/passwd
sudo apt install mosquitto
sudo mosquitto_passwd -c /etc/mosquitto/passwd iot
sudo mosquitto_passwd /etc/mosquitto/passwd user
sudo mv /etc/mosquitto.conf /etc/mosquitto.conf.bak
sudo nano /etc/mosquitto.conf
# HOST
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt update
apt install wireguard pve-headers
echo "wireguard" >> /etc/modules-load.d/modules.conf
# Container
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable

Keybase proof

I hereby claim:

  • I am ishrak1010 on github.
  • I am ishrak1010 (https://keybase.io/ishrak1010) on keybase.
  • I have a public key ASApQTqaWOL8XOg2h9TmocdcUel5fZk6TC5g8KS5PI74Cwo

To claim this, I am signing this object:

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar xvfz asterisk-13-current.tar.gz
sudo apt-get update
sudo apt-get install subversion
cd asterisk-*/
contrib/scripts/get_mp3_source.sh
contrib/scripts/install_prereq install
./configure --with-jansson-bundled
make menuselect
:local Token "your-token"
:local Domain "subdomain"
:global PreviousIP
:log info ("DuckDNS: Checking IP")
/tool fetch mode=https url="https://api.ipify.org/" dst-path=ip.txt
:local ExternalIP [/file get ip.txt contents]
:if ($ExternalIP != $previousIP) do={
:local Token "your-token"
:local Domain "subdomain"
:local WanInterface "ether1"
:global PreviousIP
:global ExternalIP
:log info ("DuckDNS: Checking IP")
:local CurrentIP [/ip address get [/ip address find interface=$WanInterface ] address];
:set ExternalIP [:pick $CurrentIP 0 [:find $CurrentIP "/"]];
perfoverlay.drawfps 1
gametime.maxvariablefps 300
// Create
servercreate virtualserver_name=VS1 virtualserver_port=9090 virtualserver_maxclients=50
// Edit
use_port=9090
serveredit virtualserver_maxclients=50
// Permissions
servergroupdelperm sgid=3 permsid=b_virtualserver_modify_maxclients|permsid=i_needed_modify_power_virtualserver_modify_maxclients|permsid=b_virtualserver_snapshot_deploy|permsid=b_virtualserver_snapshot_create|permsid=i_needed_modify_power_virtualserver_snapshot_deploy|permsid=i_needed_modify_power_virtualserver_snapshot_create
exec 2> /tmp/rc.local.log
exec 1>&2
set -x
su - user -c '/path/to/script.sh' &
exit 0