Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor 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
mediaserver
envsetup
Commits
49b3d2b5
Commit
49b3d2b5
authored
8 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Changed MV install.
parent
de27e282
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
9.MediaVault/1.Install_MediaVault/0_setup.sh
+24
-23
24 additions, 23 deletions
9.MediaVault/1.Install_MediaVault/0_setup.sh
with
24 additions
and
23 deletions
9.MediaVault/1.Install_MediaVault/0_setup.sh
+
24
−
23
View file @
49b3d2b5
#!/bin/bash
#!/bin/bash
set
-e
source
/root/envsetup/global-conf.sh
source
/root/envsetup/global-conf.sh
apt-get
install
-y
dialog
apt-get
install
-y
dialog build-essential
cd
/root
cd
/root
git clone https://git.ubicast.net/mediaserver/
burp-custom
.git
&&
rm
-rf
burp-custom
mv
burp-custom/
*
/root/
git clone https://git.ubicast.net/mediaserver/burp-custom.git burp-custom
#
application des variables
#
set conf
sed
-i
"s@^BURP_STATUS_IP=.*@BURP_STATUS_IP=
${
BURP_STATUS_IP
}
@"
/root/burp-custom.sh
sed
-i
"s@^BURP_STATUS_IP=.*@BURP_STATUS_IP=
${
BURP_STATUS_IP
}
@"
/root/burp-custom
/burp-custom
.sh
sed
-i
"s@^BURPUI_PASSWORD=.*@BURPUI_PASSWORD=
${
BURPUI_PASSWORD
}
@"
/root/burp-custom.sh
sed
-i
"s@^BURPUI_PASSWORD=.*@BURPUI_PASSWORD=
${
BURPUI_PASSWORD
}
@"
/root/burp-custom
/burp-custom
.sh
sed
-i
"s@^BURP_SERVER=.*@BURP_SERVER=
${
BURP_SERVER
}
@"
/root/burp-custom.sh
sed
-i
"s@^BURP_SERVER=.*@BURP_SERVER=
${
BURP_SERVER
}
@"
/root/burp-custom
/burp-custom
.sh
sed
-i
"s/^BURP_MAIL_DEST=.*/BURP_MAIL_DEST=
${
BURP_MAIL_DEST
}
/"
/root/burp-custom.sh
sed
-i
"s/^BURP_MAIL_DEST=.*/BURP_MAIL_DEST=
${
BURP_MAIL_DEST
}
/"
/root/burp-custom
/burp-custom
.sh
sed
-i
"s@^BURP_CLIENT_NAME=.*@BURP_CLIENT_NAME=
${
BURP_CLIENT_NAME
}
@"
/root/burp-custom.sh
sed
-i
"s@^BURP_CLIENT_NAME=.*@BURP_CLIENT_NAME=
${
BURP_CLIENT_NAME
}
@"
/root/burp-custom
/burp-custom
.sh
sed
-i
's@^echo "password = ${BURP_CLIENT_PASSWORD}".*@@'
/root/burp-custom.sh
sed
-i
's@^echo "password = ${BURP_CLIENT_PASSWORD}".*@@'
/root/burp-custom
/burp-custom
.sh
sed
-i
's@^echo "restore_client = ${BURP_CLIENT_NAME}".*@@'
/root/burp-custom.sh
sed
-i
's@^echo "restore_client = ${BURP_CLIENT_NAME}".*@@'
/root/burp-custom
/burp-custom
.sh
# run burp-custom.sh install_fullserver
# run burp-custom.sh install_fullserver
cd
/root
cd
/root
bash /root/burp-custom.sh install_fullserver
bash /root/burp-custom
/burp-custom
.sh install_fullserver
# get admin_shell
# get admin_shell
mv
/root/admin_shell.sh /home/admin/admin_shell.sh
mv
/root/
burp-custom/
admin_shell.sh /home/admin/admin_shell.sh
# get MS_restore.sh
# get MS_restore.sh
cp
/root/MS_restore.sh /home/admin/MS_restore.sh
cp
/root/
burp-custom/
MS_restore.sh /home/admin/MS_restore.sh
# MS_restore ajout clef ssh ??
# MS_restore ajout clef ssh ??
sed
-i
"s@scp /root@scp -i /home/admin/.ssh/id_rsa /root@"
/home/admin/MS_restore.sh
sed
-i
"s@scp /root@scp -i /home/admin/.ssh/id_rsa /root@"
/home/admin/MS_restore.sh
...
@@ -33,16 +35,15 @@ sed -i "s@ssh ${CLIENT}@ssh -i /home/admin/.ssh/id_rsa root\@${CLIENT}@" /home/a
...
@@ -33,16 +35,15 @@ sed -i "s@ssh ${CLIENT}@ssh -i /home/admin/.ssh/id_rsa root\@${CLIENT}@" /home/a
echo
"bash /home/admin/admin_shell.sh"
>
/home/admin/.bash_profile
echo
"bash /home/admin/admin_shell.sh"
>
/home/admin/.bash_profile
# generate admin ssh key
# generate admin ssh key
if
(
!
test
-f
/home/admin/.ssh/id_rsa
)
if
(
!
test
-f
/home/admin/.ssh/id_rsa
)
;
then
then
mkdir
-p
/home/admin/.ssh
mkdir
-p
/home/admin/.ssh
chown
-R
admin:admin /home/admin/.ssh
chown
-R
admin:admin /home/admin/.ssh
su admin
-c
'ssh-keygen -t rsa -N "" -f /home/admin/.ssh/id_rsa'
sudo
-H
-u
admin bash
-c
'ssh-keygen -t rsa -N "" -f /home/admin/.ssh/id_rsa'
fi
fi
# permit admin to transmit burp-custom
# permit admin to transmit burp-custom
cp
/root/burp-custom.sh /home/admin/
cp
/root/burp-custom
/burp-custom
.sh /home/admin/
cp
/root/burp
*
.bz2 /home/admin/
cp
/root/burp
-custom/burp
*
.bz2 /home/admin/
# restore permissions
# restore permissions
chown
-R
admin:admin /home/admin/
chown
-R
admin:admin /home/admin/
...
@@ -51,4 +52,4 @@ echo "admin: ${BURP_MAIL_DEST}" >> /etc/aliases
...
@@ -51,4 +52,4 @@ echo "admin: ${BURP_MAIL_DEST}" >> /etc/aliases
newaliases
newaliases
# give root rights to admin
# give root rights to admin
sed
-i
"s@admin:x:.*@admin:x:0:0::/home/admin:/bin/bash@"
/etc/passwd
#
sed -i "s@admin:x:.*@admin:x:0:0::/home/admin:/bin/bash@" /etc/passwd
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