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 # /// script
# dependencies = [ # dependencies = [
# "requests", # "requests",

View File

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

View File

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

View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script # /// script
# dependencies = [ # dependencies = [
# "qbittorrent-api", # "qbittorrent-api",
@ -8,7 +9,7 @@
"""qbt_sum_size.py """qbt_sum_size.py
Description: 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. torrents from a qBittorrent instance.
Usage: Usage:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,7 @@
#!/bin/sh #!/bin/sh
port=$(/usr/local/bin/natpmpc -a 1 0 udp 60 -g 10.2.0.1 | grep "Mapped public port" | awk '{print $4}') port=$(/usr/local/bin/natpmpc -a 1 0 udp 60 -g 10.2.0.1 | grep "Mapped public port" | awk '{print $4}')
echo $port | tee /usr/local/etc/natvpn_port.txt
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
while true; do while true; do
date date