Use uv in shebang

This commit is contained in:
Jeffrey Serio 2025-04-06 06:41:51 -05:00
parent 6d15f145a5
commit 6951f29a26
11 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "requests",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "requests",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "qbittorrent-api",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "qbittorrent-api",
@ -8,7 +9,7 @@
"""qbt_sum_size.py
Description:
Get the total size of all added torrents and the total size of all completed
Get the total size of all added torrents and the total size of all completed
torrents from a qBittorrent instance.
Usage:

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "resend",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "qbittorrent-api",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "qbittorrent-api",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "resend",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "qbittorrent-api",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "yaml",

View File

@ -1,11 +1,7 @@
#!/bin/sh
port=$(/usr/local/bin/natpmpc -a 1 0 udp 60 -g 10.2.0.1 | grep "Mapped public port" | awk '{print $4}')
sed -i.bak 's|Session\\Port=[[:digit:]]*|Session\\Port='"${port}"'|g' /var/db/qbittorrent/conf/qBittorrent/config/qBittorrent.conf
killall -HUP qbittorrent-nox
service qbittorrent start
echo $port | tee /usr/local/etc/natvpn_port.txt
while true; do
date