1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ffsync_ynh.git synced 2024-09-03 18:26:38 +02:00

[fix] do not use $final_path before it is defined

This commit is contained in:
Julien Malik 2015-02-22 10:23:06 +01:00
parent 7df9f017d7
commit 1fa30a87ff

View file

@ -33,9 +33,6 @@ then
sudo swapon $tmp_swap_file sudo swapon $tmp_swap_file
fi fi
# Create ffsync user
sudo useradd ffsync -d $final_path
# Copy files to the right place # Copy files to the right place
final_path=/opt/yunohost/ffsync final_path=/opt/yunohost/ffsync
sudo mkdir -p $final_path sudo mkdir -p $final_path
@ -43,10 +40,11 @@ sudo cp -a ../sources/* $final_path
sudo cp ../conf/ffsync /etc/init.d/ sudo cp ../conf/ffsync /etc/init.d/
sudo cp ../conf/ffsync.logrotate /etc/logrotate.d/ffsync sudo cp ../conf/ffsync.logrotate /etc/logrotate.d/ffsync
sudo touch /var/log/ffsync.log sudo touch /var/log/ffsync.log
sudo chown ffsync /var/log/ffsync.log
# Set permissions to ffsync directory # Set permissions to ffsync directory
sudo useradd ffsync -d $final_path
sudo chown ffsync:ffsync -R $final_path sudo chown ffsync:ffsync -R $final_path
sudo chown ffsync /var/log/ffsync.log
# Modify Nginx configuration file and copy it to Nginx conf directory # Modify Nginx configuration file and copy it to Nginx conf directory
secret=$(head -c 20 /dev/urandom | sha1sum | cut -d " " -f1) secret=$(head -c 20 /dev/urandom | sha1sum | cut -d " " -f1)