2017-08-18 04:28:56 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-03-27 22:38:11 +02:00
|
|
|
NOUSER=`id -u bitwarden > /dev/null 2>&1; echo $?`
|
|
|
|
LUID=${LOCAL_UID:-999}
|
|
|
|
if [[ $NOUSER == 0 && `id -u bitwarden` != $LUID ]]
|
|
|
|
then
|
|
|
|
usermod -u $LUID bitwarden
|
|
|
|
elif [ $NOUSER == 1 ]
|
|
|
|
then
|
|
|
|
useradd -r -u $LUID -g bitwarden bitwarden
|
|
|
|
fi
|
2018-03-27 20:55:33 +02:00
|
|
|
|
|
|
|
touch /var/log/cron.log
|
|
|
|
chown bitwarden:bitwarden /var/log/cron.log
|
|
|
|
mkdir -p /etc/bitwarden/mssql/backups
|
|
|
|
chown -R bitwarden:bitwarden /etc/bitwarden
|
|
|
|
mkdir -p /var/opt/mssql/data
|
|
|
|
chown -R bitwarden:bitwarden /var/opt/mssql
|
|
|
|
chown bitwarden:bitwarden /backup-db.sh
|
|
|
|
chown bitwarden:bitwarden /backup-db.sql
|
|
|
|
|
2017-08-21 16:58:00 +02:00
|
|
|
env >> /etc/environment
|
|
|
|
cron
|
2018-03-27 03:38:32 +02:00
|
|
|
|
|
|
|
gosu bitwarden:bitwarden /opt/mssql/bin/sqlservr
|