Обновить 2-install.sh
This commit is contained in:
parent
125cb0ad57
commit
c375d83e4a
61
2-install.sh
61
2-install.sh
@ -60,7 +60,7 @@ gen_pass() {
|
|||||||
# Функция отображает запрос и ждет ответа
|
# Функция отображает запрос и ждет ответа
|
||||||
function confirm() {
|
function confirm() {
|
||||||
while true; do
|
while true; do
|
||||||
read -p "$1? (y/n) " yn
|
read -p "$1 ? (y/n) " yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* ) return 0;;
|
[Yy]* ) return 0;;
|
||||||
[Nn]* ) return 1;;
|
[Nn]* ) return 1;;
|
||||||
@ -327,37 +327,54 @@ main() {
|
|||||||
apt-get -qq install -y libreoffice-core --no-install-recommends libreoffice-writer default-jre libreoffice-java-common
|
apt-get -qq install -y libreoffice-core --no-install-recommends libreoffice-writer default-jre libreoffice-java-common
|
||||||
apt-get -qq install -y gnupg2 apt-transport-https software-properties-common
|
apt-get -qq install -y gnupg2 apt-transport-https software-properties-common
|
||||||
|
|
||||||
control sudowheel enabled
|
|
||||||
|
|
||||||
# Вызов функций установки
|
|
||||||
install_user
|
|
||||||
install_angie
|
|
||||||
create_site
|
|
||||||
install_postgresql
|
|
||||||
install_fail2ban
|
|
||||||
install_php_fpm
|
|
||||||
#install_freetds
|
|
||||||
|
|
||||||
systemctl enable memcached
|
systemctl enable memcached
|
||||||
systemctl start memcached
|
systemctl start memcached
|
||||||
|
|
||||||
|
control sudowheel enabled
|
||||||
|
|
||||||
|
install_fail2ban
|
||||||
|
|
||||||
|
# Вызов функций установки
|
||||||
|
if confirm "Install user "; then
|
||||||
|
install_user
|
||||||
|
fi
|
||||||
|
|
||||||
|
if confirm "Install Angie "; then
|
||||||
|
install_angie
|
||||||
|
create_site
|
||||||
|
fi
|
||||||
|
|
||||||
|
if confirm "Install PostgreSQL "; then
|
||||||
|
install_postgresql
|
||||||
|
fi
|
||||||
|
|
||||||
|
if confirm "Install PHP "; then
|
||||||
|
install_php_fpm
|
||||||
|
fi
|
||||||
|
|
||||||
|
if confirm "Install FreeTDS "; then
|
||||||
|
install_freetds
|
||||||
|
fi
|
||||||
|
|
||||||
|
if confirm "Install FOTOSVID "; then
|
||||||
mkdir /mnt/FOTOSVID
|
mkdir /mnt/FOTOSVID
|
||||||
echo "[Unit]
|
echo "[Unit]
|
||||||
Description=Mount SMB share
|
Description=Mount SMB share
|
||||||
After=network.target
|
After=network.target
|
||||||
Wants=network.target
|
Wants=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStartPre=sleep 15
|
ExecStartPre=sleep 15
|
||||||
ExecStart=/bin/mount -t cifs //10.77.1.250/FOTOSVID /mnt/FOTOSVID -o username=fotosvid,password=$FOTOSVIDPASS,rw,file_mode=0666,dir_mode=0777
|
ExecStart=/bin/mount -t cifs //10.77.1.250/FOTOSVID /mnt/FOTOSVID -o username=fotosvid,password=$FOTOSVIDPASS,rw,file_mode=0666,dir_mode=0777
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
" > /etc/systemd/system/mnt-fotosvid.service
|
" > /etc/systemd/system/mnt-fotosvid.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable mnt-fotosvid.service
|
systemctl enable mnt-fotosvid.service
|
||||||
systemctl start mnt-fotosvid.service
|
systemctl start mnt-fotosvid.service
|
||||||
|
fi
|
||||||
|
|
||||||
echo "[ * ] Установка завершена!"
|
echo "[ * ] Установка завершена!"
|
||||||
echo "Проверьте службы:"
|
echo "Проверьте службы:"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user