diff --git a/check_process b/check_process index d6c678e..4043ed0 100755 --- a/check_process +++ b/check_process @@ -4,10 +4,9 @@ path="/path" admin="john" is_public=1 - password="password" ; Checks pkg_linter=1 - setup_sub_dir=1 + setup_sub_dir=0 setup_root=1 setup_nourl=0 setup_private=1 @@ -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& - 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/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 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/manifest.json b/manifest.json index ec932e6..d9254fc 100755 --- a/manifest.json +++ b/manifest.json @@ -18,7 +18,7 @@ }, "license": "MIT", "maintainer": { - "name": "", + "name": "eric_G", "email": "" }, "requirements": { @@ -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 } ] diff --git a/scripts/_common.sh b/scripts/_common.sh index a72be05..d7ea150 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -28,12 +28,8 @@ 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 - architecture="i386" - elif [ -n "$(uname -m | grep 64)" ]; then - architecture="amd64" + if [ -n "$(uname -m | grep 64)" ]; then + architecture="x86-64" elif [ -n "$(uname -m | grep armv7)" ]; then architecture="arm7" else 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 diff --git a/scripts/install b/scripts/install index f266f33..663c398 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 @@ -144,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..b7141d0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,8 @@ 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) +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK VERSION @@ -67,7 +69,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" @@ -109,7 +111,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