Skip to content

Commit

Permalink
add install check
Browse files Browse the repository at this point in the history
  • Loading branch information
haobibo committed Jun 27, 2024
1 parent b58d4ea commit ffa3d01
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
6 changes: 4 additions & 2 deletions docker_app_clash/work/clash/script-setup-clash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ setup_clash() {
&& opt='-X \"github.com/metacubex/mihomo/constant.Version=${VER_CLASH}\" -X \"github.com/metacubex/mihomo/constant.BuildTime=${BUILDTIME}\" -w -s -buildid=1' \
&& opt=$(eval echo $opt) \
&& cmd="go build -tags with_gvisor -trimpath -o /opt/clash/clash -ldflags '${opt}'" \
&& eval $cmd && /opt/clash/clash -v \
&& echo "@ Version of Clash $(clash -v)"
&& eval $cmd


type /opt/clash/clash && echo "@ Version of Clash $(clash -v)" || return -1;

mkdir -pv /opt/clash/config \
&& wget -O /opt/clash/config/geoip.metadb https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.metadb \
Expand Down
11 changes: 7 additions & 4 deletions docker_dev_box/work/script-devbox-jupyter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ source /opt/utils/script-utils.sh


setup_jupyter_base() {
pip install -Uq --pre jupyterlab notebook ipywidgets jupyter-server-proxy \
&& echo "@ Version of Jupyter Server: $(jupyter server --version)" \
&& echo "@ Version of Jupyter Lab: $(jupyter lab --version)" \
&& echo "@ Version of Jupyter Notebook: $(jupyter notebook --version)"
pip install -Uq --pre jupyterlab notebook ipywidgets jupyter-server-proxy

type jupyter || return -1 ;

echo "@ Version of Jupyter Server: $(jupyter server --version)"
echo "@ Version of Jupyter Lab: $(jupyter lab --version)"
echo "@ Version of Jupyter Notebook: $(jupyter notebook --version)"

jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
}
Expand Down
5 changes: 3 additions & 2 deletions docker_keycloak/work/script-setup-keycloak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ setup_keycloak() {
&& mv /opt/keycloak-* /opt/keycloak && mkdir -pv /opt/keycloak/data \
&& chmod -R g+rwX /opt/keycloak \
&& echo 'export PATH=${PATH}:/opt/keycloak/bin' >> /etc/profile.d/path-keycloak.sh \
&& export PATH=${PATH}:/opt/keycloak/bin \
&& echo "@ Version of Keycloadk $(kc.sh --version)"
&& export PATH=${PATH}:/opt/keycloak/bin ;

type kc.sh && echo "@ Version of Keycloadk $(kc.sh --version)" || return -1 ;
}
5 changes: 3 additions & 2 deletions docker_openresty/work/script-setup-acme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ setup_acme() {
--accountconf ${HOME_DIR}/acme/account.conf \
--useragent "client acme.sh in docker" \
&& ln -sf /opt/acme.sh/acme.sh /usr/bin/ \
&& rm -rf /tmp/acme.sh && cd ${ACME_HOME} \
&& echo "@ Version info of acme.sh: $(acme.sh -v)"
&& rm -rf /tmp/acme.sh && cd ${ACME_HOME} ;

type acme.sh && echo "@ Version info of acme.sh: $(acme.sh -v)" || return -1 ;
}
7 changes: 4 additions & 3 deletions docker_openresty/work/script-setup-openresty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ setup_openresty() {
&& mkdir -pv /usr/local/openresty/ /var/log/nginx /var/cache/nginx /tmp/nginx \
&& ln -sf ${NGINX_HOME}/bin/nginx /usr/bin/ \
&& ln -sf /opt/nginx /usr/local/openresty/ \
&& ln -sf /opt/nginx /etc/ \
&& nginx -t \
&& echo "@ Version info of Nginx: $(nginx -version)"
&& ln -sf /opt/nginx /etc/ ;

type nginx && echo "@ Version info of Nginx: $(nginx -version)" || return -1 ;
nginx -t ;
}

0 comments on commit ffa3d01

Please sign in to comment.