Compare commits
No commits in common. "b3e42307fdc6bd1d2579b11ec92f51bcc27c0198" and "9e91cb5022903ff09e5140e25d634a81ef316572" have entirely different histories.
b3e42307fd
...
9e91cb5022
@ -1,12 +0,0 @@
|
|||||||
# Install using: sudo su -c "bash <(wget -qO- /url/to/install-apache.sh)"
|
|
||||||
|
|
||||||
# Make sure script is ran as root
|
|
||||||
if [[ $EUID -ne 0 ]]; then
|
|
||||||
exec sudo /bin/bash "$0" "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
apt-get remove update-manager
|
|
||||||
|
|
||||||
# Or comment out DPkg::Post-Invoke -line in 99update-notifier
|
|
||||||
# nano /etc/apt/apt.conf.d/99update-notifier
|
|
||||||
# #DPkg::Post-Invoke {"if [ -d /var/lib/update-notifier ]; then touch /var/lib/update-notifier/dpkg-run-stamp; fi; if [ -e /var/lib/update-notifier/updates-available ]; then echo > /var/lib/update-notifier/updates-available; fi "; };
|
|
@ -1,26 +0,0 @@
|
|||||||
# Install using: sudo su -c "bash <(wget -qO- /url/to/install-pdftk.sh)"
|
|
||||||
# description: bash script to install pdftk on Ubuntu 18.04 for amd64 machines
|
|
||||||
|
|
||||||
# Make sure script is ran as root
|
|
||||||
if [[ $EUID -ne 0 ]]; then
|
|
||||||
exec sudo /bin/bash "$0" "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl https://downloads.plex.tv/plex-keys/PlexSign.key | apt-key add -
|
|
||||||
echo deb https://downloads.plex.tv/repo/deb public main | tee /etc/apt/sources.list.d/plexmediaserver.list
|
|
||||||
apt update
|
|
||||||
apt install plexmediaserver
|
|
||||||
systemctl status plexmediaserver
|
|
||||||
nano /etc/ufw/applications.d/plexmediaserver
|
|
||||||
|
|
||||||
ufw app update plexmediaserver
|
|
||||||
ufw allow plexmediaserver-all
|
|
||||||
ufw status verbose
|
|
||||||
|
|
||||||
mkdir -p /opt/plexmedia/{movies,series,music}
|
|
||||||
chown -R plex: /opt/plexmedia
|
|
||||||
apt-get install cifs-utils
|
|
||||||
|
|
||||||
mkdir /media/multimedia
|
|
||||||
|
|
||||||
# //192.168.0.4/Multimedia /media/multimedia cifs username=xbox,password=xbox 0 0
|
|
@ -1,38 +0,0 @@
|
|||||||
# Install using: sudo su -c "bash <(wget -qO- /url/to/install-wkhtmltopdf.sh)"
|
|
||||||
# https://wkhtmltopdf.org/
|
|
||||||
|
|
||||||
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
|
|
||||||
|
|
||||||
# Make sure script is ran as root
|
|
||||||
if [[ $EUID -ne 0 ]]; then
|
|
||||||
exec sudo /bin/bash "$0" "$@"
|
|
||||||
fi
|
|
||||||
REALUSER=$(logname)
|
|
||||||
OS_VERSION=$(grep -oP 'VERSION_ID="\K[\d.]+' /etc/os-release)
|
|
||||||
|
|
||||||
# apt update -qq 2>>install.log
|
|
||||||
|
|
||||||
if [ $(version $OS_VERSION) -ge $(version "22.0.0") ]; then
|
|
||||||
echo "OS version 22 detected"
|
|
||||||
DEBURL="https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb"
|
|
||||||
elif [ $(version $OS_VERSION) -ge $(version "20.0.0") ]; then
|
|
||||||
echo "OS version 20 detected"
|
|
||||||
DEBURL="https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb"
|
|
||||||
elif [ $(version $OS_VERSION) -ge $(version "18.0.0") ]; then
|
|
||||||
echo "OS version 18 detected"
|
|
||||||
DEBURL="https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb"
|
|
||||||
elif [ $(version $OS_VERSION) -ge $(version "16.0.0") ]; then
|
|
||||||
echo "OS version 16 detected"
|
|
||||||
DEBURL="https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.xenial_amd64.deb"
|
|
||||||
else
|
|
||||||
echo "Invalid OS version detected"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
TEMP_DEB="$(mktemp)" &&
|
|
||||||
wget -O "$TEMP_DEB" "$DEBURL" &&
|
|
||||||
dpkg -i "$TEMP_DEB"
|
|
||||||
apt --fix-broken install
|
|
||||||
rm -f "$TEMP_DEB"
|
|
||||||
|
|
||||||
echo 'Installation complete'
|
|
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
# Make sure script is ran as root
|
|
||||||
if [[ $EUID -ne 0 ]]; then
|
|
||||||
exec sudo /bin/bash "$0" "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
lvm lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
|
|
||||||
resize2fs /dev/ubuntu-vg/ubuntu-lv
|
|
||||||
df -h
|
|
53
MySQL.md
53
MySQL.md
@ -1,53 +0,0 @@
|
|||||||
# MySQK
|
|
||||||
|
|
||||||
## Replication
|
|
||||||
|
|
||||||
### Primary server
|
|
||||||
|
|
||||||
Config-file
|
|
||||||
<pre><code>[mysqld]
|
|
||||||
server_id = 1
|
|
||||||
log_bin = "/path/to/MySQL-bin.log"
|
|
||||||
# disable_log_bin
|
|
||||||
binlog_do_db = database-to-replicate
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
SQL
|
|
||||||
<pre><code>
|
|
||||||
CREATE USER 'replication'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
|
|
||||||
GRANT REPLICATION SLAVE ON *.* TO 'replication'@'%';
|
|
||||||
FLUSH PRIVILEGES;
|
|
||||||
SHOW MASTER STATUS;
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
### Slave server
|
|
||||||
|
|
||||||
Config-file
|
|
||||||
<pre><code>[mysqld]
|
|
||||||
server_id = 2
|
|
||||||
log_bin = "/path/to/MySQL-bin.log"
|
|
||||||
# disable_log_bin
|
|
||||||
binlog_do_db = database-to-replicate
|
|
||||||
relay-log = "/path/to/relay.log"
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
SQL
|
|
||||||
<pre><code>
|
|
||||||
-- For MySQL > 8.0
|
|
||||||
CHANGE REPLICATION SOURCE TO SOURCE_USER='replication', SOURCE_PASSWORD='password', SOURCE_HOST='192.168.0.2', SOURCE_LOG_FILE='MySQL-bin.000001', SOURCE_LOG_POS=155;
|
|
||||||
|
|
||||||
-- For MySQL <= 8.0
|
|
||||||
CHANGE MASTER TO
|
|
||||||
MASTER_HOST='192.168.0.2',
|
|
||||||
MASTER_USER='replication',
|
|
||||||
MASTER_PASSWORD='password',
|
|
||||||
MASTER_PORT=3306,
|
|
||||||
MASTER_LOG_FILE='MySQL-bin.000001',
|
|
||||||
MASTER_LOG_POS=466,
|
|
||||||
MASTER_CONNECT_RETRY=10;
|
|
||||||
|
|
||||||
START REPLICA;
|
|
||||||
STOP REPLICA;
|
|
||||||
|
|
||||||
SHOW REPLICA STATUS;
|
|
||||||
</code></pre>
|
|
@ -68,13 +68,6 @@ echo Disabling password complexity.
|
|||||||
secedit /configure /db "%windir%\security\local.sdb" /cfg "%cd%\secconfig.cfg" >nul
|
secedit /configure /db "%windir%\security\local.sdb" /cfg "%cd%\secconfig.cfg" >nul
|
||||||
del secconfig.cfg
|
del secconfig.cfg
|
||||||
|
|
||||||
choice /C yn /M "Switch to classic context menus?"
|
|
||||||
if %ERRORLEVEL% EQU 1 (
|
|
||||||
echo Switching to classic context menus.
|
|
||||||
REG ADD HKEY_CURRENT_USER\SOFTWARE\CLASSES\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 /F >nul 2>&1
|
|
||||||
taskkill /F /IM explorer.exe & start explorer
|
|
||||||
)
|
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo All done!
|
echo All done!
|
||||||
popd
|
popd
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
@echo off
|
|
||||||
net session >nul 2>&1 || (
|
|
||||||
powershell -c "start cmd -ArgumentList '/c call """%~f0""" %*' -verb runas" >nul 2>&1 || echo This script needs administrative privileges
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
|
|
||||||
pushd %~d0%~p0
|
|
||||||
|
|
||||||
choice /C yn /M "Disable powersave features?"
|
|
||||||
if %ERRORLEVEL% EQU 1 (
|
|
||||||
echo Disabling powersave features.
|
|
||||||
powercfg.exe -change -monitor-timeout-ac 0
|
|
||||||
powercfg.exe -change -disk-timeout-ac 0
|
|
||||||
powercfg.exe -change -standby-timeout-ac 0
|
|
||||||
powercfg.exe -change -hibernate-timeout-ac 0
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
echo.
|
|
||||||
echo All done!
|
|
||||||
popd
|
|
Loading…
x
Reference in New Issue
Block a user