#!/bin/sh WEBROOT=/data/www PHP=${PHP:-none} USERNAME=${USERNAME:-theuser} PUID=${PUID:-1000} GROUPNAME=${GROUPNAME:-thegroup} PGID=${PGID:-1000} RANDOMPWD=$(tr -dc A-Za-z0-9 /etc/nginx/http.d/default.conf # start php case "${PHP}" in "php84") /usr/sbin/php-fpm84 -D ;; "php83") /usr/sbin/php-fpm83 -D ;; "php82") /usr/sbin/php-fpm82 -D ;; *) ;; esac # start ssh for keytype in ecdsa rsa ed25519 ; do if [ ! -r "/ssh/ssh_host_${keytype}_key" ] ; then /usr/bin/ssh-keygen -t "${keytype}" -f "/ssh/ssh_host_${keytype}_key" -N "" fi chmod 0600 "/ssh/ssh_host_${keytype}_key" chmod 0644 "/ssh/ssh_host_${keytype}_key.pub" done chmod 0700 "${WEBROOT}/.ssh" /usr/sbin/sshd -e # start nginx nginx