mirror of
https://github.com/YunoHost-Apps/galette_ynh.git
synced 2024-09-03 18:36:28 +02:00
Fixing sudo missing in install script
This commit is contained in:
parent
f573b90ca2
commit
36fa77f992
1 changed files with 10 additions and 10 deletions
|
@ -46,16 +46,16 @@ final_path=/var/www/$app
|
|||
# Get and move sources
|
||||
|
||||
tar xjvf ../sources/galette-$version.tar.bz2
|
||||
mv galette-$version/galette $final_path
|
||||
sudo mv galette-$version/galette $final_path
|
||||
rm -r galette-$version
|
||||
|
||||
# Set permissions
|
||||
|
||||
chown -R root:www-data $final_path
|
||||
chmod -R o-rwx $final_path
|
||||
sudo chown -R root:www-data $final_path
|
||||
sudo chmod -R o-rwx $final_path
|
||||
for folder in cache config exports logs photos templates_c tempimages
|
||||
do
|
||||
chmod u+rx g+rwx $final_path/data/$folder
|
||||
sudo chmod u+rx g+rwx $final_path/data/$folder
|
||||
done
|
||||
|
||||
####################################################
|
||||
|
@ -72,12 +72,12 @@ db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]'
|
|||
sudo yunohost app initdb $db_user -p $db_pwd
|
||||
sudo yunohost app setting $app mysqlpassword -v $db_pwd
|
||||
|
||||
# Generate random password
|
||||
# Edit config file
|
||||
|
||||
cp ../conf/config.inc.php $final_path/config/
|
||||
sudo sed -i "s/USER_DB_VALUE/$db_user/g" $final_path/config/config.inc.php
|
||||
sudo sed -i "s/PWD_DB_VALUE/$db_pwd/g" $final_path/config/config.inc.php
|
||||
sudo sed -i "s/NAME_DB_VALUE/$db_user/g" $final_path/config/config.inc.php
|
||||
sed -i "s/USER_DB_VALUE/$db_user/g" ../conf/config.inc.php
|
||||
sed -i "s/PWD_DB_VALUE/$db_pwd/g" ../conf/config.inc.php
|
||||
sed -i "s/NAME_DB_VALUE/$db_user/g" ../conf/config.inc.php
|
||||
sudo cp ../conf/config.inc.php $final_path/config/
|
||||
|
||||
####################################################
|
||||
# Nginx configuration #
|
||||
|
|
Loading…
Add table
Reference in a new issue