Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
etckeeper_install
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
OpenSource
etckeeper_install
Commits
1fb899c9
Commit
1fb899c9
authored
6 years ago
by
Dennis Eisold
Browse files
Options
Downloads
Patches
Plain Diff
Update install.sh
parent
60fec84c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#36
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install.sh
+24
-3
24 additions, 3 deletions
install.sh
with
24 additions
and
3 deletions
install.sh
+
24
−
3
View file @
1fb899c9
apt
install
-y
etckeeper git
#!/bin/bash
if
((
$#
==
1
))
then
echo
"
$1
"
Token
=
$1
else
echo
'usage: install.sh YourAccessToken'
exit
fi
Gitlab_Host
=
"https://www.gitrepo.de"
Gitlab_Repo
=
"https://www.gitrepo.de/opensource/etckeeper_install/raw/master"
key_pub
=
$(
<~/.ssh/id_rsa.pub
)
hostname
=
`
hostname
-f
`
curl
--data-urlencode
"key=
$key_pub
"
--data-urlencode
"title=
$hostname
"
$Gitlab_Host
/api/v4/user/keys?private_token
=
$Token
apt
install
-y
etckeeper git wget
ssh-keyscan ssh.gitrepo.de
>>
~/.ssh/known_hosts
echo
"VCS=
\"
git
\"
AVOID_SPECIAL_FILE_WARNING=1
PUSH_REMOTE=
\"
origin
\"
"
>
/etc/etckeeper/etckeeper.conf
cd
/etc
git init
git config
--global
user.name
"roadit_ectkeeper"
git config
--global
user.email
"ectkeeper@roadit.de"
git config
--global
core.editor
"nano"
git config
--global
push.default simple
git remote add origin git@ssh.gitrepo.de:roadit/etckeeper/
`
hostname
-f
`
.git
git remote add origin git@ssh.gitrepo.de:roadit/etckeeper/
$
hostname
.git
etckeeper commit
"initial commit"
wget https://www.gitrepo.de/opensource/etckeeper_install/raw/master/logout_trap.sh
-O
/usr/local/share/logout_trap.sh
wget
$Gitlab_Repo
/logout_trap.sh
-O
/usr/local/share/logout_trap.sh
chmod
+x /usr/local/share/logout_trap.sh
echo
"/usr/local/share/logout_trap.sh"
>>
~/.profile
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