mirror of
https://github.com/torrentpier/autoinstall.git
synced 2025-02-28 15:10:55 +03:00
Fixed the intersection of rights settings, cron tasks and simultaneous execution cron.php (#9)
This commit is contained in:
parent
6b15f23b6e
commit
3942ea6105
@ -249,6 +249,11 @@ EOF
|
||||
# Exporting a database
|
||||
{ sudo cat /var/www/torrentpier/install/sql/mysql.sql | sudo mysql -u "$userSql" -p"$passSql" "$dbSql"; } 2>&1 | sudo tee -a "$logsInst" > /dev/null
|
||||
|
||||
# We set the rights to directories and files
|
||||
sudo chown -R www-data:www-data /var/www/torrentpier 2>&1 | sudo tee -a "$logsInst" > /dev/null
|
||||
sudo find /var/www/torrentpier -type f -exec chmod 644 {} \; 2>&1 | sudo tee -a "$logsInst" > /dev/null
|
||||
sudo find /var/www/torrentpier -type d -exec chmod 755 {} \; 2>&1 | sudo tee -a "$logsInst" > /dev/null
|
||||
|
||||
# Setting the CRON task
|
||||
{ (sudo crontab -l; echo "* * * * * php /var/www/torrentpier/cron.php") | sudo crontab -; } 2>&1 | sudo tee -a "$logsInst" > /dev/null
|
||||
else
|
||||
@ -259,11 +264,6 @@ EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We set the rights to directories and files
|
||||
sudo chown -R www-data:www-data /var/www/torrentpier 2>&1 | sudo tee -a "$logsInst" > /dev/null
|
||||
sudo find /var/www/torrentpier -type f -exec chmod 644 {} \; 2>&1 | sudo tee -a "$logsInst" > /dev/null
|
||||
sudo find /var/www/torrentpier -type d -exec chmod 755 {} \; 2>&1 | sudo tee -a "$logsInst" > /dev/null
|
||||
|
||||
# Setting up nginx
|
||||
if dpkg-query -W -f='${Status}' "nginx" 2>/dev/null | grep -q "install ok installed"; then
|
||||
echo "===================================" 2>&1 | sudo tee -a "$logsInst" > /dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user