mirror of
https://github.com/YunoHost-Apps/dispatch_ynh.git
synced 2024-09-03 18:25:53 +02:00
commit
083a2cf08b
6 changed files with 21 additions and 22 deletions
|
@ -1,7 +1,7 @@
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld"
|
domain="domain.tld"
|
||||||
path="/"
|
path="/path"
|
||||||
is_public=1
|
is_public=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
|
@ -11,6 +11,7 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
|
#upgrade=1 from_commit=CommitHash
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
change_url=1
|
change_url=1
|
||||||
|
|
|
@ -16,5 +16,4 @@ location / {
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Dispatch IRC client
|
Description=Dispatch IRC client
|
||||||
Wants=network-online.target
|
After=network.target
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=nogroup
|
Group=__APP__
|
||||||
|
WorkingDirectory=__FINALPATH__/
|
||||||
ExecStart=__FINALPATH__/dispatch
|
ExecStart=__FINALPATH__/dispatch
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
StartLimitInterval=60s
|
|
||||||
StartLimitBurst=3
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=multi-user.target
|
||||||
|
|
10
doc/DESCRITION.md
Normal file
10
doc/DESCRITION.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Searchable history
|
||||||
|
- Persistent connections
|
||||||
|
- Multiple servers and users
|
||||||
|
- Automatic HTTPS through Let's Encrypt
|
||||||
|
- Single binary with no dependencies
|
||||||
|
- DCC downloads
|
||||||
|
- SASL
|
||||||
|
- Client certificates
|
|
@ -79,6 +79,8 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
ynh_setup_source --dest_dir=$final_path --source_id="$architecture"
|
ynh_setup_source --dest_dir=$final_path --source_id="$architecture"
|
||||||
|
|
||||||
mkdir "$final_path/.dispatch"
|
mkdir "$final_path/.dispatch"
|
||||||
|
ynh_add_config --template="../conf/config.default.toml" --destination="$final_path/.dispatch/config.toml"
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
@ -91,15 +93,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=3
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC SETUP
|
|
||||||
#=================================================
|
|
||||||
# MODIFY A CONFIG FILE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Modifying a config file..." --weight=1
|
|
||||||
|
|
||||||
ynh_add_config --template="../conf/config.default.toml" --destination="$final_path/.dispatch/config.toml"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -122,6 +115,8 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$app --action=start --log_path="systemd"
|
ynh_systemd_action --service_name=$app --action=start --log_path="systemd"
|
||||||
|
|
||||||
|
#sleep 60
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -35,8 +35,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..." --weight=2
|
ynh_script_progression --message="Validating restoration parameters..." --weight=2
|
||||||
|
|
||||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
|
||||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
|
||||||
test ! -d $final_path \
|
test ! -d $final_path \
|
||||||
|| ynh_die --message="There is already a directory: $final_path "
|
|| ynh_die --message="There is already a directory: $final_path "
|
||||||
|
|
||||||
|
@ -45,7 +43,7 @@ test ! -d $final_path \
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the NGINX configuration..."
|
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue