Merge remote-tracking branch 'origin/main'

This commit is contained in:
Ralf Koop 2024-06-06 11:31:22 +02:00
commit ae4adc5ede
12 changed files with 463 additions and 5 deletions

View File

@ -16,8 +16,6 @@ wichtig ist das Komma am Ende (wenn die Zeile nicht die letzte ist)
#Anleitung
#nochzubearbeiten

21
Eingang/2024-01-15.md Normal file
View File

@ -0,0 +1,21 @@
# 2024-01-15
Nextcloud AIO im Docker Passwort :
syndrome culture rotten wispy agonize popular throbbing smilingly
admin 7b52661c7f33c00a6b8f7a6214db74f72945c6960e0f7043
PHP Memory auf 1024 gesetzt :
sudo docker run --sig-proxy=false --name nextcloud-aio-mastercontainer --restart always --publish 8180:8080 --env APACHE_PORT=11000 --env APACHE_IP_BINDING=0.0.0.0 --env NEXTCLOUD_MEMORY_LIMIT=1024M --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config --volume /volume3/docker/docker.sock:/var/run/docker.sock:ro --env WATCHTOWER_DOCKER_SOCKET_PATH="/volume3/docker/docker.sock" nextcloud/all-in-one:latest
PHP Memory auf 2048 gesetzt :
sudo docker run --sig-proxy=false --name nextcloud-aio-mastercontainer --restart always --publish 8180:8080 --env APACHE_PORT=11000 --env APACHE_IP_BINDING=0.0.0.0 --env NEXTCLOUD_MEMORY_LIMIT=2048M --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config --volume /volume3/docker/docker.sock:/var/run/docker.sock:ro --env WATCHTOWER_DOCKER_SOCKET_PATH="/volume3/docker/docker.sock" nextcloud/all-in-one:latest
$ sudo snap set nextcloud php.memory-limit=512M
More information can be found here: https://github.com/nextcloud/nextcloud-snap

View File

@ -0,0 +1,12 @@
Convert OVA File to Qmen auf dem Unraid Server :
```Plaintext
tar -xvf Nextcloud-AIO.ova
```
Danach
```Plaintext
qemu-img convert Nextcloud-AIO-disk001.vmdk Nextcloud-AIO.qcow2 -O qcow2
```

View File

@ -0,0 +1,87 @@
Syno Community
DSM - Paketzentrum - Einstellungen - Paketquellen - Hinzufügen - Name und Adresse: https://packages.synocommunity.com/
Community - Paket installieren
- SynoCli File Tools
Ordner erstellen in der File Station:
/volume1/docker/grafana
Putty-SSH: Befehle einzelnt eingeben
sudo -i
chown -R 472:472 /volume1/docker/grafana
sudo volume create prometheus-data
sudo volume create prometheus-conf
Compose:
```Plaintext
version: '3'
services:
Prometheus:
image: prom/prometheus
container_name: prometheus
ports:
- 9090:9090
volumes:
- prometheus-data:/prometheus
- prometheus-conf:/etc/prometheus
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- 3000:3000
volumes:
- /volume1/docker/grafana:/var/lib/grafana
restart: unless-stopped
Cadvisor:
image: google/cadvisor:latest
container_name: cadvisor
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /volume1/@/:/var/lib/:ro
restart: unless-stopped
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
ports:
- 9100:9100
restart: unless-stopped
volumes:
prometheus-data:
external: true
prometheus-conf:
external: true
```
Putty - SSH:
cd /volume1/@docker/volumes/prometheus-conf/_data
nano prometheus.yml
- job_name: "synology node exporter"
scrape_interval: 5s
static_configs:
- targets: ['your-synology-ip:9100']
- job_name: "cadvisor"
scrape_interval: 55s
static_configs:
- targets: ['your-synology-ip:8080']
Strg+o=Speichern - Enter - strg+x=Verlassen
Darauf achten, dass eure IP eingetragen ist.
Prometheus neu starten
Grafana Konfiguration
Benutzer/Passwort: admin/admin
neues Passwort mindestens 6 Zeichen
Unten links Einstellungen - Prometheus als Quelle hinzufügen
Url: http://your-synology-ip:9090
save and test
Dashboard - Import - Cadvisor exporter=14282
Dashboard - Import - node-exporter-full=1860

