mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
Regroup systemd-related stuff together
This commit is contained in:
parent
3915c6336e
commit
89642cd165
2 changed files with 19 additions and 39 deletions
|
@ -90,14 +90,6 @@ chown $app:$app "$install_dir/settings.json"
|
|||
chmod 600 "$install_dir/credentials.json"
|
||||
chown $app:$app "$install_dir/credentials.json"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..." --weight=4
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# INSTALL ETHERPAD'S PLUGINS
|
||||
#=================================================
|
||||
|
@ -161,26 +153,23 @@ then
|
|||
fi
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring log rotation..." --weight=1
|
||||
ynh_script_progression --message="Configuring systemd service..." --weight=4
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
# Intgrate in YunoHost
|
||||
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/etherpad.log"
|
||||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate --specific_user=$app/$app
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
|
||||
|
||||
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/etherpad.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=20
|
||||
ynh_script_progression --message="Starting systemd service..." --weight=20
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action=restart --line_match="You can access your Etherpad instance at" --log_path="/var/log/$app/etherpad.log" --timeout="120"
|
||||
|
|
|
@ -139,16 +139,11 @@ chown $app:$app "$install_dir/settings.json"
|
|||
chmod 600 "$install_dir/credentials.json"
|
||||
chown $app:$app "$install_dir/credentials.json"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# INSTALL ETHERPAD'S PLUGINS
|
||||
#=================================================
|
||||
|
||||
|
||||
ynh_script_progression --message="Installing Etherpad plugins..." --weight=90
|
||||
|
||||
pushd "$install_dir"
|
||||
|
@ -200,26 +195,22 @@ then
|
|||
fi
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=2
|
||||
ynh_script_progression --message="Configuring systemd service..." --weight=2
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
# Integrate in YunoHost
|
||||
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/etherpad.log"
|
||||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --non-append --specific_user=$app/$app
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/etherpad.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=9
|
||||
ynh_script_progression --message="Starting systemd service..." --weight=9
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=restart --line_match="You can access your Etherpad instance at" --log_path="/var/log/$app/etherpad.log" --timeout="120"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue