mirror of
https://github.com/YunoHost-Apps/transmission_ynh.git
synced 2024-09-04 01:46:12 +02:00
Bugfixes
This commit is contained in:
parent
c4403a1804
commit
9c72ea73d0
2 changed files with 21 additions and 14 deletions
|
@ -5,16 +5,25 @@ domain=$1
|
||||||
path=$2
|
path=$2
|
||||||
|
|
||||||
sudo yunohost app checkurl $domain$path -a transmission
|
sudo yunohost app checkurl $domain$path -a transmission
|
||||||
if [[ ! $? -eq 0 ]]; then exit 1 fi
|
if [[ ! $? -eq 0 ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove trailing "/" for next commands
|
# Remove trailing "/" for next commands
|
||||||
path=${path%/}
|
path=${path%/}
|
||||||
|
|
||||||
# Check port availability
|
# Check port availability
|
||||||
sudo yunohost app checkport 9091
|
sudo yunohost app checkport 9091
|
||||||
if [[ ! $? -eq 0 ]]; then exit 1 fi
|
if [[ ! $? -eq 0 ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
sudo yunohost app checkport 51413
|
sudo yunohost app checkport 51413
|
||||||
if [[ ! $? -eq 0 ]]; then exit 1 fi
|
if [[ ! $? -eq 0 ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Open port in firewall
|
||||||
|
sudo yunohost firewall allow TCP 51413 > /dev/null 2>&1
|
||||||
|
|
||||||
# Install official debian package
|
# Install official debian package
|
||||||
sudo apt-get install transmission-daemon -y -qq
|
sudo apt-get install transmission-daemon -y -qq
|
||||||
|
@ -25,14 +34,12 @@ sudo chgrp debian-transmission /home/yunohost.transmission/{progress,completed}
|
||||||
sudo chmod 770 -R /home/yunohost.transmission/{progress,completed}
|
sudo chmod 770 -R /home/yunohost.transmission/{progress,completed}
|
||||||
|
|
||||||
# Configure Transmission and reload
|
# Configure Transmission and reload
|
||||||
sed -i "s@/PATHTOCHANGE@$path@g" ../conf/settings.json
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json
|
||||||
sudo cp ../conf/settings.json /etc/transmission-daemon/settings.json
|
sudo cp ../conf/settings.json /etc/transmission-daemon/settings.json
|
||||||
sudo service transmission-daemon reload
|
sudo service transmission-daemon reload
|
||||||
|
|
||||||
# Open port in firewall
|
|
||||||
sudo yunohost firewall allow TCP 51413
|
|
||||||
|
|
||||||
# Configure Nginx and reload
|
# Configure Nginx and reload
|
||||||
sed -i "s@/PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/transmission.conf
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/transmission.conf
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
|
echo $?
|
||||||
|
|
|
@ -7,6 +7,9 @@ path=$(sudo yunohost app setting transmission path)
|
||||||
# Remove trailing "/" for next commands
|
# Remove trailing "/" for next commands
|
||||||
path=${path%/}
|
path=${path%/}
|
||||||
|
|
||||||
|
# Open port in firewall
|
||||||
|
sudo yunohost firewall allow TCP 51413 > /dev/null 2>&1
|
||||||
|
|
||||||
# Upgrade official debian package
|
# Upgrade official debian package
|
||||||
sudo apt-get install transmission-daemon -y -qq
|
sudo apt-get install transmission-daemon -y -qq
|
||||||
|
|
||||||
|
@ -16,14 +19,11 @@ sudo chgrp debian-transmission /home/yunohost.transmission/{progress,completed}
|
||||||
sudo chmod 770 -R /home/yunohost.transmission/{progress,completed}
|
sudo chmod 770 -R /home/yunohost.transmission/{progress,completed}
|
||||||
|
|
||||||
# Configure Transmission and reload
|
# Configure Transmission and reload
|
||||||
sed -i "s@/PATHTOCHANGE@$path@g" ../conf/settings.json
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json
|
||||||
sudo cp ../conf/settings.json /etc/transmission-daemon/settings.json
|
sudo cp ../conf/settings.json /etc/transmission-daemon/settings.json
|
||||||
sudo service transmission-daemon reload
|
sudo service transmission-daemon reload
|
||||||
|
|
||||||
# Open port in firewall
|
|
||||||
sudo yunohost firewall allow TCP 51413 > /dev/null 2>&1
|
|
||||||
|
|
||||||
# Configure Nginx and reload
|
# Configure Nginx and reload
|
||||||
sed -i "s@/PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/transmission.conf
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/transmission.conf
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
|
|
Loading…
Add table
Reference in a new issue