View File

@ -1,4 +1,4 @@
Title : Xpenolody.md
Title : [[2024-01-15]]dy.md
===
IPAdresse 192.168.132.188

View File

@ -0,0 +1,135 @@
Script um Disk in Unraid zu löschen :
```Plaintext
#!/bin/bash
# A script to clear an unRAID array drive. It first checks the drive is completely empty,
# except for a marker indicating that the user desires to clear the drive. The marker is
# that the drive is completely empty except for a single folder named 'clear-me'.
#
# Array must be started, and drive mounted. There's no other way to verify it's empty.
# Without knowing which file system it's formatted with, I can't mount it.
#
# Quick way to prep drive: format with ReiserFS, then add 'clear-me' folder.
#
# 1.0 first draft
# 1.1 add logging, improve comments
# 1.2 adapt for User.Scripts, extend wait to 60 seconds
# 1.3 add progress display; confirm by key (no wait) if standalone; fix logger
# 1.4 only add progress display if unRAID version >= 6.2
version="1.4"
marker="clear-me"
found=0
wait=60
p=${0%%$P} # dirname of program
p=${p:0:18}
q="/tmp/user.scripts/"
echo -e "*** Clear an unRAID array data drive *** v$version\n"
# Check if array is started
ls /mnt/disk[1-9]* 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
echo "ERROR: Array must be started before using this script"
exit
fi
# Look for array drive to clear
n=0
echo -n "Checking all array data drives (may need to spin them up) ... "
if [ "$p" == "$q" ] # running in User.Scripts
then
echo -e "\n"
c="<font color=blue>"
c0="</font>"
else #set color teal
c="\x1b[36;01m"
c0="\x1b[39;49;00m"
fi
for d in /mnt/disk[1-9]*
do
x=`ls -A $d`
z=`du -s $d`
y=${z:0:1}
# echo -e "d:"$d "x:"${x:0:20} "y:"$y "z:"$z
# the test for marker and emptiness
if [ "$x" == "$marker" -a "$y" == "0" ]
then
found=1
break
fi
let n=n+1
done
#echo -e "found:"$found "d:"$d "marker:"$marker "z:"$z "n:"$n
# No drives found to clear
if [ $found == "0" ]
then
echo -e "\rChecked $n drives, did not find an empty drive ready and marked for clearing!\n"
echo "To use this script, the drive must be completely empty first, no files"
echo "or folders left on it. Then a single folder should be created on it"
echo "with the name 'clear-me', exactly 8 characters, 7 lowercase and 1 hyphen."
echo "This script is only for clearing unRAID data drives, in preparation for"
echo "removing them from the array. It does not add a Preclear signature."
exit
fi
# check unRAID version
v1=`cat /etc/unraid-version`
# v1 is 'version="6.2.0-rc5"' (fixme if 6.10.* happens)
v2="${v1:9:1}${v1:11:1}"
if [[ $v2 -ge 62 ]]
then
v=" status=progress"
else
v=""
fi
#echo -e "v1=$v1 v2=$v2 v=$v\n"
# First, warn about the clearing, and give them a chance to abort
echo -e "\rFound a marked and empty drive to clear: $c Disk ${d:9} $c0 ( $d ) "
echo -e "* Disk ${d:9} will be unmounted first."
echo "* Then zeroes will be written to the entire drive."
echo "* Parity will be preserved throughout."
echo "* Clearing while updating Parity takes a VERY long time!"
echo "* The progress of the clearing will not be visible until it's done!"
echo "* When complete, Disk ${d:9} will be ready for removal from array."
echo -e "* Commands to be executed:\n***** $c umount $d $c0\n***** $c dd bs=1M if=/dev/zero of=/dev/md${d:9} $v $c0\n"
if [ "$p" == "$q" ] # running in User.Scripts
then
echo -e "You have $wait seconds to cancel this script (click the red X, top right)\n"
sleep $wait
else
echo -n "Press ! to proceed. Any other key aborts, with no changes made. "
ch=""
read -n 1 ch
echo -e -n "\r \r"
if [ "$ch" != "!" ];
then
exit
fi
fi
# Perform the clearing
logger -tclear_array_drive "Clear an unRAID array data drive v$version"
echo -e "\rUnmounting Disk ${d:9} ..."
logger -tclear_array_drive "Unmounting Disk ${d:9} (command: umount $d ) ..."
umount $d
echo -e "Clearing Disk ${d:9} ..."
logger -tclear_array_drive "Clearing Disk ${d:9} (command: dd bs=1M if=/dev/zero of=/dev/md${d:9} $v ) ..."
dd bs=1M if=/dev/zero of=/dev/md${d:9} $v
#logger -tclear_array_drive "Clearing Disk ${d:9} (command: dd bs=1M if=/dev/zero of=/dev/md${d:9} status=progress count=1000 seek=1000 ) ..."
#dd bs=1M if=/dev/zero of=/dev/md${d:9} status=progress count=1000 seek=1000
# Done
logger -tclear_array_drive "Clearing Disk ${d:9} is complete"
echo -e "\nA message saying \"error writing ... no space left\" is expected, NOT an error.\n"
echo -e "Unless errors appeared, the drive is now cleared!"
echo -e "Because the drive is now unmountable, the array should be stopped,"
echo -e "and the drive removed (or reformatted)."
exit
```

