mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 01:34:22 +00:00
feat(docker-compose.sh): add --install statement
This commit is contained in:
@@ -68,6 +68,23 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- network-container
|
- network-container
|
||||||
|
|
||||||
|
# synapse:
|
||||||
|
# image: matrixdotorg/synapse:latest
|
||||||
|
# container_name: synapse
|
||||||
|
# restart: unless-stopped
|
||||||
|
# networks:
|
||||||
|
# - network-container
|
||||||
|
# volumes:
|
||||||
|
# - ./data:/data
|
||||||
|
# environment:
|
||||||
|
# - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
|
||||||
|
# - VIRTUAL_HOST=notify.guezoloic.com
|
||||||
|
# - LETSENCRYPT_HOST=notify.guezoloic.com
|
||||||
|
# - LETSENCRYPT_EMAIL=${EMAIL}
|
||||||
|
# - VIRTUAL_PORT=8008
|
||||||
|
# expose:
|
||||||
|
# - "8008"
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
network-container:
|
network-container:
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
curl
|
curl
|
||||||
aws
|
aws
|
||||||
|
docker
|
||||||
@@ -17,7 +17,7 @@ if [[ "--install" == $INSTALLED ]]; then
|
|||||||
create_env_variable "AWS" "$AWS_client"
|
create_env_variable "AWS" "$AWS_client"
|
||||||
|
|
||||||
read -p "Enter endpoint server (leave empty to not define it): " ENDPOINT_server
|
read -p "Enter endpoint server (leave empty to not define it): " ENDPOINT_server
|
||||||
[[ ! -n $ENDPOINT_server ]] && create_env_variable "ENDPOINT" "$ENDPOINT_server"
|
[[ -n $ENDPOINT_server ]] && create_env_variable "ENDPOINT" "$ENDPOINT_server"
|
||||||
|
|
||||||
info_print "AWS configuration."
|
info_print "AWS configuration."
|
||||||
aws configure
|
aws configure
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ source /usr/local/bin/libs/notifications.sh
|
|||||||
|
|
||||||
case "$PAM_TYPE" in
|
case "$PAM_TYPE" in
|
||||||
open_session)
|
open_session)
|
||||||
PAYLOAD=" { \"text\": \"$PAM_USER logged in (remote host: $PAM_RHOST) at $(date).\" }"
|
PAYLOAD="$PAM_USER logged in (remote host: $PAM_RHOST) at $(date)."
|
||||||
;;
|
;;
|
||||||
close_session)
|
close_session)
|
||||||
PAYLOAD=" { \"text\": \"$PAM_USER logged out (remote host: $PAM_RHOST) at $(date).\" }"
|
PAYLOAD="$PAM_USER logged out (remote host: $PAM_RHOST) at $(date)."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
INSTALLED=$1
|
INSTALLED=$1
|
||||||
if [[ "--install" == $INSTALLED ]]; then exit 0; fi
|
if [[ "--install" == $INSTALLED ]]; then
|
||||||
|
info_print "\n\
|
||||||
|
==================================================\n\
|
||||||
|
wireguard Installation\n\
|
||||||
|
--------------------------------------------------"
|
||||||
|
source /usr/local/bin/libs/common.sh
|
||||||
|
|
||||||
|
if [[ -f "$ETC_DIR/docker-compose.yml" ]]; then
|
||||||
|
docker compose up -d -f $ETC_DIR/docker-compose.yml && \
|
||||||
|
info_print "$ETC_DIR/docker-compose.yml is running." 2;
|
||||||
|
|
||||||
|
else info_print "no docker-compose.yml found at $ETC_DIR" 6;
|
||||||
|
fi
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user