From 6810d853241c14ed24718b2f009665291a454c1b Mon Sep 17 00:00:00 2001 From: MohandL3G Date: Mon, 12 Jan 2026 13:54:08 +0200 Subject: [PATCH] Added all my Peronal Scripts --- NTINDEX | 8 ++++++++ README.md | 1 + snippets/aptautoremoveandclean.snippet | 5 +++++ snippets/dockerfullprune.snippet | 5 +++++ snippets/nextcloudappsupdater.snippet | 5 +++++ snippets/nohupdockcheck.snippet | 5 +++++ snippets/resticbackupperubuntu.snippet | 5 +++++ snippets/resticbackupperwin.snippet | 4 ++++ snippets/restserver.snippet | 4 ++++ snippets/wingetupdater.snippet | 4 ++++ 10 files changed, 46 insertions(+) create mode 100644 snippets/aptautoremoveandclean.snippet create mode 100644 snippets/dockerfullprune.snippet create mode 100644 snippets/nextcloudappsupdater.snippet create mode 100644 snippets/nohupdockcheck.snippet create mode 100644 snippets/resticbackupperubuntu.snippet create mode 100644 snippets/resticbackupperwin.snippet create mode 100644 snippets/restserver.snippet create mode 100644 snippets/wingetupdater.snippet diff --git a/NTINDEX b/NTINDEX index e85bfb5..90dd379 100644 --- a/NTINDEX +++ b/NTINDEX @@ -1,3 +1,11 @@ # Snippets +snippets/aptautoremoveandclean.snippet@9EDB63930982F7D5C5105A089248B860 snippets/dockcheckupdater.snippet@1CEDC394FA86FF517CF389FA17216EF1 +snippets/dockerfullprune.snippet@2F499A3925734CDFD6B4C0B074E67C8E +snippets/nextcloudappsupdater.snippet@31152143A61485B7C7CFDE112DBCE3E6 +snippets/nohupdockcheck.snippet@19058B21C6CDD34F4B64E73FC92742B6 +snippets/resticbackupperubuntu.snippet@C836474C896F005CF532BB574B6B3CDD +snippets/resticbackupperwin.snippet@3B4ED66047F874BA9F5FCF3FA80080DD +snippets/restserver.snippet@B72873EB5CED33239487A3F27BAF0ECD +snippets/wingetupdater.snippet@2E27D5A7E019E42709F6A55FB5AD48C6 diff --git a/README.md b/README.md index ad9921c..8d13407 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Nexterm-Source + These are my custom Nexterm Scripts and Snippets diff --git a/snippets/aptautoremoveandclean.snippet b/snippets/aptautoremoveandclean.snippet new file mode 100644 index 0000000..dcd0455 --- /dev/null +++ b/snippets/aptautoremoveandclean.snippet @@ -0,0 +1,5 @@ +# @name: apt autoremove and clean +# @description: This will remove all the extra packages from apt +# @os: Ubuntu + +sudo apt autoremove && sudo apt clean \ No newline at end of file diff --git a/snippets/dockerfullprune.snippet b/snippets/dockerfullprune.snippet new file mode 100644 index 0000000..009731a --- /dev/null +++ b/snippets/dockerfullprune.snippet @@ -0,0 +1,5 @@ +# @name: Docker Full Prune +# @description: This will remove all stopped containers & all networks not used by at least one container & all images without at least one container associated to them & all build cache +# @os: Ubuntu + +docker system prune -a \ No newline at end of file diff --git a/snippets/nextcloudappsupdater.snippet b/snippets/nextcloudappsupdater.snippet new file mode 100644 index 0000000..ec47b99 --- /dev/null +++ b/snippets/nextcloudappsupdater.snippet @@ -0,0 +1,5 @@ +# @name: Nextcloud Apps Updater +# @description: This is going to Update all the Apps inside my Nextcloud Service +# @os: Ubuntu + +sudo docker exec linuxserver-nextcloud-app-1 occ app:update --all \ No newline at end of file diff --git a/snippets/nohupdockcheck.snippet b/snippets/nohupdockcheck.snippet new file mode 100644 index 0000000..2867b53 --- /dev/null +++ b/snippets/nohupdockcheck.snippet @@ -0,0 +1,5 @@ +# @name: nohup (dockcheck) +# @description: This will check if the dockcheck script that has been executed using n8n with nohup is running +# @os: Ubuntu + +ps aux | grep dockcheck \ No newline at end of file diff --git a/snippets/resticbackupperubuntu.snippet b/snippets/resticbackupperubuntu.snippet new file mode 100644 index 0000000..4199096 --- /dev/null +++ b/snippets/resticbackupperubuntu.snippet @@ -0,0 +1,5 @@ +# @name: Restic Backupper (Ubuntu) +# @description: This will make a new backup snapshot using Restic on Ubuntu, and then keep the latest 7 ones +# @os: Ubuntu + +sudo bash -c "export RESTIC_PASSWORD='Ms@199903' && restic -r rest:http://192.168.0.100:8080/ --verbose backup /DATA/AppData && restic -r rest:http://192.168.0.100:8080/ forget --keep-last 7 --prune" \ No newline at end of file diff --git a/snippets/resticbackupperwin.snippet b/snippets/resticbackupperwin.snippet new file mode 100644 index 0000000..9346911 --- /dev/null +++ b/snippets/resticbackupperwin.snippet @@ -0,0 +1,4 @@ +# @name: Restic Backupper (Win) +# @description: This will make a new backup snapshot using Restic on Windows, and then keep the latest 7 ones + +$env:RESTIC_PASSWORD='Ms@199903'; restic -r 'D:\Backups\restic' --verbose backup --use-fs-snapshot 'C:\Data\AppData'; restic -r 'D:\Backups\restic' forget --keep-last 7 --prune \ No newline at end of file diff --git a/snippets/restserver.snippet b/snippets/restserver.snippet new file mode 100644 index 0000000..aa3ee50 --- /dev/null +++ b/snippets/restserver.snippet @@ -0,0 +1,4 @@ +# @name: Rest Server +# @description: Start the Rest Server on Windows for Restic + +C:\Portables\rest-server\rest-server.exe --listen :8080 --path D:\Backups\Restic --no-auth \ No newline at end of file diff --git a/snippets/wingetupdater.snippet b/snippets/wingetupdater.snippet new file mode 100644 index 0000000..e307285 --- /dev/null +++ b/snippets/wingetupdater.snippet @@ -0,0 +1,4 @@ +# @name: Winget Updater +# @description: This will update all the Apps on Windows using Winget + +winget upgrade --all --silent --accept-package-agreements --accept-source-agreements \ No newline at end of file