17
Eingang/where-filter.md Normal file
View File

@ -0,0 +1,17 @@
## Abfrage where nach einer Liste filtern
Mittwoch, 10. Januar 2024
16:32
You can then read in this file as array with
$list= Get-Content -Path "<PATH TO THE FILE>"
Next combine this list to build the pattern like
$pattern= (($list| ForEach-Object {[regex]::Escape($_)}) join"|")
and do
Get-AppxPackage | Where-Object {$_.name -notmatch $pattern}
Aus <https://stackoverflow.com/questions/52152228/how-to-filter-a-list-with-a-list-of-strings-in-powershell>

View File

@ -21,7 +21,7 @@ Festplatten 2 ssd 400 GB. 293 /pro
Festplatten 3 sas hgst 1,8 TB 6G.
 
RustDesk ist installiert siehe Keypass
 
Windows Server Essentials

View File

@ -8,9 +8,14 @@ Sonntag, 11. September 2022
Teamviewer
 
764629353
Windows 10 Pro
192.168.0.43
RustDesk ist installiert siehe Keypass
#nochzubearbeiten

View File

@ -0,0 +1,37 @@
Add-PSSnapin Microsoft.SharePoint.PowerShell
function Remove-SPFeatureFromContentDB($ContentDb, $FeatureId, [switch]$ReportOnly){
#$db = Get-SPDatabase | where { $_.Name -eq $ContentDb }
[bool]$report = $false
if ($ReportOnly) { $report = $true }
$db.Sites | ForEach-Object {
Remove-SPFeature -obj $_ -objName "site collection" -featId $FeatureId -report $report
$_ | Get-SPWeb -Limit all | ForEach-Object {
Remove-SPFeature -obj $_ -objName "site" -featId $FeatureId -report $report
}
}
}
function Remove-SPFeature($obj, $objName, $featId, [bool]$report){
$feature = $obj.Features[$featId]
if ($feature -ne $null) {
if ($report) {
write-host "Feature found in" $objName ":" $obj.Url -foregroundcolor Red
}
else{
try {
$obj.Features.Remove($feature.DefinitionId, $true)
write-host "Feature successfully removed from" $objName ":" $obj.Url -foregroundcolor Red
}
catch {
write-host "There has been an error trying to remove the feature:" $_
}
}
}
else {
#write-host "Feature ID specified does not exist in" $objName ":" $obj.Url
}
}
Remove-SPFeatureFromContentDB -ContentDB "Your Content DB Name" -FeatureId "e9728ee6-7bfc-40a1-ad72-aa9a57e14407" -ReportOnly

92
Wenite/SubscriptionDB.md Normal file
View File

