mirror of
https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh.git
synced 2024-09-03 19:46:01 +02:00
Systemd hardening add required home dir
This commit is contained in:
parent
ae73a9aab3
commit
5c49b66ac3
4 changed files with 10 additions and 7 deletions
|
@ -12,7 +12,7 @@ Restart=always
|
||||||
RestartSec=3
|
RestartSec=3
|
||||||
|
|
||||||
# Optional hardening to improve security
|
# Optional hardening to improve security
|
||||||
ReadWritePaths=/opt/mautrix-whatsapp
|
ReadWritePaths=/opt/yunohost/__APP__
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
MemoryDenyWriteExecute=true
|
MemoryDenyWriteExecute=true
|
||||||
PrivateDevices=yes
|
PrivateDevices=yes
|
||||||
|
|
|
@ -107,8 +107,9 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring system user..." --weight=1
|
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||||
|
|
||||||
# Create a system user
|
# Create a system user and set home dir to /opt/yunohost/$app so systemd hardening works
|
||||||
ynh_system_user_create --username=$app
|
# See more: https://docs.mau.fi/bridges/go/setup.html?bridge=whatsapp#systemd-service
|
||||||
|
ynh_system_user_create --username=$app --home_dir=/opt/yunohost/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A POSTGRESQL DATABASE
|
# CREATE A POSTGRESQL DATABASE
|
||||||
|
|
|
@ -66,8 +66,9 @@ test ! -d $final_path || ynh_die --message="There is already a directory: $final
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
# Create a dedicated user (if not existing) and set home dir to /opt/yunohost/$app so systemd hardening works
|
||||||
ynh_system_user_create --username=$app
|
# See more: https://docs.mau.fi/bridges/go/setup.html?bridge=whatsapp#systemd-service
|
||||||
|
ynh_system_user_create --username=$app --home_dir=/opt/yunohost/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE APP MAIN DIR
|
# RESTORE THE APP MAIN DIR
|
||||||
|
|
|
@ -134,8 +134,9 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=8
|
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=8
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
# Create a dedicated user (if not existing) and set home dir to /opt/yunohost/$app so systemd hardening works
|
||||||
ynh_system_user_create --username=$app
|
# See more: https://docs.mau.fi/bridges/go/setup.html?bridge=whatsapp#systemd-service
|
||||||
|
ynh_system_user_create --username=$app --home_dir=/opt/yunohost/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
|
Loading…
Add table
Reference in a new issue