Skip to content

Commit c1612d5

Browse files
committed
Make it ready for auto-managed deployments
1 parent 0d908c5 commit c1612d5

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/main/java/io/antmedia/console/rest/CommonRestService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,7 @@ public Result authenticateUser(User user)
387387
boolean result = false;
388388
if (tryToAuthenticate)
389389
{
390-
result = getDataStore().doesUserExist(user.getEmail(), user.getPassword()) ||
391-
getDataStore().doesUserExist(user.getEmail(), getMD5Hash(user.getPassword()));
390+
result = getDataStore().doesUserExist(user.getEmail(), getMD5Hash(user.getPassword()));
392391

393392
if (result)
394393
{

src/main/server/enable_ssl.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ domain=""
2626
password=
2727
renew_flag='false'
2828
freedomain=""
29+
restart_service='true' #if this is true, it restarts the service at the end of the script otherwise it does not
2930

3031
helpRequest='false'
3132

32-
while getopts i:d:v:p:e:f:rhc: option
33+
while getopts i:d:v:p:e:f:rshc: option
3334
do
3435
case "${option}" in
3536
f) FULL_CHAIN_FILE=${OPTARG};;
@@ -41,6 +42,7 @@ do
4142
r) renew_flag='true';;
4243
e) email=${OPTARG};;
4344
h) helpRequest='true';;
45+
s) restart_service=${OPTARG};;
4446
esac
4547
done
4648

@@ -505,9 +507,13 @@ ipt_restore
505507
echo ""
506508

507509
if is_docker_container; then
510+
echo "You are running Ant Media Server in a Docker container. Please restart the container to apply the changes."
508511
kill -HUP 1
509-
else
512+
elif [ "$restart_service" == "true" ]; then
513+
echo "Restarting Ant Media Server..."
510514
$SUDO service antmedia restart
515+
else
516+
echo "Ant Media Server is not restarted because script is called just to install the ssl. Please restart it manually to apply the changes."
511517
fi
512518

513519
output

0 commit comments

Comments
 (0)