mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 07:30:24 +00:00
install and packagekit
This commit is contained in:
parent
9d04bc1ea2
commit
43b146db91
2 changed files with 16 additions and 29 deletions
|
@ -460,27 +460,28 @@ install_systemd() {
|
|||
|
||||
|
||||
#--------------- main-----------------------------------------
|
||||
check_ports $http_port $https_port $port | tee -a $path/install.log
|
||||
install_tools | tee -a $path/install.log
|
||||
download_source | tee -a $path/install.log
|
||||
log_path="$path/install.log"
|
||||
check_ports $http_port $https_port $port | tee -a $log_path
|
||||
install_tools | tee -a $log_path
|
||||
download_source | tee -a $log_path
|
||||
|
||||
bash $install_path/install/install_docker.sh | tee -a $path/install.log
|
||||
bash $install_path/install/install_docker.sh | tee -a $log_path
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "install_docker failed with error $?. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
install_backends | tee -a $path/install.log
|
||||
install_backends | tee -a $log_path
|
||||
|
||||
install_systemd | tee -a $path/install.log
|
||||
install_systemd | tee -a $log_path
|
||||
|
||||
bash $install_path/install/install_cockpit.sh | tee -a $path/install.log
|
||||
bash $install_path/install/install_cockpit.sh | tee -a $log_path
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "install_cockpit failed with error $?. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bash $install_path/install/install_plugins.sh | tee -a $path/install.log
|
||||
bash $install_path/install/install_plugins.sh | tee -a $log_path
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "install_plugins failed with error $?. Exiting."
|
||||
exit 1
|
||||
|
|
|
@ -130,32 +130,18 @@ Print_Version(){
|
|||
sudo /usr/libexec/cockpit-ws --version 2>/dev/null || sudo /usr/lib/cockpit-ws --version 2>/dev/null || /usr/lib/cockpit/cockpit-ws --version 2>/dev/null
|
||||
}
|
||||
|
||||
Install_PackageKit(){
|
||||
echo "$echo_prefix_cockpit Install PackageKit(pkcon) and Cockpit repository"
|
||||
Disable_PackageKit(){
|
||||
|
||||
echo "$echo_prefix_cockpit disable PackageKit(pkcon)"
|
||||
|
||||
if command -v pkcon &> /dev/null; then
|
||||
echo "pkcon is at your system ..."
|
||||
|
||||
elif command -v yum &> /dev/null; then
|
||||
if [ "$(cat /etc/redhat-release)" = "Redhat7" ]; then
|
||||
sudo subscription-manager repos --enable rhel-7-server-extras-rpms
|
||||
fi
|
||||
sudo yum install PackageKit -y
|
||||
|
||||
elif command -v dnf &> /dev/null; then
|
||||
sudo dnf install PackageKit -y
|
||||
|
||||
elif command -v apt &> /dev/null; then
|
||||
sudo apt update
|
||||
sudo apt install packagekit -y
|
||||
|
||||
else
|
||||
echo "PackageKit not found, Cockpit cannot be installed"
|
||||
exit 1
|
||||
sudo systemctl stop packagekit
|
||||
sudo systemctl disable packagekit
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Set_Repository() {
|
||||
echo "$echo_prefix_cockpit Set Cockpit deb repository"
|
||||
if command -v apt &> /dev/null; then
|
||||
|
@ -398,7 +384,7 @@ Test_Cockpit
|
|||
|
||||
# release package memory
|
||||
if systemctl cat packagekit > /dev/null 2>&1; then
|
||||
sudo systemctl restart packagekit
|
||||
Disable_PackageKit
|
||||
else
|
||||
echo "no packagekit"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue