Skip to content
Snippets Groups Projects
Commit afc8f55b authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

v1.19 detect dockerd-rootless (hides menu item to set permissions)

parent f392bc19
No related branches found
No related tags found
1 merge request!19v1.19 detect dockerd-rootless (hides menu item to set permissions)
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
# 2024-07-26 v1.16 <axel.hahn@unibe.ch> hide unnecessary menu items (WIP) # 2024-07-26 v1.16 <axel.hahn@unibe.ch> hide unnecessary menu items (WIP)
# 2024-07-29 v1.17 <www.axel-hahn.de> hide unnecessary menu items; reorder functions # 2024-07-29 v1.17 <www.axel-hahn.de> hide unnecessary menu items; reorder functions
# 2024-08-14 v1.18 <www.axel-hahn.de> update container view # 2024-08-14 v1.18 <www.axel-hahn.de> update container view
# 2024-09-20 v1.19 <www.axel-hahn.de> detect dockerd-rootless (hides menu item to set permissions)
# ====================================================================== # ======================================================================
cd "$( dirname "$0" )" || exit 1 cd "$( dirname "$0" )" || exit 1
...@@ -36,7 +37,7 @@ _self=$( basename "$0" ) ...@@ -36,7 +37,7 @@ _self=$( basename "$0" )
# shellcheck source=/dev/null # shellcheck source=/dev/null
. "${_self}.cfg" || exit 1 . "${_self}.cfg" || exit 1
_version="1.18" _version="1.19"
# git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git # git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git
selfgitrepo="docker-php-starterkit.git" selfgitrepo="docker-php-starterkit.git"
...@@ -62,6 +63,9 @@ DC_CONFIG_CHANGED=0 ...@@ -62,6 +63,9 @@ DC_CONFIG_CHANGED=0
DC_WEB_URL="" DC_WEB_URL=""
isDockerRootless=0
ps -ef | grep dockerd-rootless | grep -q $USER && isDockerRootless=1
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# FUNCTIONS # FUNCTIONS
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
...@@ -136,7 +140,10 @@ function showMenu(){ ...@@ -136,7 +140,10 @@ function showMenu(){
echo "${_spacer}$( _key g ) - remove git data of starterkit" echo "${_spacer}$( _key g ) - remove git data of starterkit"
echo echo
fi fi
echo "${_spacer}$( _key i ) - init application: set permissions"
if [ $isDockerRootless -eq 1 ] || [ $_bAll -eq 1 ]; then
echo "${_spacer}$( _key i ) - init application: set permissions"
fi
if [ $DC_CONFIG_CHANGED -eq 1 ] || [ $_bAll -eq 1 ]; then if [ $DC_CONFIG_CHANGED -eq 1 ] || [ $_bAll -eq 1 ]; then
echo "${_spacer}$( _key t ) - generate files from templates" echo "${_spacer}$( _key t ) - generate files from templates"
...@@ -488,6 +495,7 @@ function _showContainers(){ ...@@ -488,6 +495,7 @@ function _showContainers(){
function _wait(){ function _wait(){
local _wait=15 local _wait=15
echo -n "... press RETURN ... or wait $_wait sec > "; read -r -t $_wait echo -n "... press RETURN ... or wait $_wait sec > "; read -r -t $_wait
echo
} }
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
...@@ -557,7 +565,6 @@ while true; do ...@@ -557,7 +565,6 @@ while true; do
fi fi
echo echo
_wait
;; ;;
s) s)
h2 "Stopping..." h2 "Stopping..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment