root@vm2101602:~# sudo add-apt-repository ppa:certbot/certbot
Cannot add PPA: 'ppa:~certbot/ubuntu/certbot'.
ERROR: '~certbot' user or team does not exist.
root@vm2101602:~# apt-get update
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [99.8 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-security InRelease [99.8 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [97.4 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [22.6 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8476 B]
Get:10 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages [1648 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-security/main Translation-en [360 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [9824 B]
Get:13 http://archive.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2152 B]
Get:14 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [785 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-security/universe Translation-en [225 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [7864 B]
Get:17 http://archive.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [2672 B]
Get:18 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [9812 B]
Get:19 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4456 B]
Get:20 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [11.3 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [4476 B]
Fetched 3650 kB in 8s (420 kB/s)
Reading package lists... Done
root@vm2101602:~# apt-get install python-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-certbot-nginx is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-certbot-nginx' has no installation candidate
root@vm2101602:~#
lsb_release -a
o LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
io.on('connection', async function (socket) {
let params = socket.handshake.query.params
let vars = socket.handshake.query
let prov = validateAppUrl(params, "6Uc75GjlyLtxZzDgXHc8");
if (!prov.status) return console.log(`err1`) && socket.disconnect()
params = getUrlVars(params)
if (Number(params.vk_user_id) != Number(socket.handshake.query.uid)) {
console.log(`err`)
return socket.disconnect()
}
console.log(`ok`)
con.query(`SELECT * FROM users WHERE uid = '${socket.handshake.query.uid}'`, function(err,result){
if (err) {
return console.log(err)
}
if (result.length == 0) {
let name = socket.handshake.query.nick
let new_name = name.replace(/[^a-zа-яё0-9\s]/gi," ")
con.query(`INSERT INTO users (uid,photo,nick, ip) VALUES ('${socket.handshake.query.uid}','${socket.handshake.query.photo}','${new_name}', '${socket.handshake.address}')`, function(err,result){
if (err) {
return console.log(err)
}
con.query(`SELECT * FROM users WHERE uid = '${socket.handshake.query.uid}'`, function(err,result){
if (err) {
return console.log(err)
}
if (result.length > 0) {
con.query(`UPDATE users SET online = '1' WHERE uid = '${socket.handshake.query.uid}'`, function(err,result){
if (err) {
return console.log(err)
}
con.query(`SELECT * FROM users WHERE online='1'`, function(err,result){
if (err) {
return console.log(err)
}
socket.emit(`response`,{
'type':'online',
'count':result.length
})
})
})
con.query(`SELECT * FROM users WHERE uid = '${socket.handshake.query.uid}'`, function(err,result){
if (err) {
return console.log(err)
}
if (result[0].rules == 0) {
socket.emit(`response`,{
'type':'noaccess_rules'
})
}
})
socket.emit(`response`, {
'type':'userdata',
'bonus':result[0].bonus,
'balance':result[0].balance,
'ban':result[0].ban
})
}
})
})
}
if (result.length > 0) {
con.query(`UPDATE users SET ip='${socket.handshake.address}' WHERE uid = '${socket.handshake.query.uid}'`, function(err,result){
if (err) {
return console.log(err)
}
})
let info = result[0]
let bonus = 0
const now = new Date()
let year = now.getFullYear()
let month = Number(now.getMonth() + 1)
let day = now.getDate()
if(month < 10) {
month = `0${month}`
}
if(day < 10) {
day = `0${day}`
}
let time = day + "." + month + "." + year
// сутки = 86400
let usertime = info.lastbonus
if(usertime != time) {
bonus = 1
con.query(`UPDATE users SET bonus = '1' WHERE uid = '${socket.handshake.query.uid}'`, function(err,result){
if (err) {
return console.log(err)
}
})
}
if(usertime == time) {
bonus = 0
con.query(`UPDATE users SET bonus = '0' WHERE uid = '${socket.handshake.query.uid}'`, function(err,result){
if (err) {
return console.log(err)
}
})
}
con.query(`UPDATE users SET online = '1' WHERE uid = '${socket.handshake.query.uid}'`, function(err,result){
if (err) {
return console.log(err)
}
con.query(`SELECT * FROM users WHERE online='1'`, function(err,result){
if (err) {
return console.log(err)
}
socket.emit(`response`,{
'type':'online',
'count':result.length
})
})
})
con.query(`SELECT * FROM users WHERE uid = '${socket.handshake.query.uid}'`, function(err,result){
if (err) {
return console.log(err)
}
if (result[0].rules == 0) {
socket.emit(`response`,{
'type':'noaccess_rules'
})
}
socket.emit(`response`, {
'type':'userdata',
'balance':result[0].balance,
'ban':result[0].ban,
'bonus': bonus
})
})
}
})