1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kresus_ynh.git synced 2024-09-03 19:36:10 +02:00

Fix permissions

This commit is contained in:
yalh76 2022-06-17 03:00:20 +02:00
parent aec67ee411
commit 90a7e903b1
3 changed files with 13 additions and 11 deletions

View file

@ -6,15 +6,19 @@ After=syslog.target network.target
Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__
WorkingDirectory=__FINALPATH__/
Environment="__YNH_NODE_LOAD_PATH__"
Environment=NODE_ENV=production
ExecStart=__FINALPATH__/bin/kresus.js --config __FINALPATH__/config.ini
Restart=always
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProtectHome=true
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=__APP__
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectHome=yes
ProtectSystem=strict
ProtectControlGroups=yes
ProtectKernelModules=yes
@ -26,9 +30,6 @@ ProtectKernelModules=yes
SupplementaryGroups=postdrop
ReadWritePaths=__FINALPATH__/config.ini __FINALPATH__/data/ /var/spool/postfix/maildrop/
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=__APP__
[Install]
WantedBy=multi-user.target

View file

@ -135,6 +135,7 @@ virtualenv --python=python3 --system-site-packages "${final_path}/venv"
pip install --upgrade pip
pip install woob html2text simplejson BeautifulSoup4 PyExecJS typing-extensions pdfminer.six --ignore-installed
)
chown -R $app:www-data "$final_path"
#=================================================
# INTSALL KRESUS WITH NPM
@ -144,10 +145,9 @@ ynh_script_progression --message="Installing app..."
ynh_use_nodejs
(
cd "$final_path"
chown -R "$app": "$final_path"
ynh_exec_warn_less $ynh_npm install --production --unsafe-perm
)
chown -R $app:www-data "$final_path"
#=================================================
# ADD A CONFIGURATION

View file

@ -160,6 +160,7 @@ virtualenv --python=python3 --system-site-packages "${final_path}/venv"
pip install --upgrade pip
pip install woob html2text simplejson BeautifulSoup4 PyExecJS typing-extensions pdfminer.six --ignore-installed
)
chown -R $app:www-data "$final_path"
#=================================================
# INSTALL KRESUS WITH NPM
@ -169,7 +170,6 @@ ynh_script_progression --message="Installing app..."
ynh_use_nodejs
(
cd "$final_path"
chown -R $app: "$final_path"
# In case of nodejs upgrade, remove the current node_modules to make sure there are no errors
# linked to modules compiled for the previous version.
@ -177,6 +177,7 @@ ynh_use_nodejs
ynh_exec_warn_less $ynh_npm install --production --unsafe-perm
)
chown -R $app:www-data "$final_path"
#=================================================
# UPDATE A CONFIG FILE