From 9c8f73d40e02b66e32f2f247a755a37e2144cc58 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 08:29:37 +0200 Subject: [PATCH 01/15] Update _common.sh --- scripts/_common.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index a72be05..c6bd8a9 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -28,12 +28,10 @@ pkg_dependencies="ffmpeg" # Requires YunoHost version 2.2.4 or higher. ynh_detect_arch(){ local architecture - if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm7" - elif [ -n "$(uname -m | grep 86)" ]; then + if [ -n "$(uname -m | grep 86)" ]; then architecture="i386" elif [ -n "$(uname -m | grep 64)" ]; then - architecture="amd64" + architecture="x86-64" elif [ -n "$(uname -m | grep armv7)" ]; then architecture="arm7" else From e91f2b1d439d2de3b7019e8e8d22733b9b8f8bcb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 09:15:15 +0200 Subject: [PATCH 02/15] Update systemd.service --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index c121487..c2726e6 100755 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/owncast -webserverport __PORT__ -configFile __FINALPATH__/config.yaml +ExecStart=__FINALPATH__/owncast --enableVerboseLogging -webserverport __PORT__ -configFile __FINALPATH__/config.yaml Restart=on-failure RestartSec=5 From bf92786cb44fa84b3ecd8a6135cd10ee7bd0c10d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 09:32:13 +0200 Subject: [PATCH 03/15] Open port --- scripts/install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index f266f33..64e97c0 100755 --- a/scripts/install +++ b/scripts/install @@ -65,7 +65,11 @@ ynh_app_setting_set --app=$app --key=port --value=$port # Find an available port for stream stream_port=$(ynh_find_port --port=1935) -ynh_app_setting_set --app=$app --key=turn_port --value=$stream_port +ynh_app_setting_set --app=$app --key=stream_port --value=$stream_port + +# Open the port +ynh_script_progression --message="Configuring firewall..." --weight=1 +ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $stream_port #================================================= # INSTALL DEPENDENCIES From 5867f114a93f87aa0dc849dcaf2db05a0ed14dbf Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 09:32:44 +0200 Subject: [PATCH 04/15] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 64e97c0..0d8f61d 100755 --- a/scripts/install +++ b/scripts/install @@ -148,7 +148,7 @@ yunohost service add $app --description="Self-hosted live video and web chat ser ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="The web admin interface is available at /admin." +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" #--line_match="The web admin interface is available at /admin." #================================================= # SETUP SSOWAT From 00b5db98ae61e692cff446363fb03ceb93ab3cfa Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 09:40:18 +0200 Subject: [PATCH 05/15] Fix --- scripts/install | 4 +++- scripts/restore | 4 +++- scripts/upgrade | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 0d8f61d..663c398 100755 --- a/scripts/install +++ b/scripts/install @@ -148,7 +148,9 @@ yunohost service add $app --description="Self-hosted live video and web chat ser ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" #--line_match="The web admin interface is available at /admin." +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" + +sleep 30 #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index f0d0811..b3ac6d3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -102,7 +102,9 @@ yunohost service add $app --description="Self-hosted live video and web chat ser #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="The web admin interface is available at /admin." +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" + +sleep 30 #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index b4285b0..c256691 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,7 +109,8 @@ yunohost service add $app --description="Self-hosted live video and web chat ser #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="The web admin interface is available at /admin." +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +sleep 30 #================================================= # RELOAD NGINX From f0164f7b5ef481df660aaa8f366689c544507f81 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 10:02:48 +0200 Subject: [PATCH 06/15] Fix --- conf/{amd64.src => x86_64.src} | 0 scripts/_common.sh | 4 +--- 2 files changed, 1 insertion(+), 3 deletions(-) rename conf/{amd64.src => x86_64.src} (100%) diff --git a/conf/amd64.src b/conf/x86_64.src similarity index 100% rename from conf/amd64.src rename to conf/x86_64.src diff --git a/scripts/_common.sh b/scripts/_common.sh index c6bd8a9..d7ea150 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -28,9 +28,7 @@ pkg_dependencies="ffmpeg" # Requires YunoHost version 2.2.4 or higher. ynh_detect_arch(){ local architecture - if [ -n "$(uname -m | grep 86)" ]; then - architecture="i386" - elif [ -n "$(uname -m | grep 64)" ]; then + if [ -n "$(uname -m | grep 64)" ]; then architecture="x86-64" elif [ -n "$(uname -m | grep armv7)" ]; then architecture="arm7" From 096ce5287890fd8d43468d9654e3d790bfdb6159 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 10:15:22 +0200 Subject: [PATCH 07/15] Fix --- conf/i386.src | 7 ------- conf/{x86_64.src => x86-64.src} | 0 2 files changed, 7 deletions(-) delete mode 100755 conf/i386.src rename conf/{x86_64.src => x86-64.src} (100%) diff --git a/conf/i386.src b/conf/i386.src deleted file mode 100755 index fc60c76..0000000 --- a/conf/i386.src +++ /dev/null @@ -1,7 +0,0 @@ -SOURCE_URL=https://github.com/owncast/owncast/releases/download/v0.0.7/owncast-0.0.7-linux-32bit.zip -SOURCE_SUM=b1ab7bd4050c2d312423e5f0263162c9f7e23dc8289e94bf57b2a045783b65f2 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip -SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= -SOURCE_EXTRACT=true diff --git a/conf/x86_64.src b/conf/x86-64.src similarity index 100% rename from conf/x86_64.src rename to conf/x86-64.src From bbf4d71f1910b2716156ab1a672796da4798c045 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 10:33:23 +0200 Subject: [PATCH 08/15] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index d6c678e..828ada7 100755 --- a/check_process +++ b/check_process @@ -7,7 +7,7 @@ password="password" ; Checks pkg_linter=1 - setup_sub_dir=1 + setup_sub_dir=0 setup_root=1 setup_nourl=0 setup_private=1 From 996d29f21298766280587b9ba375e3bd59d93502 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 10:45:02 +0200 Subject: [PATCH 09/15] Update manifest.json --- manifest.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index ec932e6..c4485ce 100755 --- a/manifest.json +++ b/manifest.json @@ -33,7 +33,11 @@ { "name": "domain", "type": "domain", - "example": "example.com" + "help": { + "en": "Owncast needs to be installed in a dedicated domain or sub-domain.", + "fr": "Owncast doit être installé dans un domaine ou sous-domaine dédié." + }, + "example": "owncast.example.com" }, { "name": "admin", @@ -43,6 +47,10 @@ { "name": "is_public", "type": "boolean", + "help": { + "en": "If enabled, Owncast will be accessible by people who do not have an account. This can be changed later via the webadmin.", + "fr": "Si cette case est cochée, Owncast sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + }, "default": true } ] From c844247566506fb20376f7641f8f6829cf040643 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 10:45:19 +0200 Subject: [PATCH 10/15] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index c4485ce..d9254fc 100755 --- a/manifest.json +++ b/manifest.json @@ -18,7 +18,7 @@ }, "license": "MIT", "maintainer": { - "name": "", + "name": "eric_G", "email": "" }, "requirements": { From 2b10483e3d6652c42c390f987e5f9c5f0b25e98f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 10:49:18 +0200 Subject: [PATCH 11/15] Update check_process --- check_process | 2 -- 1 file changed, 2 deletions(-) diff --git a/check_process b/check_process index 828ada7..4043ed0 100755 --- a/check_process +++ b/check_process @@ -4,7 +4,6 @@ path="/path" admin="john" is_public=1 - password="password" ; Checks pkg_linter=1 setup_sub_dir=0 @@ -24,4 +23,3 @@ Notification=none ; commit=CommitHash name=Name and date of the commit. manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& - From 7b032be673ad62cd06a3d07935110f614f683368 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 10:57:13 +0200 Subject: [PATCH 12/15] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index c256691..455432b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -67,7 +67,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.yaml" + ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" --keep="$final_path/config.yaml" fi chmod 750 "$final_path" From bc014ef07e8a156324c3ec7719e6b4923f41da95 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 10:58:19 +0200 Subject: [PATCH 13/15] Update change_url --- scripts/change_url | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/change_url b/scripts/change_url index 3e26a30..8f745a8 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,6 +28,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP From da97008ae7322ea899220a8e053fc9b8a4c30006 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 11:24:15 +0200 Subject: [PATCH 14/15] Update upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 455432b..7f75ed6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) stream_port=$(ynh_app_setting_get --app=$app --key=stream_port) +architecture=$(ynh_detect_arch) #================================================= # CHECK VERSION From bfafdf2c7ccd4c1917ec2249ed0b0286927c42b9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 7 Aug 2021 11:54:56 +0200 Subject: [PATCH 15/15] Update upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 7f75ed6..b7141d0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,6 +21,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) stream_port=$(ynh_app_setting_get --app=$app --key=stream_port) architecture=$(ynh_detect_arch) +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK VERSION