Merge pull request #151 from naturallaw777/copilot/remove-file-fixes-and-new-services
Remove legacy file_fixes_and_new_services system
This commit is contained in:
@@ -1,70 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
cd /home/free/Downloads
|
|
||||||
|
|
||||||
|
|
||||||
#### SCRIPT 1 ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/sovran-pro-flake-update.sh"
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/bash /home/free/Downloads/sovran-pro-flake-update.sh
|
|
||||||
|
|
||||||
rm -rf /home/free/Downloads/sovran-pro-flake-update.sh
|
|
||||||
|
|
||||||
|
|
||||||
#### SCRIPT 2 ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/add-custom-nix.sh"
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/bash /home/free/Downloads/add-custom-nix.sh
|
|
||||||
|
|
||||||
rm -rf /home/free/Downloads/add-custom-nix.sh
|
|
||||||
|
|
||||||
|
|
||||||
#### SCRIPT 3 ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/sovran-pro-flake-update2.sh"
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/bash /home/free/Downloads/sovran-pro-flake-update2.sh
|
|
||||||
|
|
||||||
rm -rf /home/free/Downloads/sovran-pro-flake-update2.sh
|
|
||||||
|
|
||||||
|
|
||||||
#### SCRIPT 4 ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/nextcloud_maintenance_window_fix.sh"
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/bash /home/free/Downloads/nextcloud_maintenance_window_fix.sh
|
|
||||||
|
|
||||||
rm -rf /home/free/Downloads/nextcloud_maintenance_window_fix.sh
|
|
||||||
|
|
||||||
|
|
||||||
#### SCRIPT 5 ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/add_external_backup_app.sh"
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/bash /home/free/Downloads/add_external_backup_app.sh
|
|
||||||
|
|
||||||
rm -rf /home/free/Downloads/add_external_backup_app.sh
|
|
||||||
|
|
||||||
|
|
||||||
#### SCRIPT 6 ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/update-agenix.sh"
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/bash /home/free/Downloads/update-agenix.sh
|
|
||||||
|
|
||||||
rm -rf /home/free/Downloads/update-agenix.sh
|
|
||||||
|
|
||||||
#### SCRIPT 7 ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/element-calling_haven"
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/bash /home/free/Downloads/element-calling_haven.sh
|
|
||||||
|
|
||||||
rm -rf /home/free/Downloads/element-calling_haven.sh
|
|
||||||
|
|
||||||
|
|
||||||
#### REMOVAL OF MAIN SCRIPT ####
|
|
||||||
|
|
||||||
rm -rf /home/free/Downloads/Sovran_SystemsOS_File_Fixes_And_New_Services.sh
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function log_console () {
|
|
||||||
echo "`date` :: $1" >> /var/lib/beacons/awesome.log
|
|
||||||
echo $1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE ####
|
|
||||||
|
|
||||||
FILE=/var/lib/beacons/file_fixes_and_new_services/add-custom-nix/completed
|
|
||||||
|
|
||||||
if [ -e $FILE ]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE INITIAL TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/add-custom-nix ; touch /var/lib/beacons/file_fixes_and_new_services/add-custom-nix/started
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Initial Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### MAIN SCRIPT ####
|
|
||||||
|
|
||||||
touch /etc/nixos/custom.nix
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/cat > /etc/nixos/custom.nix <<- "EOF"
|
|
||||||
{ config, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
###########################################################
|
|
||||||
# #
|
|
||||||
# Sovran_SystemsOS — custom.nix #
|
|
||||||
# #
|
|
||||||
# Services, features, and roles are managed by the #
|
|
||||||
# Sovran Hub. Any changes you make through the Hub #
|
|
||||||
# will appear in the "Hub Managed" section below. #
|
|
||||||
# #
|
|
||||||
# If you want to add your own NixOS modules or #
|
|
||||||
# configuration, place them here — outside of the #
|
|
||||||
# Hub Managed section. #
|
|
||||||
# #
|
|
||||||
###########################################################
|
|
||||||
|
|
||||||
# ─── Add your custom NixOS configuration below ───────────
|
|
||||||
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Run add-custom-nix"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE COMPELETE TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/add-custom-nix/completed
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Completed Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function log_console () {
|
|
||||||
echo "`date` :: $1" >> /var/lib/beacons/awesome.log
|
|
||||||
echo $1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE ####
|
|
||||||
|
|
||||||
FILE=/var/lib/beacons/file_fixes_and_new_services/add_external_backup_app/completed
|
|
||||||
|
|
||||||
if [ -e $FILE ]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE INITIAL TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/add_external_backup_app ; touch /var/lib/beacons/file_fixes_and_new_services/add_external_backup_app/started
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Initial Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### MAIN SCRIPT ####
|
|
||||||
|
|
||||||
cd /home/free/Downloads
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_External_Backup/sovran_systemsOS_external_backup_local_installer/sovran_systemsOS_external_backup_install.sh"
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/bash "sovran_systemsOS_external_backup_install.sh"
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Run add_external_backup_app"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE COMPELETE TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/add_external_backup_app/completed
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Completed Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function log_console () {
|
|
||||||
echo "`date` :: $1" >> /var/lib/beacons/awesome.log
|
|
||||||
echo $1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE ####
|
|
||||||
|
|
||||||
FILE=/var/lib/beacons/file_fixes_and_new_services/element-calling_haven/completed
|
|
||||||
|
|
||||||
if [ -e $FILE ]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE INITIAL TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/element-calling_haven ; touch /var/lib/beacons/file_fixes_and_new_services/element-calling_haven/started
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Initial Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### MAIN SCRIPT ####
|
|
||||||
|
|
||||||
mkdir -p /var/lib/domains
|
|
||||||
touch /var/lib/domains/haven
|
|
||||||
touch /var/lib/domains/element-calling
|
|
||||||
chown -R caddy:root /var/lib/domains
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Run element-calling_haven"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE COMPELETE TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/element-calling_haven/completed
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Completed Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function log_console () {
|
|
||||||
echo "`date` :: $1" >> /var/lib/beacons/awesome.log
|
|
||||||
echo $1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE ####
|
|
||||||
|
|
||||||
FILE=/var/lib/beacons/file_fixes_and_new_services/nextcloud_maintenance_window_fix/completed
|
|
||||||
|
|
||||||
if [ -e $FILE ]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE INITIAL TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/nextcloud_maintenance_window_fix ; touch /var/lib/beacons/file_fixes_and_new_services/nextcloud_maintenance_window_fix/started
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Initial Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### MAIN SCRIPT ####
|
|
||||||
|
|
||||||
/run/wrappers/bin/sudo -u caddy /run/current-system/sw/bin/php /var/lib/www/nextcloud/occ config:system:set maintenance_window_start --type=integer --value=1
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Run add-custom-nix"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE COMPELETE TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/nextcloud_maintenance_window_fix/completed
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Completed Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function log_console () {
|
|
||||||
echo "`date` :: $1" >> /var/lib/beacons/awesome.log
|
|
||||||
echo $1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE ####
|
|
||||||
|
|
||||||
FILE=/var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update/completed
|
|
||||||
|
|
||||||
if [ -e $FILE ]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE INITIAL TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update ; touch /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update/started
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Initial Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### MAIN SCRIPT ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/rm /etc/nixos/flake.nix
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/cat > /etc/nixos/flake.nix <<- "EOF"
|
|
||||||
|
|
||||||
{
|
|
||||||
description = "Sovran_SystemsOS for the Sovran Pro from Sovran Systems";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
|
|
||||||
Sovran_Systems.url = "git+https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, Sovran_Systems, ... }@inputs: {
|
|
||||||
|
|
||||||
nixosConfigurations."nixos" = Sovran_Systems.inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
|
|
||||||
system = "x86_64-linux";
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
|
|
||||||
./hardware-configuration.nix
|
|
||||||
|
|
||||||
Sovran_Systems.nixosModules.Sovran_SystemsOS
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Run sovran-pro-flake-update"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE COMPELETE TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update/completed
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Completed Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function log_console () {
|
|
||||||
echo "`date` :: $1" >> /var/lib/beacons/awesome.log
|
|
||||||
echo $1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE ####
|
|
||||||
|
|
||||||
FILE=/var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update2/completed
|
|
||||||
|
|
||||||
if [ -e $FILE ]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE INITIAL TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update2 ; touch /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update2/started
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Initial Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### MAIN SCRIPT ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/rm /etc/nixos/flake.nix
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/cat > /etc/nixos/flake.nix <<- "EOF"
|
|
||||||
|
|
||||||
{
|
|
||||||
description = "Sovran_SystemsOS for the Sovran Pro from Sovran Systems";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
|
|
||||||
Sovran_Systems.url = "git+https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, Sovran_Systems, ... }@inputs: {
|
|
||||||
|
|
||||||
nixosConfigurations."nixos" = Sovran_Systems.inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
|
|
||||||
system = "x86_64-linux";
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
|
|
||||||
./custom.nix
|
|
||||||
|
|
||||||
./hardware-configuration.nix
|
|
||||||
|
|
||||||
Sovran_Systems.nixosModules.Sovran_SystemsOS
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Run sovran-pro-flake-update2"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE COMPELETE TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update2/completed
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Completed Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE ####
|
|
||||||
|
|
||||||
FILE=/var/lib/beacons/file_fixes_and_new_services/update-agenix/completed
|
|
||||||
|
|
||||||
if [ -e $FILE ]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE INITIAL TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/update-agenix ; touch /var/lib/beacons/file_fixes_and_new_services/update-agenix/started
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Initial Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### MAIN SCRIPT ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/nextclouddb.age
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/wordpressdb.age
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/turn.age
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/matrixdb.age
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/matrix_reg_secret.age
|
|
||||||
|
|
||||||
|
|
||||||
pushd /var/lib/agenix-secrets/
|
|
||||||
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/wordpressdb) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e wordpressdb.age -i /root/.ssh/agenix/agenix-secret-keys
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/nextclouddb) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e nextclouddb.age -i /root/.ssh/agenix/agenix-secret-keys
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/matrixdb) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e matrixdb.age -i /root/.ssh/agenix/agenix-secret-keys
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/turn) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e turn.age -i /root/.ssh/agenix/agenix-secret-keys
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/matrix_reg_secret) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e matrix_reg_secret.age -i /root/.ssh/agenix/agenix-secret-keys
|
|
||||||
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Run update-agenix"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### CREATE COMPELETE TAG ####
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/update-agenix/completed
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
||||||
/run/current-system/sw/bin/echo "Could Not Create Completed Tag"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{config, pkgs, lib, ...}:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
systemd.services.Sovran_SystemsOS_File_Fixes_And_New_Services = {
|
|
||||||
|
|
||||||
unitConfig = {
|
|
||||||
After = "btcpayserver.service";
|
|
||||||
Requires = "network-online.target";
|
|
||||||
};
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStartPre= "/run/current-system/sw/bin/sleep 30";
|
|
||||||
ExecStart = "/run/current-system/sw/bin/wget https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh -O /home/free/Downloads/Sovran_SystemsOS_File_Fixes_And_New_Services.sh ; /run/current-system/sw/bin/bash /home/free/Downloads/Sovran_SystemsOS_File_Fixes_And_New_Services.sh";
|
|
||||||
RemainAfterExit = "yes";
|
|
||||||
User = "root";
|
|
||||||
Type = "oneshot";
|
|
||||||
};
|
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
# ── Always on (no flag) ───────────────────────────────────
|
# ── Always on (no flag) ───────────────────────────────────
|
||||||
./php.nix
|
./php.nix
|
||||||
./Sovran_SystemsOS_File_Fixes_And_New_Services.nix
|
|
||||||
./credentials.nix
|
./credentials.nix
|
||||||
|
|
||||||
# ── Services (default ON — disable in custom.nix) ─────────
|
# ── Services (default ON — disable in custom.nix) ─────────
|
||||||
|
|||||||
Reference in New Issue
Block a user