mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
fix
This commit is contained in:
parent
4977099112
commit
5ac98e4ad5
3 changed files with 29 additions and 20 deletions
|
@ -7,13 +7,9 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
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
|
||||
SyslogIdentifier=__APP__
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
||||
|
||||
#ExecStart=/usr/bin/php daemon.php start --url=https://__DOMAIN__/__PATH__ --port=__PORT__
|
|
@ -5,8 +5,7 @@
|
|||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="postgresql "
|
||||
#composer php-fpm php-curl php-mbstring php-imagick php-gd php-pgsql php-xml
|
||||
pkg_dependencies="postgresql composer php-fpm php-curl php-mbstring php-imagick php-gd php-pgsql php-xml"
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -148,9 +148,7 @@ ynh_store_file_checksum --file="$final_path/config/db.inc.php"
|
|||
# )
|
||||
|
||||
pushd "$final_path" || ynh_die
|
||||
ynh_package_install movim
|
||||
#composer install --no-interaction --quiet
|
||||
#composer $app:migrate
|
||||
composer install #--no-interaction --quiet
|
||||
popd || ynh_die
|
||||
|
||||
#=================================================
|
||||
|
@ -158,8 +156,8 @@ popd || ynh_die
|
|||
#=================================================
|
||||
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="__PORT__" --replace_string="$port" --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_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
|
||||
|
||||
#=================================================
|
||||
# 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
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||
|
||||
# SSOwat configuration
|
||||
if [[ "$ssoenabled" = "No" ]]; then
|
||||
ynh_app_setting_set "$app" skipped_uris "/"
|
||||
(cd "$final_path" && php mud.php config --xmppwhitelist="$domain")
|
||||
undo_sso_patch
|
||||
else
|
||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
||||
# Make app public if necessary or protect it
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# Everyone can access the app.
|
||||
# The "main" permission is automatically created before the install script.
|
||||
ynh_permission_update --permission "main" --add "visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue