diff --git a/check_process b/check_process index e22be27..3680b89 100644 --- a/check_process +++ b/check_process @@ -4,7 +4,7 @@ path="/" is_public=1 password="password-srtong" - admin="domain.tld" + admin="john" ; Checks pkg_linter=1 diff --git a/conf/systemd.service b/conf/systemd.service index 54dd679..846aa2e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -10,7 +10,6 @@ StartLimitBurst=10 WorkingDirectory=__FINALPATH__ ExecStart=__FINALPATH__/AdGuardHome -c __FINALPATH__/AdGuardHome.yaml -p __PORT__ -WorkingDirectory=/etc/AdGuardHome #Restart=always #RestartSec=120 #EnvironmentFile=-/etc/sysconfig/dnscrypt-proxy diff --git a/manifest.json b/manifest.json index 909040d..2f5329a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "AdGuard Home", - "id": "adguard", + "id": "adguardhome", "packaging_format": 1, "description": { "en": "AdGuard Home package for YunoHost.", @@ -18,8 +18,7 @@ }, "multi_instance": false, "services": [ - "nginx", - "mysql" + "nginx" ], "arguments": { "install": [{ diff --git a/scripts/_common.sh b/scripts/_common.sh index dcd503f..c1339b7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="libcap2-bin libaprutil1" +pkg_dependencies="" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 449164c..d4599cf 100644 --- a/scripts/install +++ b/scripts/install @@ -54,17 +54,10 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=is_public --value=$is_public -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Installing dependencies..." --weight=9 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." --time --weight=1 +ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port port=$(ynh_find_port --port=3000) diff --git a/scripts/remove b/scripts/remove index 31f67d5..28cc510 100644 --- a/scripts/remove +++ b/scripts/remove @@ -41,14 +41,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -#ynh_script_progression --message="Removing dependencies..." --time --weight=1 - -# Remove metapackage and its dependencies -#ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index acff4ac..48089ca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,12 +27,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) # CHECK VERSION #================================================= -### This helper will compare the version of the currently installed app and the version of the upstream package. -### $upgrade_type can have 2 different values -### - UPGRADE_APP if the upstream app version has changed -### - UPGRADE_PACKAGE if only the YunoHost package has changed -### ynh_check_app_version_changed will stop the upgrade if the app is up to date. -### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do. upgrade_type=$(ynh_check_app_version_changed) #================================================= @@ -63,27 +57,6 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 -# -# N.B. : the followings setting migrations snippets are provided as *EXAMPLES* -# of what you may want to do in some cases (e.g. a setting was not defined on -# some legacy installs and you therefore want to initiaze stuff during upgrade) -# - -# If db_name doesn't exist, create it -#if [ -z "$db_name" ]; then -# db_name=$(ynh_sanitize_dbid --db_name=$app) -# ynh_app_setting_set --app=$app --key=db_name --value=$db_name -#fi - -# If final_path doesn't exist, create it -#if [ -z "$final_path" ]; then -# final_path=/var/www/$app -# ynh_app_setting_set --app=$app --key=final_path --value=$final_path -#fi - -### If nobody installed your app before 4.1, -### then you may safely remove these lines - # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -91,16 +64,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -if ! ynh_permission_exists --permission="admin"; then - # Create the required permissions - ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin -fi - -# Create a permission if needed -if ! ynh_permission_exists --permission="api"; then - ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" -fi - #================================================= # CREATE DEDICATED USER #================================================= @@ -121,12 +84,6 @@ then ynh_setup_source --dest_dir="$final_path" fi -# FIXME: this should be managed by the core in the future -# Here, as a packager, you may have to tweak the ownerhsip/permissions -# such that the appropriate users (e.g. maybe www-data) can access -# files in some cases. -# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - -# this will be treated as a security issue. chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path"