From dece003b36279807f7d53a2e4e11f85dd7c5a563 Mon Sep 17 00:00:00 2001 From: dbarzin Date: Mon, 13 Feb 2023 21:28:53 +0100 Subject: [PATCH] work on script --- .github/workflows/ci.yml | 18 +++++++++++------- install.sh | 7 ++++++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46213d5..0decc09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,14 +19,18 @@ jobs: - name: Install Pandora run: | sudo ./install.sh + + - name: Reboot server + hosts: server + become: yes + roles: + - reboot - - name: Copy ini file - run: | - cp pandora-box.ini.curses pandora-dox.ini - - - name: Start pandora-box - run: | - ./pandora-box.py + vars_prompt: + - name: "reboot" + prompt: "Are you sure you want to reboot server (yes/no)?" + private: no + default: "no" - name: Upload Screenshots if: failure() diff --git a/install.sh b/install.sh index 6d744ca..38a2d0a 100755 --- a/install.sh +++ b/install.sh @@ -67,4 +67,9 @@ echo "StandardInput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.co echo "StandardOutput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.conf echo "Type=idle" >> /etc/systemd/system/getty@tty1.service.d/override.conf -sleep 2 && shutdown -r now "Reboot" + +# Copy ini file +cp pandora-box.ini.curses pandora-dox.ini + +# Reboot +echo "You may reboot the server"