mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
Small fixes
This commit is contained in:
parent
adcf9803ea
commit
5e28adf63d
5 changed files with 20 additions and 18 deletions
|
@ -6,7 +6,7 @@ After=nginx.service network.target local-fs.target postgresql.service
|
|||
Type=simple
|
||||
User=__APP__
|
||||
WorkingDirectory=__FINALPATH__
|
||||
ExecStart=/usr/bin/php7.3 daemon.php start --interface=127.0.0.1 --url=https://__DOMAIN____PATH__/ --port=__PORT__
|
||||
ExecStart=/usr/bin/php__PHP_VERSION__ daemon.php start --interface=127.0.0.1 --url=https://__DOMAIN____PATH__/ --port=__PORT__
|
||||
StandardOutput=syslog
|
||||
SyslogIdentifier=__APP__
|
||||
PIDFile=/run/movim.pid
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"multi_instance": false,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.0-fpm",
|
||||
"php7.3-fpm",
|
||||
"postgresql",
|
||||
"metronome"
|
||||
],
|
||||
|
|
|
@ -153,7 +153,8 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
|||
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file=../conf/systemd.service
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$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_replace_string --match_string="__PHP_VERSION__" --replace_string="$phpversion" --target_file=../conf/systemd.service
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
|
@ -168,9 +169,10 @@ cache_dir="/home/$app"
|
|||
mkdir -p $cache_dir
|
||||
chown -R $app $cache_dir
|
||||
|
||||
cd "$final_path"
|
||||
ynh_exec_as $app php$phpversion composer.phar $app:migrate
|
||||
ynh_exec_as $app php$phpversion daemon.php config --username=$admin --password=$password
|
||||
pushd "$final_path"
|
||||
ynh_exec_as $app php$phpversion composer.phar $app:migrate
|
||||
ynh_exec_as $app php$phpversion daemon.php config --username=$admin --password=$password
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
@ -186,7 +188,7 @@ chown -R $app $final_path/src/Movim/
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description "Responsive web-based XMPP client" --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --description="Responsive web-based XMPP client" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
|
@ -80,7 +80,7 @@ chown -R $app $final_path/src/Movim/
|
|||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/${phpversion}/fpm/pool.d/$app.conf"
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
@ -112,6 +112,7 @@ systemctl enable $app.service --quiet
|
|||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Responsive web-based XMPP client" --log="/var/log/$app/$app.log"
|
||||
|
||||
|
@ -129,7 +130,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
|||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload
|
||||
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -126,7 +126,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
|
|||
ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$timezone" --target_file=../conf/php-fpm.conf
|
||||
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# SET PERMISSIONS
|
||||
|
@ -143,24 +142,23 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
|||
yunohost service add $app --description="Responsive web-based XMPP client" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# Install PHP dependencies using composer
|
||||
# INSTALL PHP DEPENDENCIES USING COMPOSER
|
||||
#=================================================
|
||||
|
||||
(
|
||||
cd "$final_path"
|
||||
pushd "$final_path"
|
||||
curl -sS https://getcomposer.org/installer | php$phpversion -- --version="1.10.16" --install-dir="$final_path" \
|
||||
&& php$phpversion composer.phar config --global discard-changes true --quiet \
|
||||
&& php$phpversion composer.phar install --no-interaction --quiet
|
||||
)
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# Set-up database
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring database.." --weight=1
|
||||
(
|
||||
cd "$final_path"
|
||||
|
||||
pushd "$final_path"
|
||||
ynh_exec_as $app php$phpversion composer.phar movim:migrate
|
||||
)
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
@ -169,7 +167,8 @@ ynh_script_progression --message="Configuring database.." --weight=1
|
|||
# Create a dedicated systemd config
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file=../conf/systemd.service
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$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_replace_string --match_string="__PHP_VERSION__" --replace_string="$phpversion" --target_file=../conf/systemd.service
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue