From 818ac70475962d5c967c96a7dd165181c0089b08 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Wed, 21 Jun 2023 14:19:13 -0700 Subject: [PATCH] added sturcture for updates --- ...n_SystemsOS_File_Fixes_And_New_Services.sh | 13 ++++ file_fixes_and_new_services/test.sh | 60 +++++++++++++++++++ ..._SystemsOS_File_Fixes_And_New_Services.nix | 41 +++++++++++++ modules/modules.nix | 1 + 4 files changed, 115 insertions(+) create mode 100644 file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh create mode 100644 file_fixes_and_new_services/test.sh create mode 100644 modules/Sovran_SystemsOS_File_Fixes_And_New_Services.nix diff --git a/file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh b/file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh new file mode 100644 index 0000000..82acae6 --- /dev/null +++ b/file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -ex + +cd /home/free/Downloads + +wget "https://git.sovransystems.com/Sovran_Systems/test.sh" + +bash /home/free/Downloads/test.sh + +rm -rf /home/free/Downloads/test.sh + +exit 0 \ No newline at end of file diff --git a/file_fixes_and_new_services/test.sh b/file_fixes_and_new_services/test.sh new file mode 100644 index 0000000..f44ae73 --- /dev/null +++ b/file_fixes_and_new_services/test.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +exec 1> /var/lib/beacons/awesome.log 2>&1 +set -x + + +#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE #### + +FILE=/var/lib/beacons/file_fixes_and_new_services/jitsi/started + + if [ -e $FILE ]; then + + echo "File Found, No Need to Run ... exiting" + + exit 1 + + fi + + +#### CREATE INITIAL TAG #### + +mkdir -p /var/lib/beacons/file_fixes_and_new_services/jitsi ; touch /var/lib/beacons/file_fixes_and_new_services/jitsi/started + + if [[ $? != 0 ]]; then + + echo "Could Not Create Initial Tag" + + exit 1 + + fi + + +#### MAIN SCRIPT #### + +mkdir /var/lib/cool + + if [[ $? != 0 ]]; then + + echo "Could Not Create Cool" + + exit 1 + + fi + + + +#### CREATE COMPELETE TAG #### + +touch /var/lib/beacons/file_fixes_and_new_services/jitsi/completed + + if [[ $? != 0 ]]; then + + echo "Could Not Create Completed Tag" + + exit 1 + + fi + + +exit 0 \ No newline at end of file diff --git a/modules/Sovran_SystemsOS_File_Fixes_And_New_Services.nix b/modules/Sovran_SystemsOS_File_Fixes_And_New_Services.nix new file mode 100644 index 0000000..157898b --- /dev/null +++ b/modules/Sovran_SystemsOS_File_Fixes_And_New_Services.nix @@ -0,0 +1,41 @@ +{config, pkgs, lib, ...}: + +{ + + systemd.services.Sovran_SystemsOS_File_Fixes_And_New_Services = { + + script = '' + + set -ex + + cd /home/free/Downloads + + wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS_File_Fixes_And_New_Services.sh" + + bash /home/free/Downloads/Sovran_SystemsOS_File_Fixes_And_New_Services.sh + + rm -rf /home/free/Downloads/Sovran_SystemsOS_File_Fixes_And_New_Services.sh + + exit 0 + + ''; + + unitConfig = { + Type = "simple"; + After = "NetworkManager.service"; + Requires = "network-online.target"; + }; + + serviceConfig = { + RemainAfterExit = "yes"; + Type = "oneshot"; + }; + + wantedBy = [ "multi-user.target" ]; + + }; + + + + +} diff --git a/modules/modules.nix b/modules/modules.nix index 222162d..e9e1b1f 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -9,6 +9,7 @@ ./bitcoinecosystem.nix ./vaultwarden.nix ./onlyoffice.nix + ./Sovran_SystemsOS_File_Fixes_And_New_Services.nix /etc/nixos/hardware-configuration.nix ]; } \ No newline at end of file