mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 04:34:23 +00:00
feat(docker-compose.sh): add --install statement
This commit is contained in:
@@ -17,7 +17,7 @@ if [[ "--install" == $INSTALLED ]]; then
|
||||
create_env_variable "AWS" "$AWS_client"
|
||||
|
||||
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."
|
||||
aws configure
|
||||
|
||||
@@ -31,10 +31,10 @@ source /usr/local/bin/libs/notifications.sh
|
||||
|
||||
case "$PAM_TYPE" in
|
||||
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)
|
||||
PAYLOAD=" { \"text\": \"$PAM_USER logged out (remote host: $PAM_RHOST) at $(date).\" }"
|
||||
PAYLOAD="$PAM_USER logged out (remote host: $PAM_RHOST) at $(date)."
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
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