Remove old install way
This commit is contained in:
@@ -89,13 +89,6 @@ port=$(ynh_find_port 8095)
|
||||
#ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
|
||||
ynh_app_setting_set $app port $port
|
||||
|
||||
#=================================================
|
||||
# INSTALL YARN 1.13.0
|
||||
#=================================================
|
||||
ynh_print_info "Installing yarn 1.13.0..."
|
||||
|
||||
sudo apt install -y ../sources/yarn_1.13.0_all.deb
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
@@ -110,7 +103,7 @@ ynh_print_info "Installing dependencies..."
|
||||
|
||||
ynh_install_nodejs 10
|
||||
|
||||
ynh_install_app_dependencies redis-server postgresql postgresql-contrib build-essential
|
||||
ynh_install_app_dependencies postgresql postgresql-contrib
|
||||
|
||||
#=================================================
|
||||
# CREATE A POSTGRESQL DATABASE
|
||||
@@ -186,27 +179,9 @@ ynh_print_info "Configuring php-fpm ..."
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
# CREATE LOG FOLDER
|
||||
# ...
|
||||
#=================================================
|
||||
|
||||
mkdir -p "/var/log/$app"
|
||||
chown -R "$app":"$app" "/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# MAKE SETUP
|
||||
#=================================================
|
||||
|
||||
chown -R "$app":"$app" "$final_path"
|
||||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
sudo -u $app env PATH=$PATH yarn cache clean
|
||||
sudo -u $app env PATH=$PATH yarn --frozen-lockfile --non-interactive
|
||||
sudo -u $app env PATH=$PATH yarn build
|
||||
ynh_secure_remove $final_path/node_modules
|
||||
sudo -u $app env PATH=$PATH yarn --production --frozen-lockfile --non-interactive
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
@@ -224,7 +199,6 @@ ynh_print_info "Configuring a systemd service ..."
|
||||
### - And the section "SETUP SYSTEMD" in the upgrade script
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_replace_string "__NODEJS_PATH__" "$nodejs_path" "../conf/systemd.service"
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
@@ -267,7 +241,6 @@ cp -f ../conf/config.sample.yml "$final_path/config.yml"
|
||||
### `ynh_replace_string` is used to replace a string in a file.
|
||||
### (It's compatible with sed regular expressions syntax)
|
||||
|
||||
#ynh_replace_string "match_string" "replace_string" "$final_path/config.yml"
|
||||
ynh_replace_string "__PORT__" "$port" "$final_path/config.yml"
|
||||
ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/config.yml"
|
||||
ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/config.yml"
|
||||
@@ -310,7 +283,7 @@ ynh_print_info "Configuring log rotation ..."
|
||||
### - And the section "SETUP LOGROTATE" in the upgrade script
|
||||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate
|
||||
#ynh_use_logrotate
|
||||
|
||||
#=================================================
|
||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||
@@ -326,7 +299,7 @@ ynh_use_logrotate
|
||||
|
||||
#yunohost service add $app --log "/var/log/$app/$app.log"
|
||||
# if using yunohost version 3.2 or more in the 'manifest.json', a description can be added
|
||||
yunohost service add $app --description "$app daemon for Wiki.js" --log "/var/log/$app/$app.log"
|
||||
yunohost service add $app --description "$app daemon for Wiki.js" -t systemd
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
||||
Reference in New Issue
Block a user