mirror of
https://github.com/YunoHost-Apps/cockpit_ynh.git
synced 2024-09-03 18:16:26 +02:00
60 lines
1.5 KiB
Bash
60 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
set -eu
|
|
|
|
# See comments in install script
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
final_path=/opt/yunohost/$app
|
|
|
|
# Source YunoHost helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Stop cockpit service
|
|
systemctl stop cockpit
|
|
|
|
#==============================================
|
|
# INSTALL DEPS
|
|
#==============================================
|
|
|
|
## Install the backports repo for debian
|
|
echo 'deb http://deb.debian.org/debian stretch-backports main' > \
|
|
/etc/apt/sources.list.d/$app.list
|
|
|
|
ynh_package_update
|
|
|
|
#==============================================
|
|
# INSTALL COCKPIT
|
|
#==============================================
|
|
|
|
ynh_package_install cockpit
|
|
|
|
#=================================================
|
|
# NGINX CONFIGURATION
|
|
#=================================================
|
|
|
|
# Create a dedicated nginx config
|
|
#ynh_add_nginx_config
|
|
|
|
|
|
#=================================================
|
|
# UPGRADE CONFIG
|
|
#=================================================
|
|
#cp -a ../conf/loolwsd.xml /etc/loolwsd
|
|
#ynh_replace_string "__NEXTCLOUDDOMAIN__" "$nextcloud_domain" "/etc/loolwsd/loolwsd.xml"
|
|
#ynh_replace_string "__PASSWORD__" "$password" "/etc/loolwsd/loolwsd.xml"
|
|
#systemctl restart loolwsd
|
|
|
|
|
|
|
|
# If app is public, add url to SSOWat conf as skipped_uris
|
|
#if [[ $is_public -eq 1 ]]; then
|
|
# See install script
|
|
# ynh_app_setting_set "$app" unprotected_uris "/"
|
|
#fi
|
|
|
|
rm /etc/apt/sources.list.d/$app.list
|
|
|
|
# Start cockpit service
|
|
systemctl start cockpit
|
|
|