Pre-update autocommit on boot at 2015-08-04 10:53
This commit is contained in:
parent
cd90754386
commit
c66a23f71b
@ -15,7 +15,9 @@ trap 'rm -f $TMPFILE' EXIT
|
||||
|
||||
cd /opt/tellconf
|
||||
|
||||
git commit -qam "Pre-update autocommit on boot at $(date '+%F %R')"
|
||||
if ! git diff --quiet; then
|
||||
git commit -qam "Pre-update autocommit on boot at $(date '+%F %R')"
|
||||
fi
|
||||
git pull
|
||||
|
||||
scp -q "$REMOTE_HOST:$REMOTE_FILE" "$TMPFILE"
|
||||
@ -32,8 +34,14 @@ while read line; do
|
||||
|
||||
done < "$TMPFILE"
|
||||
|
||||
mv "$TMPCONF" "$CONFFILE"
|
||||
service telldusd restart
|
||||
if [ diff "$TMPCONF" "$CONFFILE" >/dev/null 2>&1 = 1 ]; then
|
||||
mv "$TMPCONF" "$CONFFILE"
|
||||
service telldusd restart
|
||||
else
|
||||
rm "$TMPCONF"
|
||||
fi
|
||||
|
||||
git commit -qam "Post-update autocommit on boot at $(date '+%F %R')"
|
||||
if ! git diff --quiet; then
|
||||
git commit -qam "Post-update autocommit on boot at $(date '+%F %R')"
|
||||
fi
|
||||
git push
|
||||
|
Loading…
x
Reference in New Issue
Block a user