diff --git a/backupDatabase.sh b/backupDatabase.sh index 96a29fd..e8bfcf2 100755 --- a/backupDatabase.sh +++ b/backupDatabase.sh @@ -3,7 +3,7 @@ # Take all variables in .env and turn them into local variables for this script source /home/mab/.env -BACKUPDIR="/home/mab/databaseBackupSolidScribe" +# BACKUPDIR defined in .env mkdir -p $BACKUPDIR cd $BACKUPDIR @@ -17,7 +17,7 @@ gzip "backup-$NOW.sql" echo "Database Backup Complete on $NOW" # Delete all but last 8 files -#ls -tp | grep -v '/$' | tail -n +9 | tr '\n' '\0' | xargs -0 rm -f -- +ls -tp | grep -v '/$' | tail -n +9 | tr '\n' '\0' | xargs -0 rm -f -- ## # Restore DB diff --git a/shell.nix b/shell.nix index 3667c08..2c34676 100644 --- a/shell.nix +++ b/shell.nix @@ -8,32 +8,15 @@ in pkgs.mkShell rec { buildInputs = [ # node for server nodejs - nodePackages.npm + #nodePackages.npm + nodemon + pnpm pm2 ]; - # Run this command, only after creating the virtual environment - postVenvCreation = '' - unset SOURCE_DATE_EPOCH - ''; - postShellHook = '' - - if [[ ! -f lockfile.running ]] ; then - echo "No Lock File, starting servers" - touch lockfile.running - - # start service - # npm run start or whatever - - fi - - # kill everything when main screen is closed - function end { - echo "Exiting, Removing Lockfile" - rm -f lockfile.running - } - trap end EXIT + echo("Welcome to solid scribe") + alias npm=pnpm ''; }