Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
1bf712ab
Commit
1bf712ab
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Use tlsdate from debian repos
The aforementioned bug should now be fixed
parent
118077a7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone
+1
-95
1 addition, 95 deletions
src/freedombone
with
1 addition
and
95 deletions
src/freedombone
+
1
−
95
View file @
1bf712ab
...
...
@@ -91,9 +91,6 @@ DDNS_USERNAME=
DDNS_PASSWORD=
CURRENT_DDNS_DOMAIN=
TLSDATE_REPO="https://github.com/ioerror/tlsdate.git"
TLSDATE_COMMIT='ae396da167a9e43ce10c2db0956fb2e2b0d400ea'
INADYN_REPO="https://github.com/bashrc/inadyn"
INADYN_COMMIT='fadbe17f520d337dfb8d69ee4bf1fcaa23fce0d6'
...
...
@@ -867,12 +864,6 @@ function read_configuration {
if grep -q "IPFS_COMMIT" $CONFIGURATION_FILE; then
IPFS_COMMIT=$(grep "IPFS_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TLSDATE_REPO" $CONFIGURATION_FILE; then
TLSDATE_REPO=$(grep "TLSDATE_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TLSDATE_COMMIT" $CONFIGURATION_FILE; then
TLSDATE_COMMIT=$(grep "TLSDATE_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GNUSOCIAL_COMMIT" $CONFIGURATION_FILE; then
GNUSOCIAL_COMMIT=$(grep "GNUSOCIAL_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
...
...
@@ -6476,60 +6467,11 @@ function time_synchronisation {
return
fi
# update to the next commit
if [ -d $INSTALL_DIR/tlsdate ]; then
if grep -q "tlsdate commit" $COMPLETION_FILE; then
CURRENT_TLSDATE_COMMIT=$(grep "tlsdate commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
if [[ "$CURRENT_TLSDATE_COMMIT" != "$TLSDATE_COMMIT" ]]; then
cd $INSTALL_DIR/tlsdate
git stash
git checkout master
git pull
git checkout $TLSDATE_COMMIT
git checkout -b $TLSDATE_COMMIT
sed -i "s/tlsdate commit.*/tlsdate commit:$TLSDATE_COMMIT/g" $COMPLETION_FILE
./autogen.sh
./configure
make
make install
cp /usr/local/bin/tlsdate* /usr/bin
cp /usr/local/sbin/tlsdate* /usr/bin
fi
else
echo "tlsdate commit:$TLSDATE_COMMIT" >> $COMPLETION_FILE
fi
fi
if grep -Fxq "time_synchronisation" $COMPLETION_FILE; then
return
fi
#apt-get -y install tlsdate
# building tlsdate from source is a workaround because of
# this bug https://github.com/ioerror/tlsdate/issues/130
apt-get -y install build-essential automake git pkg-config autoconf libtool libssl-dev libevent-dev
if [ ! -d $INSTALL_DIR ]; then
mkdir $INSTALL_DIR
fi
cd $INSTALL_DIR
git clone $TLSDATE_REPO
cd $INSTALL_DIR/tlsdate
git checkout $TLSDATE_COMMIT
git checkout -b $TLSDATE_COMMIT
if ! grep -q "tlsdate commit" $COMPLETION_FILE; then
echo "tlsdate commit:$TLSDATE_COMMIT" >> $COMPLETION_FILE
else
sed -i "s/tlsdate commit.*/tlsdate commit:$TLSDATE_COMMIT/g" $COMPLETION_FILE
fi
./autogen.sh
./configure
make
make install
cp /usr/local/bin/tlsdate* /usr/bin
cp /usr/local/sbin/tlsdate* /usr/bin
apt-get -y install tlsdate
apt-get -y remove ntpdate
echo '#!/bin/bash' > /usr/bin/updatedate
...
...
@@ -6607,42 +6549,6 @@ function time_synchronisation {
echo '*/15 * * * * root /usr/bin/updatedate' >> /etc/crontab
service cron restart
echo '#!/bin/bash' > /etc/init.d/tlsdate
echo '# /etc/init.d/tlsdate' >> /etc/init.d/tlsdate
echo '### BEGIN INIT INFO' >> /etc/init.d/tlsdate
echo '# Provides: tlsdate' >> /etc/init.d/tlsdate
echo '# Required-Start: $remote_fs $syslog' >> /etc/init.d/tlsdate
echo '# Required-Stop: $remote_fs $syslog' >> /etc/init.d/tlsdate
echo '# Default-Start: 2 3 4 5' >> /etc/init.d/tlsdate
echo '# Default-Stop: 0 1 6' >> /etc/init.d/tlsdate
echo '# Short-Description: Initially calls tlsdate with the timewarp option' >> /etc/init.d/tlsdate
echo '# Description: Initially calls tlsdate with the timewarp option' >> /etc/init.d/tlsdate
echo '### END INIT INFO' >> /etc/init.d/tlsdate
echo '# Author: Bob Mottram <bob@robotics.uk.to>' >> /etc/init.d/tlsdate
echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin"' >> /etc/init.d/tlsdate
echo 'LOGFILE="/var/log/tlsdate.log"' >> /etc/init.d/tlsdate
echo 'TLSDATECOMMAND="tlsdate --timewarp -l -H www.ptb.de -p 443 >> $LOGFILE"' >> /etc/init.d/tlsdate
echo '#Start-Stop here' >> /etc/init.d/tlsdate
echo 'case "$1" in' >> /etc/init.d/tlsdate
echo ' start)' >> /etc/init.d/tlsdate
echo ' echo "tlsdate started"' >> /etc/init.d/tlsdate
echo ' $TLSDATECOMMAND' >> /etc/init.d/tlsdate
echo ' ;;' >> /etc/init.d/tlsdate
echo ' stop)' >> /etc/init.d/tlsdate
echo ' echo "tlsdate stopped"' >> /etc/init.d/tlsdate
echo ' ;;' >> /etc/init.d/tlsdate
echo ' restart)' >> /etc/init.d/tlsdate
echo ' echo "tlsdate restarted"' >> /etc/init.d/tlsdate
echo ' $TLSDATECOMMAND' >> /etc/init.d/tlsdate
echo ' ;;' >> /etc/init.d/tlsdate
echo ' *)' >> /etc/init.d/tlsdate
echo ' echo "Usage: $0 {start|stop|restart}"' >> /etc/init.d/tlsdate
echo ' exit 1' >> /etc/init.d/tlsdate
echo ' ;;' >> /etc/init.d/tlsdate
echo 'esac' >> /etc/init.d/tlsdate
echo 'exit 0' >> /etc/init.d/tlsdate
chmod +x /etc/init.d/tlsdate
update-rc.d tlsdate defaults
echo 'time_synchronisation' >> $COMPLETION_FILE
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment