10 lines
350 B
Bash
10 lines
350 B
Bash
mariadb -u$MARIADB_USER -p$MARIADB_PASSWORD -D $MARIADB_DATABASE <<EOF
|
|
INSERT INTO services
|
|
(service, pattern)
|
|
SELECT 'sync-1.5', '{node}/1.5/{uid}'
|
|
WHERE NOT EXISTS (SELECT 1 FROM services);
|
|
|
|
INSERT INTO nodes
|
|
(\`service\`, node, capacity, available, current_load, downed, backoff)
|
|
VALUES (LAST_INSERT_ID(), '${SYNC_PUBLIC_URL}', 1, 1, 0, 0, 0)
|
|
EOF
|