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:
parent
262984db8a
commit
76267cffd4
3 changed files with 10 additions and 7 deletions
|
@ -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"
|
ynh_add_config --template="../conf/ttyd_httpsh.conf" --destination="$install_dir/ttyd_httpsh.conf"
|
||||||
|
|
||||||
chown -R "$app:$app" "$install_dir"
|
chown -R "$app:$app" "$install_dir"
|
||||||
|
chmod 750 "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
|
@ -40,8 +41,9 @@ yunohost service add "$app" --description="httpsh on ttyd web terminal" --log="/
|
||||||
|
|
||||||
mkdir "/var/log/$app"
|
mkdir "/var/log/$app"
|
||||||
touch "/var/log/$app/$app.log"
|
touch "/var/log/$app/$app.log"
|
||||||
|
|
||||||
chown -R "$app:$app" "/var/log/$app"
|
chown -R "$app:$app" "/var/log/$app"
|
||||||
chmod -R 750 "/var/log/$app"
|
chmod 750 "/var/log/$app"
|
||||||
|
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
||||||
ynh_restore_file --origin_path="$install_dir"
|
ynh_restore_file --origin_path="$install_dir"
|
||||||
|
|
||||||
chown -R "$app:$app" "$install_dir"
|
chown -R "$app:$app" "$install_dir"
|
||||||
|
chmod 750 "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEM CONFIGURATIONS
|
# RESTORE SYSTEM CONFIGURATIONS
|
||||||
|
@ -33,8 +34,9 @@ yunohost service add "$app" --description="httpsh on ttyd web terminal" --log="/
|
||||||
|
|
||||||
mkdir "/var/log/$app"
|
mkdir "/var/log/$app"
|
||||||
touch "/var/log/$app/$app.log"
|
touch "/var/log/$app/$app.log"
|
||||||
|
|
||||||
chown -R "$app:$app" "/var/log/$app"
|
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"
|
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
|
|
|
@ -59,10 +59,8 @@ then
|
||||||
ynh_setup_source --source_id=httpsh --dest_dir="$install_dir/httpsh"
|
ynh_setup_source --source_id=httpsh --dest_dir="$install_dir/httpsh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# $install_dir will automatically be initialized with some decent
|
chown -R "$app:$app" "/var/log/$app"
|
||||||
# permissions by default ... however, you may need to recursively reapply
|
chmod 750 "/var/log/$app"
|
||||||
# ownership to all files such as after the ynh_setup_source step
|
|
||||||
chown -R "$app:$app" "$install_dir"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# 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"
|
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
|
# START SYSTEMD SERVICE
|
||||||
|
|
Loading…
Add table
Reference in a new issue