2023-03-21 12:06:44 +08:00
#!/bin/bash
PATH = /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
2023-04-12 17:07:36 +08:00
function error_exit {
echo " $1 " 1>& 2
exit 1
}
2023-07-03 10:36:36 +08:00
trap 'error_exit "Please push issue to: https://github.com/Websoft9/stackhub/issues"' ERR
2023-04-12 17:07:36 +08:00
2023-08-01 11:17:58 +08:00
urls = "https://w9artifact.blob.core.windows.net/release/websoft9"
2023-05-18 17:15:59 +08:00
2023-04-12 17:07:36 +08:00
function get_os_type( ) {
if [ -f /etc/os-release ] ; then
. /etc/os-release
OS = $NAME
elif type lsb_release >/dev/null 2>& 1; then
OS = $( lsb_release -si)
else
OS = $( uname -s)
fi
if [ [ " $OS " = = "CentOS Linux" ] ] ; then
echo "CentOS"
2023-07-27 17:32:38 +08:00
elif [ [ " $OS " = = "CentOS Stream" ] ] ; then
echo "CentOS Stream"
elif [ [ " $OS " = = "Rocky Linux" ] ] ; then
echo "Rocky Linux"
2023-04-12 17:07:36 +08:00
elif [ [ " $OS " = = "Oracle Linux Server" ] ] ; then
echo "OracleLinux"
elif [ [ " $OS " = = "Debian GNU/Linux" ] ] ; then
echo "Debian"
elif [ [ " $OS " = = "Ubuntu" ] ] ; then
echo "Ubuntu"
elif [ [ " $OS " = = "Fedora Linux" ] ] ; then
echo "Fedora"
elif [ [ " $OS " = ~ "Red Hat Enterprise Linux" ] ] ; then
echo "Redhat"
else
echo $OS
fi
}
function get_os_version( ) {
if [ -f /etc/os-release ] ; then
. /etc/os-release
OS = $NAME
VERSION = $VERSION_ID
elif type lsb_release >/dev/null 2>& 1; then
OS = $( lsb_release -si)
VERSION = $( lsb_release -sr)
else
OS = $( uname -s)
VERSION = $( uname -r)
fi
2023-07-29 11:07:34 +08:00
echo $VERSION
2023-04-12 17:07:36 +08:00
}
os_type = $( get_os_type)
os_version = $( get_os_version)
CheckEnvironment( ) {
2023-05-22 10:48:58 +08:00
echo "---------------------------------- Welcome to install websoft9's appstore, it will take 3-5 minutes -------------------------------------------------------"
2023-05-20 11:17:35 +08:00
2023-04-12 17:07:36 +08:00
echo "Check environment ..."
echo os_type: $os_type
echo os_version: $os_version
2023-05-22 10:48:58 +08:00
if [ $( id -u) != "0" ] ; then
echo "Please change to root or 'sudo su' to up system privileges, and reinstall the script again ."
exit 1
fi
2023-04-12 17:07:36 +08:00
if [ $( getconf WORD_BIT) = '32' ] && [ $( getconf LONG_BIT) = '64' ] ; then
echo "64-bit operating system detected."
2023-03-21 12:06:44 +08:00
else
2023-04-12 17:07:36 +08:00
echo "This script only works on 64-bit operating systems."
exit 1
2023-03-21 12:06:44 +08:00
fi
2023-07-29 11:07:34 +08:00
if [ " $os_type " = = 'CentOS' ] ; then
if [ " $os_version " != "7" ] ; then
echo "This app only supported on CentOS 7"
exit 1
fi
2023-03-21 12:06:44 +08:00
fi
2023-07-29 11:07:34 +08:00
if [ " $os_type " = = 'CentOS Stream' ] ; then
if [ " $os_version " != "8" ] ; then
echo "This app only supported on CentOS Stream 8"
exit 1
fi
fi
if [ " $os_type " = = 'Rocky Linux' ] ; then
2023-07-29 13:33:35 +08:00
if [ " ${ os_version : 0 : 1 } " = = "8" ] ; then
echo ""
else
2023-07-29 11:07:34 +08:00
echo "This app only supported on Rocky Linux 8"
exit 1
fi
fi
if [ " $os_type " = = 'Fedora' ] ; then
2023-07-29 13:18:33 +08:00
if [ " $os_version " != "37" ] ; then
2023-07-29 11:37:51 +08:00
echo "This app only supported on Fedora 37"
exit 1
fi
2023-07-29 11:07:34 +08:00
fi
if [ " $os_type " = = 'Redhat' ] ; then
2023-07-29 13:33:35 +08:00
if [ " ${ os_version : 0 : 1 } " != "7" ] && [ " ${ os_version : 0 : 1 } " != "8" ] ; then
2023-07-29 11:07:34 +08:00
echo "This app only supported on Redhat 7,8"
exit 1
fi
fi
if [ " $os_type " = = 'Ubuntu' ] ; then
2023-07-29 13:33:35 +08:00
if [ " $os_version " != "22.04" ] && [ " $os_version " != "20.04" ] && [ " $os_version " != "18.04" ] ; then
2023-07-29 11:07:34 +08:00
echo "This app only supported on Ubuntu 22.04,20.04,18.04"
exit 1
fi
fi
if [ " $os_type " = = 'Debian' ] ; then
2023-07-29 13:00:57 +08:00
if [ " $os_version " != "11" ] ; then
echo "This app only supported on Debian 11"
2023-07-29 11:37:51 +08:00
exit 1
fi
2023-03-21 12:06:44 +08:00
fi
2023-04-12 17:07:36 +08:00
# Check port used
2023-07-26 10:42:48 +08:00
if netstat -tuln | grep -qE ':(80|443|9000)\s' ; then
echo "Port 80,443,9000 is already in use."
2023-04-12 17:07:36 +08:00
exit 1
else
2023-07-26 10:42:48 +08:00
echo "Port 80,443, 9000 are free."
2023-03-21 12:06:44 +08:00
fi
2023-04-12 17:07:36 +08:00
}
InstallTools( ) {
2023-03-21 12:06:44 +08:00
2023-05-30 17:42:14 +08:00
echo "Prepare to install Tools ..."
2023-04-12 17:07:36 +08:00
2023-07-25 17:33:06 +08:00
if [ " $os_type " = = 'CentOS' ] || [ " $os_type " = = 'Rocky Linux' ] || [ " $os_type " = = 'CentOS Stream' ] || [ " $os_type " = = 'Fedora' ] || [ " $os_type " = = 'OracleLinux' ] || [ " $os_type " = = 'Redhat' ] ; then
2023-07-26 10:42:48 +08:00
sudo yum update -y
sudo yum install git curl wget yum-utils jq bc unzip -y
2023-03-21 12:06:44 +08:00
fi
2023-04-12 17:07:36 +08:00
if [ " $os_type " = = 'Ubuntu' ] || [ " $os_type " = = 'Debian' ] ; then
while fuser /var/lib/dpkg/lock >/dev/null 2>& 1 ; do
echo "Waiting for other software managers to finish..."
sleep 5
done
sudo apt update -y 1>/dev/null 2>& 1
2023-06-28 09:06:28 +08:00
if command -v git > /dev/null; then
echo "git installed ..."
else
sudo apt install git -y
fi
if command -v curl > /dev/null; then
echo "jcurlq installed ..."
else
sudo apt install curl -y
fi
if command -v wget > /dev/null; then
echo "wget installed ..."
else
sudo apt install wget -y
fi
if command -v jq > /dev/null; then
echo "jq installed ..."
else
sudo apt install jq -y
fi
2023-07-21 09:17:40 +08:00
2023-06-28 09:06:28 +08:00
if command -v bc > /dev/null; then
echo "bc installed ..."
else
sudo apt install bc -y
fi
if command -v unzip > /dev/null; then
echo "unzip installed ..."
else
sudo apt install unzip -y
fi
2023-04-12 17:07:36 +08:00
fi
2023-03-21 12:06:44 +08:00
}
2023-04-12 17:07:36 +08:00
InstallDocker( ) {
2023-06-25 11:01:50 +08:00
if command -v docker & > /dev/null
then
echo "Docker is installed, update..."
if command -v apt > /dev/null; then
sudo apt -y install --only-upgrade docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
elif command -v dnf > /dev/null; then
sudo dnf update -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
elif command -v yum > /dev/null; then
sudo yum update -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
fi
2023-06-27 16:51:11 +08:00
sudo systemctl start docker
sudo systemctl enable docker
if ! docker network inspect websoft9 > /dev/null 2>& 1; then
sudo docker network create websoft9
fi
2023-06-25 11:01:50 +08:00
return
else
echo "Docker is not installed, start to install..."
fi
2023-04-12 17:07:36 +08:00
if [ " $os_type " = = 'CentOS' ] ; then
curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
fi
if [ " $os_type " = = 'Ubuntu' ] || [ " $os_type " = = 'Debian' ] ; then
apt-get update
while fuser /var/lib/dpkg/lock >/dev/null 2>& 1 ; do
echo "Waiting for other software managers to finish..."
sleep 5
done
curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
sleep 30
fi
if [ " $os_type " = = 'OracleLinux' ] ; then
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
fi
if [ " $os_type " = = 'Fedora' ] ; then
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo yum install device-mapper-persistent-data lvm2 docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-scan-plugin docker-ce-rootless-extras -y
fi
if [ " $os_type " = = 'Redhat' ] ; then
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc -y 1>/dev/null 2>& 1
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
fi
2023-07-25 17:33:06 +08:00
if [ " $os_type " = = 'CentOS Stream' ] || [ " $os_type " = = 'Rocky Linux' ] ; then
2023-04-12 17:07:36 +08:00
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc -y 1>/dev/null 2>& 1
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
fi
sudo systemctl start docker
sudo systemctl enable docker
if ! docker network inspect websoft9 > /dev/null 2>& 1; then
sudo docker network create websoft9
fi
2023-03-21 12:06:44 +08:00
}
2023-04-12 17:07:36 +08:00
InstallCockpit( ) {
2023-05-30 17:42:14 +08:00
echo "Prepare to install Cockpit ..."
2023-03-21 12:06:44 +08:00
2023-04-12 17:07:36 +08:00
if [ " ${ os_type } " = = 'Debian' ] ; then
VERSION_CODENAME = $( cat /etc/os-release | grep VERSION_CODENAME| cut -f2 -d"=" )
sudo echo " deb http://deb.debian.org/debian ${ VERSION_CODENAME } -backports main " >/etc/apt/sources.list.d/backports.list
sudo apt update
sudo apt install -t ${ VERSION_CODENAME } -backports cockpit -y
2023-06-02 17:04:22 +08:00
sudo apt install cockpit-pcp cockpit-packagekit -y 1>/dev/null 2>& 1
2023-03-21 12:06:44 +08:00
fi
2023-04-12 17:07:36 +08:00
if [ " ${ os_type } " = = 'Ubuntu' ] ; then
2023-05-22 17:12:08 +08:00
if grep -q "^#.*deb http://mirrors.tencentyun.com/ubuntu.*backports" /etc/apt/sources.list; then
2023-05-22 16:18:38 +08:00
echo "Add backports deb ..."
2023-05-22 17:12:08 +08:00
sudo sed -i 's/^#\(.*deb http:\/\/mirrors.tencentyun.com\/ubuntu.*backports.*\)/\1/' /etc/apt/sources.list
2023-05-22 16:09:30 +08:00
apt update
fi
2023-04-12 17:07:36 +08:00
VERSION_CODENAME = $( cat /etc/os-release | grep VERSION_CODENAME| cut -f2 -d"=" )
sudo apt install -t ${ VERSION_CODENAME } -backports cockpit -y
2023-06-06 15:11:20 +08:00
sudo apt install cockpit-pcp -y 1>/dev/null 2>& 1
2023-04-12 17:07:36 +08:00
echo "Cockpit allow root user"
echo "" >/etc/cockpit/disallowed-users 1>/dev/null 2>& 1
2023-03-21 12:06:44 +08:00
fi
2023-04-12 17:07:36 +08:00
if [ " ${ os_type } " = = 'CentOS' ] || [ " $os_type " = = 'OracleLinux' ] ; then
sudo yum install cockpit -y
2023-06-02 17:04:22 +08:00
sudo yum install cockpit-pcp cockpit-packagekit -y 1>/dev/null 2>& 1
2023-04-12 17:07:36 +08:00
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --permanent --zone= public --add-service= cockpit
sudo firewall-cmd --reload
fi
2023-03-21 12:06:44 +08:00
2023-04-12 17:07:36 +08:00
if [ " $os_type " = = 'Fedora' ] ; then
sudo dnf install cockpit -y
2023-06-02 17:04:22 +08:00
sudo dnf install cockpit-pcp cockpit-packagekit -y 1>/dev/null 2>& 1
2023-04-12 17:07:36 +08:00
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --add-service= cockpit
sudo firewall-cmd --add-service= cockpit --permanent
fi
if [ " $os_type " = = 'Redhat' ] ; then
sudo subscription-manager repos --enable rhel-7-server-extras-rpms 1>/dev/null 2>& 1
sudo yum install cockpit -y
2023-06-02 17:04:22 +08:00
sudo yum install cockpit-pcp cockpit-packagekit -y 1>/dev/null 2>& 1
2023-04-12 17:07:36 +08:00
sudo setenforce 0 1>/dev/null 2>& 1
sudo sed -i 's/SELINUX=.*/SELINUX=disabled/' /etc/selinux/config 1>/dev/null 2>& 1
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --add-service= cockpit
sudo firewall-cmd --add-service= cockpit --permanent
fi
if [ " $os_type " = = 'CentOS Stream' ] ; then
sudo subscription-manager repos --enable rhel-7-server-extras-rpms 1>/dev/null 2>& 1
sudo yum install cockpit -y
2023-06-01 10:37:17 +08:00
sudo yum install cockpit-pcp -y 1>/dev/null 2>& 1
2023-04-12 17:07:36 +08:00
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --add-service= cockpit
sudo firewall-cmd --add-service= cockpit --permanent
sudo setenforce 0 1>/dev/null 2>& 1
sudo sed -i 's/SELINUX=.*/SELINUX=disabled/' /etc/selinux/config 1>/dev/null 2>& 1
fi
2023-07-25 17:33:06 +08:00
file = "/etc/cockpit/disallowed-users"
if [ -f " $file " ] ; then
echo "" > " $file "
else
echo " $file is not exist "
fi
2023-04-12 17:07:36 +08:00
2023-08-07 14:10:52 +08:00
echo "Set cockpit port to 9000 ..."
sudo sed -i 's/ListenStream=9090/ListenStream=9000/' /lib/systemd/system/cockpit.socket
2023-04-12 17:07:36 +08:00
}
2023-07-21 15:19:59 +08:00
InstallPlugins( ) {
2023-04-12 17:07:36 +08:00
# download apps
2023-07-21 15:19:59 +08:00
mkdir -p /data/apps && cd /data/apps
2023-07-21 17:01:42 +08:00
wget $urls /websoft9-latest.zip
2023-07-21 15:19:59 +08:00
unzip websoft9-latest.zip
cp -r /data/apps/websoft9/docker /data/apps/w9services
2023-07-24 17:55:37 +08:00
rm -f websoft9-latest.zip
2023-07-21 15:19:59 +08:00
# install plugins
cd /usr/share/cockpit
appstore_version = $( cat /data/apps/websoft9/version.json | jq .PLUGINS | jq .APPSTORE | tr -d '"' )
2023-07-27 15:03:59 +08:00
wget $urls /plugin/appstore/appstore-$appstore_version .zip
2023-07-21 15:19:59 +08:00
unzip appstore-$appstore_version .zip
myapps_version = $( cat /data/apps/websoft9/version.json | jq .PLUGINS | jq .MYAPPS| tr -d '"' )
2023-07-27 15:03:59 +08:00
wget $urls /plugin/myapps/myapps-$myapps_version .zip
2023-07-21 15:19:59 +08:00
unzip myapps-$myapps_version .zip
portainer_version = $( cat /data/apps/websoft9/version.json | jq .PLUGINS | jq .PORTAINER | tr -d '"' )
2023-07-27 15:03:59 +08:00
wget $urls /plugin/portainer/portainer-$portainer_version .zip
2023-07-21 15:19:59 +08:00
unzip portainer-$portainer_version .zip
nginx_version = $( cat /data/apps/websoft9/version.json | jq .PLUGINS | jq .NGINX | tr -d '"' )
2023-07-27 15:03:59 +08:00
wget $urls /plugin/nginx/nginx-$nginx_version .zip
2023-07-21 15:19:59 +08:00
unzip nginx-$nginx_version .zip
2023-07-29 15:21:46 +08:00
settings_version = $( cat /data/apps/websoft9/version.json | jq .PLUGINS | jq .SETTINGS | tr -d '"' )
wget $urls /plugin/settings/settings-$settings_version .zip
unzip settings-$settings_version .zip
2023-07-21 15:19:59 +08:00
2023-08-07 14:10:52 +08:00
# install navigator
2023-08-10 16:51:07 +08:00
navigator_version = $( cat /data/apps/websoft9/version.json | jq .PLUGINS | jq .NAVIGATOR | tr -d '"' )
wget $urls /plugin/navigator/navigator-$navigator_version .zip
unzip navigator-$navigator_version .zip
rm -f *.zip
2023-08-07 14:10:52 +08:00
2023-07-21 15:19:59 +08:00
# install library
cd /data
library_version = $( cat /data/apps/websoft9/version.json | jq .PLUGINS | jq .LIBRARY | tr -d '"' )
2023-07-27 15:03:59 +08:00
wget $urls /plugin/library/library-$library_version .zip
2023-07-21 15:19:59 +08:00
unzip library-$library_version .zip
rm -f library-$library_version .zip
# configure cockpit
cp /data/apps/websoft9/cockpit/cockpit.conf /etc/cockpit/cockpit.conf
2023-07-24 10:43:56 +08:00
#####ci-section#####
2023-07-21 15:19:59 +08:00
sudo systemctl daemon-reload
sudo systemctl enable --now cockpit.socket
sudo systemctl restart cockpit.socket
2023-07-20 15:40:33 +08:00
2023-04-12 17:07:36 +08:00
}
StartAppMng( ) {
echo "Start appmanage API ..."
2023-06-03 10:18:41 +08:00
cd /data/apps/w9services/w9redis && sudo docker compose up -d
cd /data/apps/w9services/w9appmanage && sudo docker compose up -d
2023-05-18 17:15:59 +08:00
2023-07-21 15:19:59 +08:00
public_ip = ` bash /data/apps/websoft9/scripts/get_ip.sh`
2023-06-03 10:18:41 +08:00
echo $public_ip > /data/apps/w9services/w9appmanage/public_ip
2023-06-30 16:02:39 +08:00
appmanage_ip = $( docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' websoft9-appmanage)
2023-04-12 17:07:36 +08:00
}
2023-05-18 17:15:59 +08:00
StartPortainer( ) {
echo "Start Portainer ..."
2023-06-03 10:18:41 +08:00
cd /data/apps/w9services/w9portainer && sudo docker compose up -d
2023-05-18 17:15:59 +08:00
docker pull backplane/pwgen
new_password = $( docker run --name pwgen backplane/pwgen 15) !
docker rm -f pwgen
2023-06-30 16:02:39 +08:00
portainer_ip = $( docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' websoft9-portainer)
2023-08-03 16:06:02 +08:00
echo "Portainer init password:" $new_password >> /usr/password.txt
2023-06-30 16:02:39 +08:00
curl -X POST -H "Content-Type: application/json" -d '{"username":"admin", "Password":"' $new_password '"}' http://$portainer_ip :9000/api/users/admin/init
2023-07-20 09:20:34 +08:00
curl " http:// $appmanage_ip :5000/AppUpdateUser?user_name=admin&password= $new_password "
2023-06-30 16:02:39 +08:00
2023-05-18 17:15:59 +08:00
}
2023-04-12 17:07:36 +08:00
InstallNginx( ) {
echo "Install nginxproxymanager ..."
2023-06-03 10:18:41 +08:00
cd /data/apps/w9services/w9nginxproxymanager && sudo docker compose up -d
2023-07-21 17:01:42 +08:00
sleep 30
2023-05-18 17:15:59 +08:00
echo "edit nginxproxymanager password..."
2023-06-30 16:02:39 +08:00
nginx_ip = $( docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' websoft9-nginxproxymanager)
2023-07-19 12:12:30 +08:00
login_data = $( curl -X POST -H "Content-Type: application/json" -d '{"identity":"admin@example.com","scope":"user", "secret":"changeme"}' http://$nginx_ip :81/api/tokens)
2023-06-28 10:14:15 +08:00
#token=$(echo $login_data | grep -Po '(?<="token":")[^"]*')
token = $( echo $login_data | jq -r '.token' )
2023-07-21 17:01:42 +08:00
while [ -z " $token " ] ; do
sleep 5
login_data = $( curl -X POST -H "Content-Type: application/json" -d '{"identity":"admin@example.com","scope":"user", "secret":"changeme"}' http://$nginx_ip :81/api/tokens)
token = $( echo $login_data | jq -r '.token' )
done
2023-07-19 12:12:30 +08:00
echo "Nginx token:" $token
2023-05-18 17:15:59 +08:00
new_password = $( docker run --name pwgen backplane/pwgen 15) !
docker rm -f pwgen
2023-08-03 16:06:02 +08:00
echo "Nginx init password:" $new_password >> /usr/password.txt
2023-06-30 16:02:39 +08:00
curl -X PUT -H "Content-Type: application/json" -H " Authorization: Bearer $token " -d '{"email": "help@websoft9.com", "nickname": "admin", "is_disabled": false, "roles": ["admin"]}' http://$nginx_ip :81/api/users/1
curl -X PUT -H "Content-Type: application/json" -H " Authorization: Bearer $token " -d '{"type":"password","current":"changeme","secret":"' $new_password '"}' http://$nginx_ip :81/api/users/1/auth
2023-05-18 17:15:59 +08:00
sleep 3
2023-07-20 09:20:34 +08:00
curl " http:// $appmanage_ip :5000/AppUpdateUser?user_name=help@websoft9.com&password= $new_password "
2023-05-18 17:15:59 +08:00
echo "edit password success ..."
while [ ! -d "/var/lib/docker/volumes/w9nginxproxymanager_nginx_data/_data/nginx/proxy_host" ] ; do
2023-04-12 17:07:36 +08:00
sleep 1
done
2023-06-03 10:18:41 +08:00
cp /data/apps/w9services/w9nginxproxymanager/initproxy.conf /var/lib/docker/volumes/w9nginxproxymanager_nginx_data/_data/nginx/proxy_host
2023-07-19 11:51:18 +08:00
echo $public_ip
2023-05-18 17:15:59 +08:00
sudo sed -i " s/domain.com/ $public_ip /g " /var/lib/docker/volumes/w9nginxproxymanager_nginx_data/_data/nginx/proxy_host/initproxy.conf
2023-04-12 17:07:36 +08:00
sudo docker restart websoft9-nginxproxymanager
2023-08-03 16:06:02 +08:00
sudo docker cp websoft9-appmanage:/usr/src/app/database.sqlite /usr
2023-04-12 17:07:36 +08:00
}
2023-05-31 11:32:37 +08:00
EditMenu( ) {
echo "Start to Edit Cockpit Menu ..."
2023-07-21 15:19:59 +08:00
2023-08-01 10:02:23 +08:00
# uninstall plugins
rm -rf /usr/share/cockpit/apps /usr/share/cockpit/selinux /usr/share/cockpit/kdump /usr/share/cockpit/sosreport /usr/share/cockpit/packagekit
cp -r /data/apps/websoft9/cockpit/menu_override/* /etc/cockpit
2023-07-21 09:17:40 +08:00
2023-07-29 11:37:51 +08:00
echo "---------------------------------- Install success! When installation completed, you can access it by: http://Internet IP:9000 and using Linux user for login to install a app by websoft9's appstore. -------------------------------------------------------"
2023-05-31 11:32:37 +08:00
}
2023-04-12 17:07:36 +08:00
CheckEnvironment
InstallTools
InstallDocker
InstallCockpit
2023-07-21 15:19:59 +08:00
InstallPlugins
2023-04-12 17:07:36 +08:00
StartAppMng
2023-05-18 17:15:59 +08:00
StartPortainer
2023-04-12 17:07:36 +08:00
InstallNginx
2023-05-31 11:32:37 +08:00
EditMenu