Skip to content

Instantly share code, notes, and snippets.

View guentur's full-sized avatar
🎯
Efficiency

Kyrylo guentur

🎯
Efficiency
  • Chernivtsi, Ukraine
View GitHub Profile
@guentur
guentur / save_repo_in_private_remote_git.sh
Created October 6, 2022 14:35
To run it automatically when computer turns off past this file to /etc/init.d/ folder and create a symbol link to it in /etc/rc0.d and /etc/rc6.d. At least that what I have red in this [article](https://askubuntu.com/questions/83473/how-to-execute-script-on-shutdown)
#!/usr/bin/env bash
REPO_PATH='/media/user/Documents/Repo_folder'
BRANCH_NAME='laptop_dell_vostro_3590'
if [ -d '/media/user/Documents/Repo_folder' ]
then
DATE=$(date)
cd '/media/user/Documents/Repo_folder'