ursar-bot's People
ursar-bot's Issues
Token expires after 24h and is not renewed
The Skype token is valid for 24h after its creation and it is not properly renewed via SkypeConnection#refreshSkypeToken.
More info can be found in this and this issue.
As a temporary solution, the container can be restarted as follows:
*/5 * * * * /srv/ursar-bot/restart.sh
skype_username='username'
skype_password='password'
container_name='ursar'
is_running=$(docker exec ursar echo true 2>/dev/null || echo false)
echo "Is running: $is_running"
if [ "$is_running" = "true" ]
then
start=$(docker inspect -f {{.State.StartedAt}} "$container_name")
start_ts=$(date -d "$start" '+%s')
now_ts=$(date '+%s')
running_hours=$(( ( now_ts - start_ts ) / (60*60) ))
echo "Running hours: $running_hours"
fi
if [ "$is_running" = "false" ]
then
echo "Starting $container_name container"
docker run --rm -t -e URSAR_SKYPE_USERNAME="$skype_username" -e URSAR_SKYPE_PASSWORD="$skype_password" --name "$container_name" academiadeursarie/ursar-bot
fi
if [ "$is_running" = "true" ] && [ "$running_hours" -ge "24" ]
then
echo "Restarting $container_name container"
docker stop "$container_name" && docker run --rm -t -e URSAR_SKYPE_USERNAME="$skype_username" -e URSAR_SKYPE_PASSWORD="$skype_password" --name "$container_name" academiadeursarie/ursar-bot
fi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.