25 lines
1.0 KiB
Bash
Executable File
25 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
useradd --no-create-home --home-dir /srv/www/html/panel --shell /usr/sbin/nologin --system --user-group vpanel
|
|
cp bin/vpanel-verify-access.sh /usr/local/bin/
|
|
chmod 755 /usr/local/bin/vpanel-verify-access.sh
|
|
# set PHP version
|
|
PHP_MAJOR_VERSION=`php -r "echo PHP_MAJOR_VERSION;"`
|
|
PHP_MINOR_VERSION=`php -r "echo PHP_MINOR_VERSION;"`
|
|
phpVersion=$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION
|
|
# create versioned php fpm dir
|
|
mkdir etc/php/$phpVersion
|
|
mv etc/php/fpm etc/php/$phpVersion/
|
|
cp -a etc/* /etc/
|
|
chmod 440 /etc/sudoers.d/vpanel
|
|
a2enconf vpanel
|
|
sed -i "s|;process_control_timeout = 0|process_control_timeout = 1s|g" /etc/php/$phpVersion/fpm/php-fpm.conf
|
|
service php$phpVersion-fpm restart
|
|
service apache2 restart
|
|
cp -a panel /srv/www/html/
|
|
mkdir /srv/www/html/panel/tmp
|
|
git clone https://github.com/bcosca/fatfree-core.git /srv/www/html/panel/f3
|
|
rm -r /srv/www/html/panel/f3/.git
|
|
find /srv/www/html/panel -type d -exec chmod 755 {} +
|
|
find /srv/www/html/panel -type f -exec chmod 644 {} +
|
|
chown -R vpanel:vpanel /srv/www/html/panel
|