sudo apt purge hostapd dnsmasq
if these setting files are existed, here is how to roll back
# Don't forget to change the "wanInterface" value below to your PPPoE interface | |
:global reconnectCount; | |
:local wanInterface "pppoe-out1"; | |
:if ($"local-address" in 100.64 .0.0/10) do={ | |
:if ($reconnectCount < 10) do={ | |
:set reconnectCount ($reconnectCount+1); | |
:log warning ("$wanInterface: Got Private IP ".$"local-address"." Reconnecting the interface..."); |
# Mikrotik Script for loop until get the public IP from NT | |
# and then set DNS A record to that public IP. | |
# | |
# Update WANIF to match your interface name. And all CloudFlare required key and info. | |
# | |
# Put this into the ppp profile UP script and assign to pppoe connection | |
# | |
:local WANIF "pppoe-1"; |
:global reconnectCount; | |
:local wanInterface "pppoe-out1"; | |
:while ( $"local-address" in 100.64.0.0/10 ) do={ | |
:log warning ("$wanInterface: Got Private IP ".$"local-address"." Reconnecting the interface..."); | |
/interface pppoe-client disable $wanInterface; | |
:delay 10s; | |
/interface pppoe-client enable $wanInterface; | |
}; | |
:log info ("$wanInterface: Got IP ".$"local-address"); |
#=== Unifi Controller === | |
# Add this line to apt source list | |
deb http://archive.raspbian.org/raspbian stretch main contrib non-free rpi | |
# add key | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9165938D90FDDD2E | |
# download installer | |
wget https://dl.ui.com/unifi/7.3.83/unifi_sysvinit_all.deb |
#!/bin/bash | |
### Date: December 2022 | |
### Description: Script to send a notification to Telegram about the RCLONE status. | |
### Version: | |
#### 0.1 - initial release | |
# | |
# Import global variable | |
# |
#!/bin/bash | |
clear | |
while : | |
do | |
cat cowfile | cowsay | |
inxi -F | |
sleep 3 | |
for TXTFILE in *.txt; do | |
cat $TXTFILE |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy import create_engine, MetaData, Table | |
# Using SQLAlchemy reflection example | |
engine = create_engine('connectionstringhere') | |
table1meta = MetaData(engine) | |
table1 = Table('Table_I_Want_to_Interact', table1meta, autoload=True) | |
DBSession = sessionmaker(bind=engine) | |
session = DBSession() | |
results = session.query(table1).filter(table1.columns.TimeStamp>="2019-02-26 18:00:00.000") |
# MikroTik – Syslog | |
source s_mikrotik { udp(port(514)); }; | |
destination d_mikrotik { file("/var/log/mikrotik.log"); }; | |
filter f_mikrotik { host("192.168.88.1"); }; | |
log { source(s_mikrotik); destination(d_mikrotik); filter(f_mikrotik); }; |
#_preseed_V1 | |
#### Contents of the preconfiguration file (for bullseye) | |
### Localization | |
# Preseeding only locale sets language, country and locale. | |
d-i debian-installer/locale string en_US | |
# The values can also be preseeded individually for greater flexibility. | |
#d-i debian-installer/language string en | |
#d-i debian-installer/country string NL | |
#d-i debian-installer/locale string en_GB.UTF-8 |