1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
This commit is contained in:
ericgaspar 2020-07-24 18:17:18 +02:00
parent 4977099112
commit 5ac98e4ad5
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 29 additions and 20 deletions

View file

@ -7,13 +7,9 @@ Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
ExecStart=/usr/bin/php daemon.php start --url=https://__URL__ --port=__PORT__ ExecStart=/usr/bin/php daemon.php start --url=https://__DOMAIN__/__PATH__ --port=__PORT__
StandardOutput=syslog StandardOutput=syslog
SyslogIdentifier=__APP__ SyslogIdentifier=__APP__
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
#ExecStart=/usr/bin/php daemon.php start --url=https://__DOMAIN__/__PATH__ --port=__PORT__

View file

@ -5,8 +5,7 @@
#================================================= #=================================================
# dependencies used by the app # dependencies used by the app
pkg_dependencies="postgresql " pkg_dependencies="postgresql composer php-fpm php-curl php-mbstring php-imagick php-gd php-pgsql php-xml"
#composer php-fpm php-curl php-mbstring php-imagick php-gd php-pgsql php-xml
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================

View file

@ -148,9 +148,7 @@ ynh_store_file_checksum --file="$final_path/config/db.inc.php"
# ) # )
pushd "$final_path" || ynh_die pushd "$final_path" || ynh_die
ynh_package_install movim composer install #--no-interaction --quiet
#composer install --no-interaction --quiet
#composer $app:migrate
popd || ynh_die popd || ynh_die
#================================================= #=================================================
@ -158,8 +156,8 @@ popd || ynh_die
#================================================= #=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1 ynh_script_progression --message="Configuring a systemd service..." --weight=1
ynh_replace_string --match_string="__URL__" --replace_string="${domain}${path_url}" --target_file=../conf/systemd.service #ynh_replace_string --match_string="__URL__" --replace_string="${domain}${path_url}" --target_file=../conf/systemd.service
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file=../conf/systemd.service #ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file=../conf/systemd.service
ynh_add_systemd_config ynh_add_systemd_config
@ -191,17 +189,33 @@ ynh_add_systemd_config
chown www-data $final_path && chown www-data $final_path/public && chmod u+rwx $final_path chown www-data $final_path && chown www-data $final_path/public && chmod u+rwx $final_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description "Collaborative Markdown notes" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #--line_match="HTTP Server listening"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Configuring SSOwat..." --weight=1
# SSOwat configuration # Make app public if necessary or protect it
if [[ "$ssoenabled" = "No" ]]; then if [ $is_public -eq 1 ]
ynh_app_setting_set "$app" skipped_uris "/" then
(cd "$final_path" && php mud.php config --xmppwhitelist="$domain") # Everyone can access the app.
undo_sso_patch # The "main" permission is automatically created before the install script.
else ynh_permission_update --permission "main" --add "visitors"
ynh_app_setting_set "$app" unprotected_uris "/"
fi fi
#================================================= #=================================================