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
237b2280
Commit
237b2280
authored
3 years ago
by
tamaina
Browse files
Options
Downloads
Patches
Plain Diff
?
parent
ad91ff8b
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
ubuntu.sh
+9
-13
9 additions, 13 deletions
ubuntu.sh
with
9 additions
and
13 deletions
ubuntu.sh
+
9
−
13
View file @
237b2280
...
...
@@ -331,6 +331,7 @@ if cut -d: -f1 /etc/passwd | grep -q -x "$misskey_user"; then
else
useradd
-m
-U
-s
/bin/bash
"
$misskey_user
"
;
fi
m_uid
=
$(
id
-u
"
$misskey_user
"
)
tput setaf 3
;
echo
"Process: apt install #1;"
;
...
...
@@ -474,10 +475,11 @@ if [ $method != "systemd" ]; then
su
"
$misskey_user
"
<<-
MKEOF
set -eu;
cd ~;
export XDG_RUNTIME_DIR=/run/user/
\$
UID
export XDG_RUNTIME_DIR=/run/user/
$m_uid
echo
$XDG_RUNTIME_DIR
dockerd-rootless-setuptool.sh install
export DOCKER_HOST=unix://
\$
XDG_RUNTIME_DIR
/docker.sock
export DOCKER_HOST=unix://
/run/user/
$m_uid
/docker.sock
tput setaf 2;
echo "Check: docker setup;";
...
...
@@ -508,6 +510,8 @@ if [ $method != "systemd" ]; then
read
-r
-p
"Enter the editor command and press Enter key > "
-e
-i
"nano"
editorcmd
$editorcmd
"
$pg_conf
"
;
fi
systemctl restart postgresql
;
fi
#endregion
...
...
@@ -533,6 +537,8 @@ if [ $method != "systemd" ]; then
echo
"requirepass
$redis_pass
"
read
-r
-p
"Press Enter key to continue> "
fi
systemctl restart redis-servrer
;
fi
#endregion
fi
...
...
@@ -693,16 +699,7 @@ tput setaf 3;
echo
"Process: build docker image;"
tput setaf 7
;
#region work with misskey user
su
"
$misskey_user
"
<<
MKEOF
;
set -eu;
cd ~/
$misskey_directory
;
export XDG_RUNTIME_DIR=/run/user/
\$
UID
export DOCKER_HOST=unix://
\$
XDG_RUNTIME_DIR/docker.sock
docker build -t
$docker_hub_repository
./;
MKEOF
#endregion
sudo
-u
"
$misskey_user
"
XDG_RUNTIME_DIR
=
/run/user/
$m_uid
DOCKER_HOST
=
unix:///run/user/
$m_uid
/docker.sock docker build
-t
$docker_hub_repository
"/home/
$misskey_user
/
$misskey_directory
"
#endregion
fi
...
...
@@ -710,7 +707,6 @@ if [ $method != "systemd" ]; then
tput setaf 3
;
echo
"Process: docker run;"
tput setaf 7
;
m_uid
=
$(
id
-u
"
$misskey_user
"
)
docker_container
=
$(
sudo
-u
"
$misskey_user
"
XDG_RUNTIME_DIR
=
/run/user/
$m_uid
DOCKER_HOST
=
unix:///run/user/
$m_uid
/docker.sock docker run
-p
$misskey_port
:
$misskey_port
--add-host
=
host:
$docker_host_ip
-v
/home/
$misskey_user
/
$misskey_directory
/files:/misskey/files
-v
"/home/
$misskey_user
/
$misskey_directory
/.config/default.yml"
:/misskey/.config/default.yml:ro
-d
-t
"
$docker_hub_repository
"
)
;
sudo
-u
"
$misskey_user
"
XDG_RUNTIME_DIR
=
/run/user/
$m_uid
DOCKER_HOST
=
unix:///run/user/
$m_uid
/docker.sock docker logs
-f
$docker_container
;
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