mirror of
https://github.com/YunoHost-Apps/ssh_chroot_dir_ynh.git
synced 2024-09-03 20:26:26 +02:00
fix restore
This commit is contained in:
parent
2670777f2d
commit
bac50b4717
1 changed files with 26 additions and 10 deletions
|
@ -47,10 +47,6 @@ ynh_script_progression --message="Restoring the app main directory..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
|
||||||
chmod -R o-rwx "$final_path"
|
|
||||||
chown -R $app:www-data "$final_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE DATA DIRECTORY
|
# RESTORE THE DATA DIRECTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -58,12 +54,6 @@ ynh_script_progression --message="Restoring the data directory..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/home/yunohost.app/ssh_chroot_directories/$ssh_user" --not_mandatory
|
ynh_restore_file --origin_path="/home/yunohost.app/ssh_chroot_directories/$ssh_user" --not_mandatory
|
||||||
|
|
||||||
mkdir -p $datadir
|
|
||||||
|
|
||||||
chmod 750 "$datadir"
|
|
||||||
chmod -R o-rwx "$datadir"
|
|
||||||
chown -R $app:www-data "$datadir"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -73,6 +63,32 @@ chown -R $app:www-data "$datadir"
|
||||||
# Load functions ssh_chroot_xxx
|
# Load functions ssh_chroot_xxx
|
||||||
source "$final_path/ssh_chroot/ssh_chroot.sh"
|
source "$final_path/ssh_chroot/ssh_chroot.sh"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL QUOTAS SYSTEM
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Install quotas system" --weight=3
|
||||||
|
|
||||||
|
# https://github.com/maniackcrudelis/ssh_chroot/blob/master/unix_quotas/unix_quotas.sh
|
||||||
|
if ! IS_PACKAGE_CHECK; then
|
||||||
|
quotas_install
|
||||||
|
fi
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CONFIGURE FSTAB TO SUPPORT QUOTAS
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configure fstab to support quotas" --weight=3
|
||||||
|
|
||||||
|
# https://github.com/maniackcrudelis/ssh_chroot/blob/master/unix_quotas/unix_quotas.sh
|
||||||
|
# Set fstab
|
||||||
|
if ! IS_PACKAGE_CHECK
|
||||||
|
then
|
||||||
|
quotas_find_mount_point "$user_dir"
|
||||||
|
quotas_set_fstab "$quotas_mount_point"
|
||||||
|
|
||||||
|
# Activate quotas
|
||||||
|
quotas_activate "$quotas_mount_point"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE THE CHROOT DIRECTORY
|
# UPDATE THE CHROOT DIRECTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue