New file procedure added
This commit is contained in:
@@ -24,7 +24,11 @@ if [[ -f "$1" ]]; then
|
|||||||
cd $CONF_DIR
|
cd $CONF_DIR
|
||||||
if [[ -n $(git diff origin/master $(basename $1)) ]]; then
|
if [[ -n $(git diff origin/master $(basename $1)) ]]; then
|
||||||
info "Updating changes in file $1"
|
info "Updating changes in file $1"
|
||||||
git commit -am "Auto updating $1 - $(date)"
|
git commit -am "Auto updating $(basename $1) - $(date)"
|
||||||
|
git push
|
||||||
|
elif [[ -z $(git ls-files | grep $(basename $1)) ]]; then
|
||||||
|
git add $CONF_DIR/$(basename $1) -f
|
||||||
|
git commit $CONF_DIR/$(basename $1) -m "Adding file $(basename $1) - $(date)"
|
||||||
git push
|
git push
|
||||||
else
|
else
|
||||||
debug "No changes detected in $1"
|
debug "No changes detected in $1"
|
||||||
@@ -42,6 +46,7 @@ done
|
|||||||
conf_sync /etc/environment
|
conf_sync /etc/environment
|
||||||
conf_sync /etc/hosts
|
conf_sync /etc/hosts
|
||||||
conf_sync /etc/postfix/main.cf
|
conf_sync /etc/postfix/main.cf
|
||||||
|
conf_sync /etc/anacrontab
|
||||||
|
|
||||||
#Fix permissions
|
#Fix permissions
|
||||||
chown -R shmick $CONF_DIR
|
chown -R shmick $CONF_DIR
|
||||||
|
|||||||
Reference in New Issue
Block a user