forked from dbca-wa/mooringlicensing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup.sh
executable file
·29 lines (26 loc) · 842 Bytes
/
startup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
eval $(grep -v '^#' /container-config/.cronenv | xargs -d "\n" -I {} echo export \"{}\" )
env
whoami
# how to create a new password.
# echo test1test1 | openssl passwd -1 -stdin
if [ -z "$SUDO_OIM_ENCRYPTED_PASSWORD" ]; then
echo "SUDO_OIM_ENCRYPTED_PASSWORD Ignored":
else
echo "SUDO_OIM_ENCRYPTED_PASSWORD Preparing";
SUDO_OIM_ENCRYPTED_PASSWORD_SIZE="$(echo $SUDO_OIM_ENCRYPTED_PASSWORD | wc -m)"
if [ "$SUDO_OIM_ENCRYPTED_PASSWORD_SIZE" -gt "10" ]; then
usermod -p "$SUDO_OIM_ENCRYPTED_PASSWORD" oim
echo "SUDO_OIM_ENCRYPTED_PASSWORD Updated";
fi
fi
if [ $ENABLE_CRON == "True" ];
then
echo "Starting Cron"
service cron start &
status=$?
if [ $status -ne 0 ]; then
echo "Failed to start cron: $status"
exit $status
fi
fi