Skip to content

Commit

Permalink
Permissions / ownership tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
None committed Jun 30, 2017
1 parent 9ed27e3 commit 541575d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions config/scripts/post-config.d/hooks.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash
source /config/user-data/edgerouter-backup.conf

# Fix ownership
sudo chown -R root:vyattacfg /config/userdata
# Fix ownership / permissions
sudo chown -R root:vyattacfg /config/user-data
sudo chown -R root:vyattacfg /config/scripts
sudo chmod -R ug+w /config/user-data
sudo chmod -R ug+w /config/scripts
sudo chmod g-w $SSH_KEYFILE

# Ensure scripts are executable
sudo chmod +x /config/user-data/hooks/*
Expand Down
6 changes: 3 additions & 3 deletions config/user-data/hooks/03-edgerouter-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ GIT_COMMIT_MSG="$COMMIT_CMT | by $USER | via $COMMIT_VIA | $TIME"

# Remove temporary files
#echo "edgerouter-backup: Removing temporary files"
sudo rm /tmp/edgerouter-backup-$FNAME_CONFIG
sudo rm /tmp/edgerouter-backup-$FNAME_CLI
sudo rm /tmp/edgerouter-backup-$FNAME_BACKUP
sudo rm /tmp/edgerouter-backup-$FNAME_CONFIG &> /dev/null
sudo rm /tmp/edgerouter-backup-$FNAME_CLI &> /dev/null
sudo rm /tmp/edgerouter-backup-$FNAME_BACKUP &> /dev/null


# Generate temporary config files
Expand Down

0 comments on commit 541575d

Please sign in to comment.