Commit c58a08aa authored by Florian's avatar Florian
Browse files

better file saving

parent e9ac62bc
......@@ -18,7 +18,7 @@ echo "Mise à jour du système"
sudo apt update -y
sudo apt dist-upgrade -y
echo "Installation des paquets pour avoir un serveur opérationnel"
sudo apt wget install mariadb-server php-fpm php-mysql php-common php-cli php-gd php-curl php-intl php-mbstring php-bcmath php-imap php-xml php-zip nginx nodejs avahi-daemon redis-server git -y
sudo apt install mariadb-server php-fpm php-mysql php-common php-cli php-gd php-curl php-intl php-mbstring php-bcmath php-imap php-xml php-zip nginx nodejs avahi-daemon redis-server git wget -y
echo "Sécurisation du serveur MYSQL"
sudo mysqladmin -u root password "$DATABASE_PASS"
......@@ -32,8 +32,8 @@ echo "Installation d'Etherpad"
sudo mkdir -p $COOPBOX_PATH
sudo chown -R $COOPBOX_USER:$COOPBOX_GROUP $COOPBOX_PATH
cd $COOPBOX_PATH
sudo -u $COOPBOX_USER git clone --branch master https://github.com/ether/etherpad-lite.git etherpad
sudo -u $COOPBOX_USER cd etherpad
sudo -u $COOPBOX_USER git clone --branch master https://github.com/ether/etherpad-lite.git $COOPBOX_PATH/etherpad
sudo -u $COOPBOX_USER cd $COOPBOX_PATH/etherpad
sudo -u $COOPBOX_USER cp settings.json.template settings.json
#ligne 64 title = titre du pad
#ligne 83 "skinName": "colibris",
......@@ -55,7 +55,7 @@ mysql -u root -p"$DATABASE_PASS" -e "CREATE DATABASE `$ETHERPAD_DATABASE`;"
mysql -u root -p"$DATABASE_PASS" -e "GRANT CREATE,ALTER,SELECT,INSERT,UPDATE,DELETE on `$ETHERPAD_DATABASE`.* to '$ETHERPAD_DBUSER'@'localhost' identified by '$ETHERPAD_DBPASS';"
mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES"
sudo echo <<<EOF
sudo cat > /etc/systemd/system/etherpad.service << EOF
[Unit]
Description=Etherpad (real-time collaborative document editing)
After=syslog.target network.target
......@@ -70,7 +70,7 @@ ExecStart=$COOPBOX_PATH/etherpad/bin/run.sh
[Install]
WantedBy=multi-user.target
EOF > /etc/systemd/system/etherpad.service
EOF >
sudo systemctl enable etherpad
sudo systemctl start etherpad
......@@ -81,14 +81,14 @@ mysql -u root -p"$DATABASE_PASS" -e "CREATE DATABASE `$YESWIKI_DATABASE`;"
mysql -u root -p"$DATABASE_PASS" -e "GRANT CREATE,ALTER,SELECT,INSERT,UPDATE,DELETE on `$YESWIKI_DATABASE`.* to '$YESWIKI_DBUSER'@'localhost' identified by '$YESWIKI_DBPASS';"
mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES"
cd $COOPBOX_PATH
sudo -u $COOPBOX_USER git clone --branch cercopitheque https://github.com/YesWiki/yeswiki.git yeswiki
sudo -u $COOPBOX_USER cd yeswiki
sudo -u $COOPBOX_USER git clone --branch cercopitheque https://github.com/YesWiki/yeswiki.git $COOPBOX_PATH/yeswiki
sudo -u $COOPBOX_USER cd $COOPBOX_PATH/yeswiki
# TODO install composer, setup autoupdate, extension ferme
# NGINX
sudo rm /etc/nginx/sites-enabled/default
sudo echo <<<EOF
sudo cat > /etc/nginx/sites-available/yeswiki << EOF
server {
listen 80 default_server;
listen [::]:80 default_server;
......@@ -107,7 +107,7 @@ server {
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
}
EOF > /etc/nginx/sites-available/yeswiki
EOF
sudo ln -s /etc/nginx/sites-available/yeswiki /etc/nginx/sites-enabled/yeswiki
sudo systemctl restart nginx
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment