1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00

Update install

This commit is contained in:
Maniack Crudelis 2016-06-19 16:10:35 +02:00 committed by GitHub
parent 6dbd70a40a
commit 2cb2d58af2

View file

@ -1,10 +1,16 @@
#!/bin/bash #!/bin/bash
# Retrieve arguments # Exit on command errors and treat unset variables as an error
domain=$1 set -eu
path=$2
sudo yunohost app checkurl $domain$path -a transmission # Get app instance name
app=$YNH_APP_INSTANCE_NAME
# Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN
path=$YNH_APP_ARG_PATH
sudo yunohost app checkurl $domain$path -a $app
if [[ ! $? -eq 0 ]]; then if [[ ! $? -eq 0 ]]; then
exit 1 exit 1
fi fi
@ -50,16 +56,15 @@ sudo sed -i "s@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div>@<
# 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/$app.conf
sudo service nginx reload sudo service nginx reload
echo $?
# Add yunohost.multimedia directory # Add yunohost.multimedia directory
wget https://github.com/maniackcrudelis/yunohost.multimedia/archive/master.zip wget https://github.com/maniackcrudelis/yunohost.multimedia/archive/master.zip
unzip master.zip unzip master.zip
sudo ./yunohost.multimedia-master/script/ynh_media_build.sh sudo ./yunohost.multimedia-master/script/ynh_media_build.sh
# Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move) # Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move)
sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh "/home/yunohost.transmission" "Torrents" sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission" --dest="share/Torrents"
# And share completed directory # And share completed directory
sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh "/home/yunohost.transmission/completed" "Torrents" sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission/completed" --dest="share/Torrents"