Skip to content

Commit

Permalink
Fix helpers 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain committed Sep 1, 2024
1 parent 081e651 commit ba2715e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
3 changes: 0 additions & 3 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ ram.runtime = "50M"
[resources.system_user]

[resources.install_dir]
dir = "/var/www/__APP__"
owner = "__APP__:rwx"
group = "__APP__:rx"

[resources.permissions]
main.url = "/"
Expand Down
7 changes: 0 additions & 7 deletions scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,4 @@
#=================================================
# 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/"
}
2 changes: 1 addition & 1 deletion scripts/change_url
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ then
ynh_store_file_checksum "$install_dir/config/scrutiny.yaml"

# Update collector.yaml
port=$(ynh_app_setting_get --key=port)
port=$(ynh_app_setting_get --key=port)
key="endpoint"
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"
Expand Down
6 changes: 0 additions & 6 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -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="config/collector.yaml" --destination="$install_dir/config/collector.yaml"

#=================================================
# SET FILE OWNERSHIP / PERMISSIONS
#=================================================

myynh_set_permissions

#=================================================
# START SYSTEMD SERVICE
#=================================================
Expand Down

0 comments on commit ba2715e

Please sign in to comment.