1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/thelounge_ynh.git synced 2024-09-03 20:35:54 +02:00
This commit is contained in:
ericgaspar 2021-08-30 08:51:24 +02:00
parent 80c163354e
commit fc1d5727b0
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 7 additions and 37 deletions

View file

@ -1,18 +0,0 @@
[Unit]
Description=The Lounge (IRC client)
After=network-online.target
Wants=network-online.target
[Service]
User=__APP__
Group=__APP__
Type=simple
ExecStart=/usr/bin/thelounge start
ProtectSystem=yes
ProtectHome=yes
NoNewPrivileges=yes
PrivateTmp=yes
[Install]
WantedBy=multi-user.target

View file

@ -63,9 +63,6 @@ ynh_script_progression --message="Installing dependencies..."
# Install Nodejs # Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
# # Install Yarn
# ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
@ -96,29 +93,20 @@ ynh_add_nginx_config
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." #ynh_script_progression --message="Modifying a config file..."
#mkdir -p /home/yunohost.app/$app #ynh_add_config --template="../conf/config.js" --destination="/etc/thelounge/config.js"
ynh_add_config --template="../conf/config.js" --destination="/etc/thelounge/config.js"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
ynh_add_systemd_config
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
ynh_script_progression --message="Securing files and directories..." #ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files # Set permissions to app files
chown -R $app: $final_path #chown -R $app: $final_path
chown -R $app: $config_path #chown -R $app: $config_path
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
@ -133,8 +121,8 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a
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="Available at http" ynh_systemd_action --service_name=$app --action=start --log_path=systemd #--line_match="Available at http"
systemctl enable --now thelounge.service #systemctl enable --now thelounge.service
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT