mirror of
https://github.com/YunoHost-Apps/lemmy_ynh.git
synced 2024-09-03 19:36:09 +02:00
Merge branch 'version-2' of https://github.com/YunoHost-Apps/lemmy_ynh into version-2
This commit is contained in:
commit
8ba037726b
5 changed files with 67 additions and 32 deletions
|
@ -1,27 +0,0 @@
|
||||||
;; Test complet
|
|
||||||
; Manifest
|
|
||||||
domain="domain.tld"
|
|
||||||
path="/"
|
|
||||||
admin="john"
|
|
||||||
sitename="lemmy website"
|
|
||||||
; Checks
|
|
||||||
pkg_linter=1
|
|
||||||
setup_sub_dir=0
|
|
||||||
setup_root=1
|
|
||||||
setup_nourl=0
|
|
||||||
setup_private=0
|
|
||||||
setup_public=1
|
|
||||||
upgrade=1
|
|
||||||
# 0.15.2~ynh3
|
|
||||||
upgrade=1 from_commit=206df4db0b99c52f07ea1a2d5daf799d4b8357fd
|
|
||||||
backup_restore=1
|
|
||||||
multi_instance=0
|
|
||||||
port_already_use=0
|
|
||||||
change_url=0
|
|
||||||
;;; Options
|
|
||||||
Email=
|
|
||||||
Notification=none
|
|
||||||
;;; Upgrade options
|
|
||||||
; commit=206df4db0b99c52f07ea1a2d5daf799d4b8357fd
|
|
||||||
name=0.15.2~ynh3
|
|
||||||
manifest_arg=domain=DOMAIN&admin=USER&sitename=lemmy_website&
|
|
|
@ -23,7 +23,7 @@ multi_instance = false
|
||||||
ldap = false
|
ldap = false
|
||||||
sso = false
|
sso = false
|
||||||
disk = "50M"
|
disk = "50M"
|
||||||
ram.build = "50M"
|
ram.build = "100M"
|
||||||
ram.runtime = "50M"
|
ram.runtime = "50M"
|
||||||
|
|
||||||
[install.domain]
|
[install.domain]
|
||||||
|
@ -32,13 +32,14 @@ ram.runtime = "50M"
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
[resources.sources]
|
[resources.sources]
|
||||||
|
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
url = "https://codeload.github.com/jjlin/docker-image-extract/tar.gz/a9e455e44bbbfba897bf3342d9661b182cee67a9"
|
url = "https://codeload.github.com/jjlin/docker-image-extract/tar.gz/a9e455e44bbbfba897bf3342d9661b182cee67a9"
|
||||||
sha256 = "9eb0c734e83a3fd7102fc7209af4977024ec467fbc819782491af47295675f67"
|
sha256 = "9eb0c734e83a3fd7102fc7209af4977024ec467fbc819782491af47295675f67"
|
||||||
|
|
||||||
[resources.sources.lemmy-translations]
|
[resources.sources.lemmy-translations]
|
||||||
url = "https://codeload.github.com/LemmyNet/lemmy-translations/tar.gz/00e4efbef6c3ac34cd2f5f444a95eddce9ec12d7"
|
url = "https://codeload.github.com/LemmyNet/lemmy-translations/tar.gz/ddf0d3a4dcfba5eddbcdb702db2470b52abb3815"
|
||||||
sha256 = "0587c1867c785e6d229d1519a37fc9a280e78f356d919f868f21a896abddff71"
|
sha256 = "7df72cdba8a6c23c9dca528d3fd71dce13f5263b7a59c8512253364d94797757"
|
||||||
|
|
||||||
[resources.ports]
|
[resources.ports]
|
||||||
main.default = 8536
|
main.default = 8536
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
NODEJS_VERSION=12
|
NODEJS_VERSION=18
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
|
54
scripts/change_url
Normal file
54
scripts/change_url
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# GENERIC STARTING
|
||||||
|
#=================================================
|
||||||
|
# IMPORT GENERIC HELPERS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
source _common.sh
|
||||||
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# STANDARD MODIFICATIONS
|
||||||
|
#=================================================
|
||||||
|
# STOP SYSTEMD SERVICE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped" --log_path=systemd
|
||||||
|
ynh_systemd_action --service_name=$app-ui --action="stop" --line_match="Stopped" --log_path=systemd
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# MODIFY URL IN NGINX CONF
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
||||||
|
|
||||||
|
ynh_change_url_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# ADD A CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
|
mkdir -p "$install_dir/config/"
|
||||||
|
ynh_add_config --template="../conf/lemmy.hjson" --destination="$install_dir/config/config.hjson"
|
||||||
|
|
||||||
|
chmod 400 "$install_dir/config/config.hjson"
|
||||||
|
chown $app:$app "$install_dir/config/config.hjson"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# GENERIC FINALISATION
|
||||||
|
#=================================================
|
||||||
|
# START SYSTEMD SERVICE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name=$app --action="start" --line_match="Starting http server at" --log_path="/var/log/$app/$app.log"
|
||||||
|
ynh_systemd_action --service_name=$app-ui --action="start" --line_match="http://0.0.0.0" --log_path="/var/log/$app/$app-ui.log"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Change of URL completed for $app" --last
|
|
@ -7,4 +7,11 @@ test_format = 1.0
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
args.admin = "john"
|
args.admin = "john"
|
||||||
args.sitename = "lemmy website"
|
args.sitename = "lemmy website"
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------
|
||||||
|
# Commits to test upgrade from
|
||||||
|
# -------------------------------
|
||||||
|
|
||||||
|
test_upgrade_from.206df4db0b99c52f07ea1a2d5daf799d4b8357fd.name = "Upgrade from 0.15.2~ynh3"
|
Loading…
Reference in a new issue