aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNewoIsTaken2021-08-06 12:37:08 -0400
committerNewoIsTaken2021-08-06 12:37:08 -0400
commita8a2bf4dcb244486fdfe1595179ce43b50ed1afe (patch)
tree88d1fbf24f457f6bcdf5b6301d16554861f3c581
parent1741e4c903b600ebc0a56d76b365a2ced73ef509 (diff)
downloadaur-a8a2bf4dcb244486fdfe1595179ce43b50ed1afe.tar.gz
Add firewall check
-rw-r--r--PKGBUILD2
-rw-r--r--README.md8
-rwxr-xr-xgopro19
3 files changed, 22 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a2640482af95..5b2464d9b74a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@ optdepends=("vlc: preview support")
install=gopro-webcam.install
source=("gopro" "gopro_webcam.service" "60-gopro.rules")
noextract=("gopro" "gopro_webcam.service" "60-gopro.rules")
-sha256sums=("4d8c86533933b8fc5f44f74921a9819a7b5d76eb95046ceab99e4a6dd205b826"
+sha256sums=("fcf5de75c567d6aba5c29521661476419ca61f5540f33efc04a4f97a1166df75"
"5f6d0005d9790b4fa03107f83790c23948f34c887790e26d25dc7ed9e5ff2fae"
"76f247506012177858323eeadfca859ba4b9abbe832181ac0c178c8aac0a3c9c")
diff --git a/README.md b/README.md
index e1893a38d53d..2c534627f34c 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,8 @@ This runs an install script. Follow the instructions on the screen.
_The script install the `gopro` script to `/usr/local/sbin/gopro` and set an executable flag._
+This script is also on the Arch User Repositories (AUR) (here)[https://aur.archlinux.org/packages/gopro-webcam/]. Please check the Arch wiki for more information on how to install from the AUR.
+
See **Usage** fom here on.
@@ -138,11 +140,15 @@ Also the udev rule currently only works for HERO8 BLACK. The rules in the file c
## Dependencies
```sh
-sudo apt install ffmpeg v4l2loopback-dkms
+sudo apt install ffmpeg v4l2loopback-dkms curl vlc
```
If your distribution doesn't provide `v4l2loopback-dkms` you may get it from https://github.com/umlaeute/v4l2loopback
+## Troubleshooting
+
+### I can't find the network device for my GoPro
+Double check that the USB connection mode is GoPro Connect and not MTP under Preferences -> Connections -> USB Connection. If that options doesn't exist, you likely need a firmware upgrade. Instructions can be found at https://gopro.com/en/us/update.
## Release History
diff --git a/gopro b/gopro
index 13f142e8ddd6..def92ed6fb42 100755
--- a/gopro
+++ b/gopro
@@ -20,17 +20,26 @@ yellow() {
echo -e "\e[33m${1}\e[0m"
}
+function checks {
+ permission_check
+ firewall_check
+}
+
function permission_check {
- if [ "$EUID" -ne 0 ]; then
+ if [[ "$(whoami)" != "root" ]]; then
# the script needs root/sudo
red "Please run as root or with sudo"
exit 1
fi
}
+function firewall_check {
+ if [[ "$(ufw status)" != "Status: inactive" ]]; then
+ red "Using your firewall can cause issues with ffmpeg."
+ fi
+}
+
globals() {
- # TODO: Use GOPRO_ prefix
- # TODO: rename AUTO -> NONINTERACTIVE
GOPRO_NON_INTERACTIVE=${GOPRO_NON_INTERACTIVE:-0}
GOPRO_AUTOSTART=${GOPRO_AUTOSTART:-0}
GOPRO_PREVIEW=${GOPRO_PREVIEW:-0}
@@ -405,8 +414,8 @@ main() {
usage
;;
webcam)
- # check if sudo/root
- permission_check
+ # run checks
+ checks
# If module is loaded already, unload it, to maintain idempotency.
test_module_loaded