@ -0,0 +1,92 @@
Eigenschaften des Subscription Service auf dem Sharepoint Server :
TypeName : Microsoft SharePoint Foundation Subscription Settings Service
Description : Stores settings and configuration data for your organization.
Instances : {, }
Applications : {Subscription Settings Service}
Required : False
SystemService : False
Hidden : False
AutoProvision : True
CompliantWithMinRole : True
JobDefinitions : {}
RunningJobs : {}
JobHistoryEntries : {}
CanUpgrade : True
IsBackwardsCompatible : True
NeedsUpgradeIncludeChildren : False
NeedsUpgrade : False
UpgradeContext : Microsoft.SharePoint.Upgrade.SPUpgradeContext
ShouldDeferUpgradeActions : False
Name :
Id : b2d7beba-27f1-414e-9077-1aa468b09be3
Status : Online
Parent : SPFarm Name=SP_Config
Version : 10545
DeploymentLocked : False
Properties : {}
Farm : SPFarm Name=SP_Config
UpgradedPersistedProperties : {}
Database Eigenschaften :
TypeName : Microsoft SharePoint Foundation Subscription Settings Database
NormalizedDataSource : SP2019
ServiceInstanceProvider : Microsoft.SharePoint.Administration.SPDatabase+DefaultSPDatabaseServiceInstan
ceProvider
Server : SPServer Name=SP2019
ServiceInstance : SPDatabaseServiceInstance
FailoverServer :
FailoverServiceInstance :
DatabaseConnectionString : Data Source=SP2019;Initial Catalog=SP_SubscriptionSettings;Integrated
Security=True;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool
Size=100;Connect Timeout=60;Packet Size=8000;Application
Name=SharePoint[powershell][1][SP_SubscriptionSettings]
LegacyDatabaseConnectionString : Server=SP2019;Database=SP_SubscriptionSettings;Trusted_Connection=yes;App=Mic
rosoft SharePoint Foundation;Timeout=60
Username :
Password :
DBAccessUsername :
DBAccessPassword :
Exists : True
Snapshots : {}
NeedsUpgrade : False
BuildVersion : **16.0.10402.20016**
IsReadOnly : False
IncludeInVssBackup : True
MultiSubnetFailover : False
AvailabilityGroup :
IsSqlAzure : False
BackupLocation :
DiskSizeRequired : 12582912
BackupTimeoutOverride :
CanSelectForBackup : True
CanSelectForRestore : True
CanRenameOnRestore : True
SchemaVersionXml : <SchemaVersions><SchemaVersion Current="16.0.1.1" Target="16.0.1.1" Sequence=
"Microsoft.SharePoint.Upgrade.SPSubscriptionSettingsDatabaseSequence"/><Schem
aVersion Current="16.0.0.0" Target="16.0.0.0" Sequence="Microsoft.SharePoint.
Upgrade.SPSubscriptionSettingsDatabaseSprocsSequence"/><SchemaVersion
Current="16.0.10402.20016" Target="16.0.10402.20016" Sequence="Microsoft.Shar
ePoint.SPSubscriptionSettingsDatabase"/></SchemaVersions>
ShouldSkipUpgradeForHigherSchemaVersion : False
CanUpgrade : True
IsBackwardsCompatible : True
NeedsUpgradeIncludeChildren : False
UpgradeContext : Microsoft.SharePoint.Upgrade.SPUpgradeContext
ShouldDeferUpgradeActions : False
Name : SP_SubscriptionSettings
DisplayName : SP_SubscriptionSettings
Id : 1b49caa0-d3da-4abd-8a16-1a9ee7414a3d
Status : Online
Parent : SPDatabaseServiceInstance
Version : 24699549
DeploymentLocked : False
Properties : {}
Farm : SPFarm Name=SP_Config
UpgradedPersistedProperties : {}
Type : Microsoft SharePoint Foundation Subscription Settings Database

View File

@ -0,0 +1,54 @@
my/kgrimm/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/cziegenfuss/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/swoltering/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/abuerger/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/ext-adm-merentis/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/aplachetta/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/cschweers/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/mkleefeldt/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/sschoenauer/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/jniblett/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/pwramling/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/svc-de-bre01-shpsear/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/caugust/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/mhenneke/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/hkolberg/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/anschmidt/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/kgrimm/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/cziegenfuss/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/swoltering/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/abuerger/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/ext-adm-merentis/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/aplachetta/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/cschweers/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/mkleefeldt/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/sschoenauer/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/jniblett/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/pwramling/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/svc-de-bre01-shpsear/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/caugust/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/mhenneke/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/hkolberg/_catalogs/masterpage/Display Templates/Language Files/pt-br
my/anschmidt/_catalogs/masterpage/Display Templates/Language Files/pt-br
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js
Features\SearchWebParts\pt-br\CustomStrings.js