mirror of
https://github.com/YunoHost-Apps/terraforming-mars_ynh.git
synced 2024-09-03 20:36:05 +02:00
cleanings
This commit is contained in:
parent
a4e6533d35
commit
ec30afef93
4 changed files with 6 additions and 24 deletions
|
@ -46,8 +46,6 @@ ram.runtime = "50M"
|
|||
|
||||
[resources.install_dir]
|
||||
|
||||
[resources.data_dir]
|
||||
|
||||
[resources.permissions]
|
||||
|
||||
main.url = "/"
|
||||
|
|
|
@ -21,12 +21,6 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE DATA DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$data_dir" --is_big
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -30,19 +30,6 @@ chmod 750 "$install_dir"
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the data directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
mkdir -p $data_dir
|
||||
|
||||
chmod 750 "$data_dir"
|
||||
chmod -R o-rwx "$data_dir"
|
||||
chown -R $app:www-data "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
|
@ -53,6 +40,9 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=10
|
|||
# Define and install dependencies
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
# Upgrade NPM
|
||||
ynh_npm install --global npm@6.14.18
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
#=================================================
|
||||
|
@ -84,7 +74,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
|||
|
||||
ynh_exec_warn_less ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match=""
|
||||
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -35,8 +35,9 @@ ynh_npm install --global npm@6.14.18
|
|||
#=================================================
|
||||
ynh_script_progression --message="Building app... This may take quiete some time" --weight=30
|
||||
|
||||
ynh_secure_remove $install_dir/terraforming-mars
|
||||
|
||||
cd $install_dir
|
||||
ynh_secure_remove terraforming-mars
|
||||
ynh_exec_warn_less git clone https://github.com/terraforming-mars/terraforming-mars.git
|
||||
|
||||
cd $install_dir/terraforming-mars
|
||||
|
@ -98,7 +99,7 @@ yunohost service add $app --log="/var/log/$app/$app.log"
|
|||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
ynh_script_progression --message="Starting a systemd service..."
|
||||
|
||||
ynh_exec_warn_less ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match=""
|
||||
|
||||
|
|
Loading…
Reference in a new issue