mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
domains: Make sure domain setting folder exists with appropriate perms
This commit is contained in:
parent
065ebec821
commit
8f8b6eae7c
1 changed files with 7 additions and 0 deletions
|
@ -35,6 +35,10 @@ do_init_regen() {
|
||||||
mkdir -p /home/yunohost.app
|
mkdir -p /home/yunohost.app
|
||||||
chmod 755 /home/yunohost.app
|
chmod 755 /home/yunohost.app
|
||||||
|
|
||||||
|
# Domain settings
|
||||||
|
mkdir -p /etc/yunohost/domains
|
||||||
|
chmod 700 /etc/yunohost/domains
|
||||||
|
|
||||||
# Backup folders
|
# Backup folders
|
||||||
mkdir -p /home/yunohost.backup/archives
|
mkdir -p /home/yunohost.backup/archives
|
||||||
chmod 750 /home/yunohost.backup/archives
|
chmod 750 /home/yunohost.backup/archives
|
||||||
|
@ -179,6 +183,8 @@ do_post_regen() {
|
||||||
[ ! -e "/home/$USER" ] || setfacl -m g:all_users:--- /home/$USER
|
[ ! -e "/home/$USER" ] || setfacl -m g:all_users:--- /home/$USER
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Domain settings
|
||||||
|
mkdir -p /etc/yunohost/domains
|
||||||
|
|
||||||
# Misc configuration / state files
|
# Misc configuration / state files
|
||||||
chown root:root $(ls /etc/yunohost/{*.yml,*.yaml,*.json,mysql,psql} 2>/dev/null)
|
chown root:root $(ls /etc/yunohost/{*.yml,*.yaml,*.json,mysql,psql} 2>/dev/null)
|
||||||
|
@ -187,6 +193,7 @@ do_post_regen() {
|
||||||
# Apps folder, custom hooks folder
|
# Apps folder, custom hooks folder
|
||||||
[[ ! -e /etc/yunohost/hooks.d ]] || (chown root /etc/yunohost/hooks.d && chmod 700 /etc/yunohost/hooks.d)
|
[[ ! -e /etc/yunohost/hooks.d ]] || (chown root /etc/yunohost/hooks.d && chmod 700 /etc/yunohost/hooks.d)
|
||||||
[[ ! -e /etc/yunohost/apps ]] || (chown root /etc/yunohost/apps && chmod 700 /etc/yunohost/apps)
|
[[ ! -e /etc/yunohost/apps ]] || (chown root /etc/yunohost/apps && chmod 700 /etc/yunohost/apps)
|
||||||
|
[[ ! -e /etc/yunohost/domains ]] || (chown root /etc/yunohost/domains && chmod 700 /etc/yunohost/domains)
|
||||||
|
|
||||||
# Create ssh.app and sftp.app groups if they don't exist yet
|
# Create ssh.app and sftp.app groups if they don't exist yet
|
||||||
grep -q '^ssh.app:' /etc/group || groupadd ssh.app
|
grep -q '^ssh.app:' /etc/group || groupadd ssh.app
|
||||||
|
|
Loading…
Add table
Reference in a new issue