1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/scrutiny_ynh.git synced 2024-09-03 20:16:24 +02:00

Fix helpers 2.1

This commit is contained in:
Sylvain 2024-09-01 21:16:17 +02:00
parent 081e6510bc
commit ba2715e945
4 changed files with 1 additions and 17 deletions

View file

@ -76,9 +76,6 @@ ram.runtime = "50M"
[resources.system_user] [resources.system_user]
[resources.install_dir] [resources.install_dir]
dir = "/var/www/__APP__"
owner = "__APP__:rwx"
group = "__APP__:rx"
[resources.permissions] [resources.permissions]
main.url = "/" main.url = "/"

View file

@ -3,11 +3,4 @@
#================================================= #=================================================
# COMMON VARIABLES AND CUSTOM HELPERS # COMMON VARIABLES AND CUSTOM HELPERS
#================================================= #=================================================
ynh_arch="$YNH_ARCH"
myynh_set_permissions () {
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app: "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
chmod -R +x "$install_dir/bin/"
}

View file

@ -43,7 +43,7 @@ then
ynh_store_file_checksum "$install_dir/config/scrutiny.yaml" ynh_store_file_checksum "$install_dir/config/scrutiny.yaml"
# Update collector.yaml # Update collector.yaml
port=$(ynh_app_setting_get --key=port) port=$(ynh_app_setting_get --key=port)
key="endpoint" key="endpoint"
new_value="'http:\/\/127.0.0.1:${port}${new_base_path}\/'" new_value="'http:\/\/127.0.0.1:${port}${new_base_path}\/'"
sed --regexp-extended "s/^(\s*${key}:\s*).*/\1${new_value}/" --in-place "$install_dir/config/collector.yaml" sed --regexp-extended "s/^(\s*${key}:\s*).*/\1${new_value}/" --in-place "$install_dir/config/collector.yaml"

View file

@ -57,12 +57,6 @@ ynh_config_add --template="config/scrutiny.yaml" --destination="$install_dir/con
ynh_config_add --template="systemd-scrutiny-collector.timer" --destination="/etc/systemd/system/scrutiny-collector.timer" ynh_config_add --template="systemd-scrutiny-collector.timer" --destination="/etc/systemd/system/scrutiny-collector.timer"
ynh_config_add --template="config/collector.yaml" --destination="$install_dir/config/collector.yaml" ynh_config_add --template="config/collector.yaml" --destination="$install_dir/config/collector.yaml"
#=================================================
# SET FILE OWNERSHIP / PERMISSIONS
#=================================================
myynh_set_permissions
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================