mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-12-24 03:10:13 +01:00
Safely create folders
This commit is contained in:
parent
a33ad43a50
commit
59220ac477
@ -20,7 +20,7 @@ DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq zip u
|
||||
wget -O /opt/wkhtmltox_0.12.6-1.buster_amd64.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb
|
||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq /opt/wkhtmltox_0.12.6-1.buster_amd64.deb
|
||||
|
||||
mkdir /etc/nginx/ssl
|
||||
mkdir -p /etc/nginx/ssl
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout /etc/nginx/ssl/open3a.key -out /etc/nginx/ssl/open3a.crt -subj "/CN=$LXC_HOSTNAME.$LXC_DOMAIN" -addext "subjectAltName=DNS:$LXC_HOSTNAME.$LXC_DOMAIN"
|
||||
|
||||
PHP_VERSION=$(php -v | head -1 | cut -d ' ' -f2)
|
||||
|
@ -21,7 +21,7 @@ apt update
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq zip unzip sudo nginx-full mariadb-server mariadb-client php8.1 php8.1-intl php8.1-cli php8.1-fpm php8.1-mysql php8.1-xml php8.1-mbstring php8.1-gd php8.1-tokenizer php8.1-zip php8.1-opcache php8.1-curl
|
||||
|
||||
mkdir /etc/nginx/ssl
|
||||
mkdir -p /etc/nginx/ssl
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout /etc/nginx/ssl/kimai.key -out /etc/nginx/ssl/kimai.crt -subj "/CN=$LXC_HOSTNAME.$LXC_DOMAIN" -addext "subjectAltName=DNS:$LXC_HOSTNAME.$LXC_DOMAIN"
|
||||
|
||||
PHP_VERSION=$(php -v | head -1 | cut -d ' ' -f2)
|
||||
|
@ -27,7 +27,7 @@ systemctl enable matrix-synapse
|
||||
|
||||
ss -tulpen
|
||||
|
||||
mkdir /etc/nginx/ssl
|
||||
mkdir -p /etc/nginx/ssl
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout /etc/nginx/ssl/matrix.key -out /etc/nginx/ssl/matrix.crt -subj "/CN=$MATRIX_FQDN" -addext "subjectAltName=DNS:$MATRIX_FQDN"
|
||||
|
||||
cat > /etc/nginx/sites-available/$MATRIX_FQDN <<EOF
|
||||
|
@ -45,7 +45,7 @@ ONLYOFFICE_DB_USER=$ONLYOFFICE_DB_USER
|
||||
ONLYOFFICE_DB_PASS=$ONLYOFFICE_DB_PASS
|
||||
EOF
|
||||
|
||||
mkdir /etc/nginx/ssl
|
||||
mkdir -p /etc/nginx/ssl
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout /etc/nginx/ssl/onlyoffice.key -out /etc/nginx/ssl/onlyoffice.crt -subj "/CN=$LXC_HOSTNAME.$LXC_DOMAIN" -addext "subjectAltName=DNS:$LXC_HOSTNAME.$LXC_DOMAIN"
|
||||
|
||||
rm /etc/nginx/conf.d/ds.conf
|
||||
|
@ -18,7 +18,7 @@ apt update
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq unzip sudo nginx-full mariadb-server mariadb-client php php-cli php-fpm php-mysql php-xml php-mbstring php-gd
|
||||
|
||||
mkdir /etc/nginx/ssl
|
||||
mkdir -p /etc/nginx/ssl
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout /etc/nginx/ssl/open3a.key -out /etc/nginx/ssl/open3a.crt -subj "/CN=$LXC_HOSTNAME.$LXC_DOMAIN" -addext "subjectAltName=DNS:$LXC_HOSTNAME.$LXC_DOMAIN"
|
||||
|
||||
cat << EOF > /etc/nginx/sites-available/default
|
||||
|
@ -11,7 +11,7 @@ source /root/constants-service.conf
|
||||
|
||||
mkdir -p /$LXC_SHAREFS_MOUNTPOINT/tmp
|
||||
mkdir -p /$LXC_SHAREFS_MOUNTPOINT/$URBACKUP_DATA
|
||||
mkdir /etc/urbackup
|
||||
mkdir -p /etc/urbackup
|
||||
echo "/$LXC_SHAREFS_MOUNTPOINT/$URBACKUP_DATA" > /etc/urbackup/backupfolder
|
||||
|
||||
echo "deb http://download.opensuse.org/repositories/home:/uroni/$REPO_CODENAME/ /" | tee /etc/apt/sources.list.d/urbackup.list
|
||||
@ -20,7 +20,7 @@ curl -fsSL https://download.opensuse.org/repositories/home:uroni/$REPO_CODENAME/
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y --no-install-recommends -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" urbackup-server nginx
|
||||
|
||||
mkdir /etc/nginx/ssl
|
||||
mkdir -p /etc/nginx/ssl
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout /etc/nginx/ssl/urbackup.key -out /etc/nginx/ssl/urbackup.crt -subj "/CN=$LXC_HOSTNAME.$LXC_DOMAIN" -addext "subjectAltName=DNS:$LXC_HOSTNAME.$LXC_DOMAIN"
|
||||
|
||||
ln -s /usr/share/urbackup/www /var/www/urbackup
|
||||
|
@ -18,7 +18,7 @@ systemctl enable --now postgresql
|
||||
wget https://raw.githubusercontent.com/jjlin/docker-image-extract/main/docker-image-extract
|
||||
chmod +x docker-image-extract
|
||||
./docker-image-extract vaultwarden/server:alpine
|
||||
mkdir /opt/vaultwarden
|
||||
mkdir -p /opt/vaultwarden
|
||||
mkdir -p /var/lib/vaultwarden/data
|
||||
useradd vaultwarden
|
||||
chown -R vaultwarden:vaultwarden /var/lib/vaultwarden
|
||||
|
@ -98,7 +98,7 @@ systemctl restart winbind nmbd
|
||||
wbinfo -u
|
||||
wbinfo -g
|
||||
|
||||
mkdir /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||
mkdir -p /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||
|
||||
# originally 'domain users' was set, added variable for domain admins group, samba wiki recommends separate group e.g. 'unix admins'
|
||||
chown "${ZMB_ADMIN_USER@L}" /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||
|
Loading…
Reference in New Issue
Block a user