7
This commit is contained in:
parent
6690840df1
commit
2910a8753f
@ -49,8 +49,11 @@ ram.runtime = "50M"
|
|||||||
default = "none"
|
default = "none"
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
|
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
||||||
|
[resources.install_dir]
|
||||||
|
|
||||||
|
[resources.permissions]
|
||||||
|
main.url = "/"
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,17 +28,17 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
|
|||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A POSTGRESQL DATABASE
|
# DISABLED: CREATE A POSTGRESQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating a PostgreSQL database..."
|
# ynh_script_progression --message="Creating a PostgreSQL database..."
|
||||||
|
|
||||||
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
|
# ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..."
|
ynh_script_progression --message="Setting up source files..."
|
||||||
|
echo $git_url
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
@ -48,42 +48,42 @@ chown -R "$app:$app" "$install_dir"
|
|||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CONFIGURATION
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..."
|
# ynh_script_progression --message="Adding a configuration file..."
|
||||||
|
|
||||||
ynh_add_config --template="config.sample.yml" --destination="$install_dir/config.yml"
|
# ynh_add_config --template="config.sample.yml" --destination="$install_dir/config.yml"
|
||||||
|
|
||||||
chmod 400 "$install_dir/config.yml"
|
# chmod 400 "$install_dir/config.yml"
|
||||||
chown "$app:$app" "$install_dir/config.yml"
|
# chown "$app:$app" "$install_dir/config.yml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
# ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# # Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
# ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# # Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
# ynh_add_systemd_config
|
||||||
yunohost service add "$app" --description="$app daemon for Wiki.js" --log="/var/log/$app/$app.log"
|
# yunohost service add "$app" --description="$app daemon for Custom Node.js App" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE LDAP USER
|
# CREATE LDAP USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating LDAP user..."
|
# ynh_script_progression --message="Creating LDAP user..."
|
||||||
|
|
||||||
yunohost user create "$ldap_user" --fullname "SvcWikijsLdap" --domain "$domain" --password "$ldap_password" -q 0
|
# yunohost user create "$ldap_user" --fullname "SvcWikijsLdap" --domain "$domain" --password "$ldap_password" -q 0
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..."
|
# ynh_script_progression --message="Starting a systemd service..."
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name="$app" --action="start" --log_path=systemd --line_match="HTTP Server:"
|
# ynh_systemd_action --service_name="$app" --action="start" --log_path=systemd --line_match="HTTP Server:"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Installation of $app completed"
|
# ynh_script_progression --message="Installation of $app completed"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user