1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flohmarkt_ynh.git synced 2024-09-03 18:36:30 +02:00
This commit is contained in:
Éric Gaspar 2024-05-10 11:17:19 +02:00
commit b475ce6375

View file

@ -100,11 +100,13 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $flohmarkt_filename --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" yunohost service add $flohmarkt_filename --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile"
# logfile contains possibly the secret setup URL # logfile contains possibly the secret setup URL
ynh_script_progression --message="Setting permissions on logfile..." --weight=2
mkdir -m755 -p "$flohmarkt_log_dir" mkdir -m755 -p "$flohmarkt_log_dir"
touch "$flohmarkt_logfile" touch "$flohmarkt_logfile"
chmod 640 "$flohmarkt_logfile" chmod 640 "$flohmarkt_logfile"
# set file permissions for install dir # set file permissions for install dir
ynh_script_progression --message="Setting permissions on install directory..." --weight=2
flohmarkt_ynh_set_permission flohmarkt_ynh_set_permission
# SETUP FAIL2BAN # SETUP FAIL2BAN
@ -113,10 +115,14 @@ ynh_add_fail2ban_config --logpath="$flohmarkt_logfile" --failregex='INFO: +<HOST
# symlink data_dir and install_dir to make it easier to find the # symlink data_dir and install_dir to make it easier to find the
# files for a certain domain/path # files for a certain domain/path
ynh_script_progression --message="Creating symlinks..." --weight=1
ln -s "$flohmarkt_install" "$flohmarkt_sym_install" ln -s "$flohmarkt_install" "$flohmarkt_sym_install"
ln -s "$flohmarkt_data_dir" "$flohmarkt_sym_data_dir" ln -s "$flohmarkt_data_dir" "$flohmarkt_sym_data_dir"
# start service # start service
ynh_script_progression --message="Debug before starting flohmarkt..." --weight=1
ls -l $flohmarkt_logfile /bin/bash /usr/bin/bash || true
ynh_script_progression --message="Starting flohmarkt..." --weight=10
flohmarkt_ynh_start_service flohmarkt_ynh_start_service
ynh_script_progression --message="Installation of $id completed" --last ynh_script_progression --message="Installation of $id completed" --last