Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
52e503c3
Commit
52e503c3
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Use npm install
parent
b7f4c53c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-peertube
+38
-65
38 additions, 65 deletions
src/freedombone-app-peertube
with
38 additions
and
65 deletions
src/freedombone-app-peertube
+
38
−
65
View file @
52e503c3
...
...
@@ -67,6 +67,41 @@ function peertube_tcp_tuning {
fi
}
function
install_peertube_base
{
if
[
!
-d
$PEERTUBE_DIR
/config
]
;
then
mkdir
-p
$PEERTUBE_DIR
/config
fi
if
[
!
-d
$PEERTUBE_DIR
/storage
]
;
then
mkdir
-p
$PEERTUBE_DIR
/storage
fi
if
[
!
-d
$PEERTUBE_DIR
/versions
]
;
then
mkdir
-p
$PEERTUBE_DIR
/versions
fi
cd
${
PEERTUBE_DIR
}
/versions
||
exit
3576835
wget
-q
"
$PEERTUBE_DOWNLOAD
"
-O
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar.xz"
if
[
!
-f
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar.xz"
]
;
then
exit
56874674
fi
unxz
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar.xz"
if
[
!
-f
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar"
]
;
then
echo
$"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar not found"
exit
63843658
fi
tar
-xvf
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar"
rm
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar"
cd
../
||
exit
356385
ln
-s
"versions/
${
PEERTUBE_DOWNLOAD_FILENAME
}
"
./peertube-latest
cd
${
PEERTUBE_DIR
}
/peertube-latest
||
exit
35685
chown
-R
peertube:peertube
$PEERTUBE_DIR
sudo
-H
-u
peertube npm
install
peertube_tcp_tuning
}
function
peertube_setting_registration
{
allow_registrations
=
"
$1
"
...
...
@@ -467,41 +502,8 @@ function upgrade_peertube {
read_config_param PEERTUBE_DOMAIN_NAME
systemctl stop peertube
cd
"
$PEERTUBE_DIR
"
||
exit
7824552627
if
!
npm
install
-g
yarn@1.10.1
;
then
echo
$'Failed to install yarn'
exit
79353234
fi
mkdir
-p
$PEERTUBE_DIR
cd
$PEERTUBE_DIR
||
exit
356835
cd
versions
||
exit
3576835
wget
-q
"
$PEERTUBE_DOWNLOAD
"
-O
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar.xz"
if
[
!
-f
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar.xz"
]
;
then
exit
56874674
fi
unxz
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar.xz"
if
[
!
-f
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar"
]
;
then
echo
$"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar not found"
exit
63843658
fi
tar
-xvf
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar"
rm
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar"
cd
../
||
exit
356385
ln
-s
"versions/
${
PEERTUBE_DOWNLOAD_FILENAME
}
"
./peertube-latest
cd
./peertube-latest
||
exit
35685
chown
-R
peertube:peertube
$PEERTUBE_DIR
sudo
-H
-u
peertube npm
install
yarn@1.10.1
sudo
-H
-u
peertube yarn
install
--production
--pure-lockfile
peertube_tcp_tuning
# This doesn't appear to work
#sudo -u peertube ./upgrade.sh $PEERTUBE_DIR
install_peertube_base
chown
-R
peertube:peertube
$PEERTUBE_DIR
...
...
@@ -1100,41 +1102,12 @@ function install_peertube {
function_check install_nodejs
install_nodejs peertube
if
!
npm
install
-g
yarn@1.10.1
;
then
echo
$'Failed to install yarn'
exit
79353234
fi
mkdir
-p
$PEERTUBE_DIR
cd
$PEERTUBE_DIR
||
exit
356835
mkdir
config storage versions
cd
versions
||
exit
3576835
wget
-q
"
$PEERTUBE_DOWNLOAD
"
-O
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar.xz"
if
[
!
-f
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar.xz"
]
;
then
exit
56874674
fi
unxz
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar.xz"
if
[
!
-f
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar"
]
;
then
echo
$"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar not found"
exit
63843658
fi
tar
-xvf
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar"
rm
"
${
PEERTUBE_DOWNLOAD_FILENAME
}
.tar"
cd
../
||
exit
356385
ln
-s
"versions/
${
PEERTUBE_DOWNLOAD_FILENAME
}
"
./peertube-latest
cd
./peertube-latest
||
exit
35685
chown
-R
peertube:peertube
$PEERTUBE_DIR
sudo
-H
-u
peertube npm
install
yarn@1.10.1
sudo
-H
-u
peertube yarn
install
--production
--pure-lockfile
peertube_tcp_tuning
install_peertube_base
PEERTUBE_ONION_HOSTNAME
=
$(
add_onion_service peertube 80
${
PEERTUBE_ONION_PORT
}
)
cp
"
$PEERTUBE_DIR
/peertube-latest/support/systemd/peertube.service"
/etc/systemd/system/peertube.service
sed
-i
"s|/var/www/peertube|
$PEERTUBE_DIR
|g"
/etc/systemd/system/peertube.service
peertube_create_config
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment