Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Dec 27, 2019
1 parent 4b546b2 commit 4c1b62e
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions menu/functions/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ source /opt/plexguide/menu/functions/serverid.sh
source /opt/plexguide/menu/functions/emergency.sh
source /opt/plexguide/menu/functions/serverid.sh

freshinstall() {


pginstall() {
versionubucheck
updateprime
Expand Down Expand Up @@ -81,7 +84,7 @@ updateprime() {
if [[ ! -e "$file" ]]; then echo "/mnt" >${abc}/server.hd.path; fi

file="${abc}/new.install"
if [[ ! -e "$file" ]]; then newinstall; fi
if [[ -f "$file" ]]; then newinstall; fi

ospgversion=$(lsb_release -si)
if [[ "$ospgversion" == "Ubuntu" ]]; then
Expand Down Expand Up @@ -218,10 +221,10 @@ ansible-playbook /opt/plexguide/menu/installer/mcdeploy.yml
newinstall() {
rm -rf ${abc}/pg.exit 1>/dev/null 2>&1
file="${abc}/new.install"
if [[ ! -e "$file" ]]; then
if [[ ! -f "$file" ]]; then
touch ${abc}/pg.number && echo off >/tmp/program_source
file="${abc}/new.install"
if [[ ! -e "$file" ]]; then exit; fi
if [[ ! -f "$file" ]]; then exit; fi
fi
}

Expand All @@ -243,27 +246,21 @@ pgedition() {

portainer() {
dstatus=$(docker ps --format '{{.Names}}' | grep "portainer")
if [[ "$dstatus" != "portainer" ]]; then
ansible-playbook /opt/coreapps/apps/portainer.yml
fi
if [[ "$dstatus" != "portainer" ]]; then ansible-playbook /opt/coreapps/apps/portainer.yml; fi
}

# Roles Ensure that PG Replicates and has once if missing; important for startup, cron and etc
pgcore() {
file="${abc}/new.install"
if [[ -e "$file" ]]; then
ansible-playbook /opt/plexguide/menu/pgbox/core/core.yml
fi
if [[ -f "$file" ]]; then ansible-playbook /opt/plexguide/menu/pgbox/core/core.yml; fi
}
pgcommunity() {
file="${abc}/new.install"
if [[ -e "$file" ]]; then
ansible-playbook /opt/plexguide/menu/pgbox/community/community.yml
fi
if [[ -f "$file" ]]; then ansible-playbook /opt/plexguide/menu/pgbox/community/community.yml; fi
}
pgshield() {
file="${abc}/new.install"
if [[ -e "$file" ]]; then
if [[ -f "$file" ]]; then
echo 'pgshield' >/var/plexguide/pgcloner.rolename
echo 'PTS-Shield' >${abc}/pgcloner.roleproper
echo 'PTS-Shield' >${abc}/pgcloner.projectname
Expand All @@ -275,16 +272,12 @@ fi

pythonstart() {
file="${abc}/new.install"
if [[ -e "$file" ]]; then
bash /opt/plexguide/menu/roles/pythonstart/pyansible.sh
fi
if [[ -f "$file" ]]; then bash /opt/plexguide/menu/roles/pythonstart/pyansible.sh; fi
}

dockerinstall() {
file="${abc}/new.install"
if [[ -e "$file" ]]; then
ansible-playbook /opt/plexguide/menu/pg.yml --tags docker
fi
if [[ -f "$file" ]]; then ansible-playbook /opt/plexguide/menu/pg.yml --tags docker; fi
}

####EOF###

0 comments on commit 4c1b62e

Please sign in to comment.