1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/owncast_ynh.git synced 2024-09-03 19:56:20 +02:00

Merge pull request #1 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-08-07 12:22:25 +02:00 committed by GitHub
commit 4eab502685
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 24 deletions

View file

@ -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&

View file

@ -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

View file

@ -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

View file

@ -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 nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
},
"default": true
}
]

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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