1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/httpsh_ynh.git synced 2024-09-03 19:25:55 +02:00

Fix permissions

This commit is contained in:
Salamandar 2023-09-26 19:17:52 +02:00
parent 262984db8a
commit 76267cffd4
3 changed files with 10 additions and 7 deletions

View file

@ -26,6 +26,7 @@ mv "$install_dir/httpsh/usr/local/bin/ttyd-login" "$install_dir/httpsh-ttyd-logi
ynh_add_config --template="../conf/ttyd_httpsh.conf" --destination="$install_dir/ttyd_httpsh.conf"
chown -R "$app:$app" "$install_dir"
chmod 750 "$install_dir"
#=================================================
# SYSTEM CONFIGURATION
@ -40,8 +41,9 @@ yunohost service add "$app" --description="httpsh on ttyd web terminal" --log="/
mkdir "/var/log/$app"
touch "/var/log/$app/$app.log"
chown -R "$app:$app" "/var/log/$app"
chmod -R 750 "/var/log/$app"
chmod 750 "/var/log/$app"
ynh_use_logrotate

View file

@ -18,6 +18,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir"
chown -R "$app:$app" "$install_dir"
chmod 750 "$install_dir"
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
@ -33,8 +34,9 @@ yunohost service add "$app" --description="httpsh on ttyd web terminal" --log="/
mkdir "/var/log/$app"
touch "/var/log/$app/$app.log"
chown -R "$app:$app" "/var/log/$app"
chmod -R 750 "/var/log/$app"
chmod 750 "/var/log/$app"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"

View file

@ -59,10 +59,8 @@ then
ynh_setup_source --source_id=httpsh --dest_dir="$install_dir/httpsh"
fi
# $install_dir will automatically be initialized with some decent
# permissions by default ... however, you may need to recursively reapply
# ownership to all files such as after the ynh_setup_source step
chown -R "$app:$app" "$install_dir"
chown -R "$app:$app" "/var/log/$app"
chmod 750 "/var/log/$app"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
@ -91,7 +89,8 @@ mv "$install_dir/httpsh/usr/local/bin/ttyd-login" "$install_dir/httpsh"
ynh_add_config --template="../conf/ttyd_httpsh.conf" --destination="$install_dir/ttyd_httpsh.conf"
chown -R "$app:$app" "$install_dir"
chown -R "$app:$app" "/var/log/$app"
chmod 750 "/var/log/$app"
#=================================================
# START SYSTEMD SERVICE