Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bash-install
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
witchy
bash-install
Commits
acfa5b80
Commit
acfa5b80
authored
3 years ago
by
tamaina
Browse files
Options
Downloads
Patches
Plain Diff
✌️
parent
79d3106e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ubuntu.sh
+10
-3
10 additions, 3 deletions
ubuntu.sh
update.ubuntu.sh
+46
-2
46 additions, 2 deletions
update.ubuntu.sh
with
56 additions
and
5 deletions
ubuntu.sh
+
10
−
3
View file @
acfa5b80
...
...
@@ -363,8 +363,8 @@ tput setaf 7;
apt update
-y
;
apt
install
-y
curl nano gnupg2 apt-transport-https ca-certificates lsb-release git build-essential software-properties-common ffmpeg uidmap
$(
$nginx_local
&&
echo
" certbot"
)$(
$cloudflare
&&
echo
" python3-certbot-dns-cloudflare"
)
;
#region work with misskey user
if
[
$method
!=
"docker_hub"
]
;
then
#region work with misskey user
su
"
$misskey_user
"
<<
MKEOF
set -eu;
cd ~;
...
...
@@ -380,9 +380,9 @@ if [ -e "./$misskey_directory" ]; then
fi
git clone -b "
$branch
" --depth 1 --recursive "
$repository
" "
$misskey_directory
";
MKEOF
#endregion
else
#region work with misskey user
su
"
$misskey_user
"
<<
MKEOF
set -eu;
cd ~;
...
...
@@ -401,8 +401,13 @@ else
mkdir "./
$misskey_directory
/.config"
fi
MKEOF
#endregion
fi
tput setaf 3
;
echo
"Process: write default.yml;"
;
tput setaf 7
;
#region work with misskey user
su
"
$misskey_user
"
<<
MKEOF
set -eu;
cd ~;
...
...
@@ -611,6 +616,7 @@ tput setaf 7;
systemctl restart nginx
;
systemctl
enable
nginx
;
tput setaf 2
;
echo
"Check: localhost returns nginx;"
;
tput setaf 7
;
...
...
@@ -828,6 +834,7 @@ echo "Process: create .misskey-docker.env;"
tput setaf 7;
cat > ".misskey-docker.env" << _EOF
method="
$method
"
host="
$host
"
misskey_port=
$misskey_port
misskey_directory="
$misskey_directory
"
...
...
This diff is collapsed.
Click to expand it.
update.
systemd
.sh
→
update.
ubuntu
.sh
+
46
−
2
View file @
acfa5b80
...
...
@@ -18,8 +18,46 @@
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
misskey_user
=
misskey
misskey_directory
=
misskey
tput setaf 2
;
echo
"Check: root user;"
;
if
[
"
$(
whoami
)
"
!=
'root'
]
;
then
tput setaf 1
;
echo
" NG. This script must be run as root."
;
exit
1
;
else
tput setaf 7
;
echo
" OK. I am root user."
;
fi
tput setaf 3
;
echo
"Process: import environment and detect method;"
;
tput setaf 7
;
if
[
-f
"/root/.misskey.env"
]
;
then
.
"/root/.misskey.env"
;
if
[
-f
"/home/
$misskey_user
/.misskey.env"
]
;
then
.
"/home/
$misskey_user
/.misskey.env"
;
method
=
systemd
;
elif
[
-f
"/home/
$misskey_user
/.misskey-docker.env"
]
;
then
.
"/home/
$misskey_user
/.misskey-docker.env"
;
else
misskey_user
=
misskey
;
misskey_directory
=
misskey
;
misskey_localhost
=
localhost
;
method
=
systemd
;
echo
"use default"
fi
else
misskey_user
=
misskey
;
misskey_directory
=
misskey
;
misskey_localhost
=
localhost
;
method
=
systemd
;
echo
"use default"
fi
echo
"method:
$method
/ user:
$misskey_user
/ dir:
$misskey_directory
/
$misskey_localhost
:
$misskey_port
"
if
[
$method
==
"systemd"
]
;
then
#region work with misskey user
su
$misskey_user
<<
MKEOF
...
...
@@ -49,3 +87,9 @@ if [ $1 == "-r" ]; then
else
systemctl start misskey
;
fi
elif
[
$method
==
"docker"
]
;
then
echo
"todo"
else
echo
"todo"
fi
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