mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-29 22:23:35 +00:00
Merge branch 'main' into main
This commit is contained in:
@@ -17,10 +17,3 @@ jobs:
|
||||
uses: borales/actions-yarn@v2.0.0
|
||||
with:
|
||||
cmd: test
|
||||
#label:
|
||||
#runs-on: ubuntu-latest
|
||||
#steps:
|
||||
#- name: Labelling pull request
|
||||
#uses: actions/labeler@main
|
||||
#with:
|
||||
#repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
name: Label
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 * * * *"
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Labelling pull request
|
||||
uses: actions/labeler@main
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{ nixpkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
inherit (nixpkgs) pkgs;
|
||||
|
||||
nixPackages = with pkgs; [
|
||||
nodejs-15_x
|
||||
yarn
|
||||
dnsutils
|
||||
certbot
|
||||
];
|
||||
in pkgs.stdenv.mkDerivation {
|
||||
name = "env";
|
||||
buildInputs = nixPackages;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Arthurdw",
|
||||
"email": "mail@arthurdw.com"
|
||||
},
|
||||
"repo": "https://github.com/arthurdw",
|
||||
"record": {
|
||||
"URL": "https://www.arthurdw.com"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "bashoudev",
|
||||
"email": "zionthedev@gmail.com",
|
||||
"twitter": "bashoudev"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "bashoudev.ga"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"description": "Basils' website",
|
||||
"repo": "https://github.com/LowSpecCorgi/LowSpecCorgi.github.io",
|
||||
"owner": {
|
||||
"username": "LowSpecCorgi",
|
||||
"email": "haroldthesenpai@gmail.com",
|
||||
"twitter": "basilicous"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "LowSpeCorgi.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "thetayloredman",
|
||||
"email": "",
|
||||
"telegram": "BadBoyHaloCat"
|
||||
},
|
||||
"description": "Personal website",
|
||||
"record": {
|
||||
"A": ["167.172.157.69"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Bicepsfako's personal developer website",
|
||||
"repo": "https://github.com/Bicepsfako",
|
||||
"owner": {
|
||||
"username": "Bicepsfako",
|
||||
"email": "bicepsfako@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "bicepsfako.netlify.app"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Bots personal developer website",
|
||||
"repo": "https://github.com/Bicepsfako",
|
||||
"owner": {
|
||||
"username": "Bicepsfako",
|
||||
"email": "bicepsfako@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "vascular-barnacle-zfdxk5mcunu4qasmwk8n14na.herokudns.com"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"description": "Discord Bot's Website",
|
||||
"owner": {
|
||||
"username": "brawlie",
|
||||
"email": "tojoeleeofficial@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "brawlie.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"description": "Chandrakant's Work",
|
||||
"owner": {
|
||||
"username": "chandrakaant",
|
||||
"email": "chandrakantpatel23@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "chandrakaant.github.io"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"description": "Chetan's website",
|
||||
"repo": "https://github.com/chetanbasuray/chetanbasuray.github.io",
|
||||
"owner": {
|
||||
"username": "chetanbasuray",
|
||||
"email": "basuraychetan@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "chetanbasuray.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"description": "My site",
|
||||
"owner": {
|
||||
"username": "StalkerMeyr",
|
||||
"email": "andchit223@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["185.87.48.199"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "A website to show off my projects and or just blogs, etc etc.",
|
||||
"repo": "https://github.com/ZeroTwoDevs/connor.github.io",
|
||||
"owner": {
|
||||
"username": "Connor",
|
||||
"email": "halil_ismail@yahoo.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "connordevs.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Student and developer in the United Kingdom.",
|
||||
"repo": "https://github.com/ohlookitsderpy",
|
||||
"record": {
|
||||
"URL": "https://derpyenterprises.org"
|
||||
},
|
||||
"owner": {
|
||||
"username": "ohlookitsderpy",
|
||||
"email": "contact@derpyenterprises.org"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "a discord bot website",
|
||||
"repo": "https://github.com/botstudios",
|
||||
"owner": {
|
||||
"username": "BotStudios",
|
||||
"email": "tojoeleeofficial@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "botstudios.github.io"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -6,6 +6,6 @@
|
||||
"email": "dwii5359@azalelnation.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "azn-us.dwii.me"
|
||||
"URL": "https://github.com/ItzMeDwii"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "github-username",
|
||||
"email": "mail@felixyeung.dev"
|
||||
},
|
||||
"repo": "https://github.com/felixyeungdev",
|
||||
"record": {
|
||||
"URL": "https://felixyeung.dev"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
{
|
||||
"owner": {
|
||||
"username": "gornostay25",
|
||||
"email": "volodia.palamar25+github@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "gornostay25.github.io"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Portfolio redirect for Hokkqi",
|
||||
"repo": "https://werewolf.codes",
|
||||
"owner": {
|
||||
"username": "hokkqi",
|
||||
"email": "lio@werewolf.design"
|
||||
},
|
||||
"record": {
|
||||
"URL": "https://werewolf.design"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "TheLimifiedLime",
|
||||
"email": "",
|
||||
"twitter": "TheLimifiedLime"
|
||||
},
|
||||
"description": "I will use this to redirect to my main domain",
|
||||
"repo": "https://github.com/TheLimifiedLime/issai.club",
|
||||
"record": {
|
||||
"URL": "https://issai.club"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "my personal website",
|
||||
"repo": "https://github.com/teamjoelee/me",
|
||||
"owner": {
|
||||
"username": "teamjoelee",
|
||||
"email": "tojoeleeofficial@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "teamjoelee.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Personal website of Johnson Lee",
|
||||
"repo": "https://github.com/johnsonlee/johnsonlee.github.io",
|
||||
"owner": {
|
||||
"username": "johnsonlee",
|
||||
"email": "g.johnsonlee@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "johnsonlee.github.io"
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"repo": "https://github.com/LeonskiDev/leonskidev.github.io",
|
||||
"description": "This is my portfolio website, if possible I'll also have bodged.is-a.dev as my blog.",
|
||||
"repo": "https://github.com/LeonskiDev/leonskidev",
|
||||
"owner": {
|
||||
"username": "LeonskiDev",
|
||||
"email": "bodged@pm.me"
|
||||
@@ -8,4 +7,4 @@
|
||||
"record": {
|
||||
"CNAME": "leonskidev.github.io"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "LinkerScript",
|
||||
"email": "min@effobe.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "6498c941-9031-4e57-9fc0-12716fa187f4.repl.co"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Homepage redirect for Lio",
|
||||
"repo": "https://werewolf.codes",
|
||||
"owner": {
|
||||
"username": "hokkqi",
|
||||
"email": "lio@werewolf.design"
|
||||
},
|
||||
"record": {
|
||||
"URL": "https://himbo.cat"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "LlamaLad7's personal website",
|
||||
"repo": "https://github.com/LlamaLad7/llamalad7.github.io",
|
||||
"owner": {
|
||||
"username": "LlamaLad7",
|
||||
"email": "l3gomindstorms@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "llamalad7.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "magic4me",
|
||||
"email": "magic4me.info@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "magic4me.github.io"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"description": "Muchenski's personal developer website",
|
||||
"repo": "https://github.com/HenriqueMuchenski/henriquemuchenski.github.io",
|
||||
"repo": "https://github.com/Muchenski/muchenski.github.io",
|
||||
"owner": {
|
||||
"username": "HenriqueMuchenski",
|
||||
"email": "hjmuchenski@gmail.com"
|
||||
"username": "Muchenski",
|
||||
"email": "muchenski.dev@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "henriquemuchenski.github.io"
|
||||
"CNAME": "muchenski.github.io"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Nalin-2005",
|
||||
"email": "nalinstudios@gmail.com",
|
||||
"instagram": "nalin_2005"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "b4f4e7ae-64fc-4026-8e24-2077517e7d67.repl.co"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"description": "A noxsin's webpage",
|
||||
"repo": "https://github.com/komysh/komysh.github.io",
|
||||
"owner": {
|
||||
"username": "komysh",
|
||||
"email": "arcteac@gmail.com",
|
||||
"telegram": "@mentolbot"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "komysh.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "okyanusoz",
|
||||
"email": "",
|
||||
"github": "okyanusoz"
|
||||
},
|
||||
"record": {
|
||||
"URL": "https://github.com/okyanusoz"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -5,6 +5,6 @@
|
||||
"email": "bhangalepiyush@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"URL": "https://piyush.codes"
|
||||
"URL": "https://officialpiyush.github.io"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@
|
||||
"email": "u.hello@kakao.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "u.hellomo.me"
|
||||
"CNAME": "dev.is.moart.media"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "RiceCX",
|
||||
"email": "andyl5463@gmail.com"
|
||||
},
|
||||
"description": "Hosting dev.",
|
||||
"record": {
|
||||
"CNAME": "doujinfucks.tk"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"description": "Roig's website",
|
||||
"repo": "https://github.com/groig",
|
||||
"owner": {
|
||||
"username": "groig",
|
||||
"email": "groig@protonmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": [
|
||||
"152.206.177.19"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"description": "link for github pages",
|
||||
"repo": "https://github.com/TorchedSammy/torchedsammy.github.io",
|
||||
"owner": {
|
||||
"username": "TorchedSammy",
|
||||
"email": "torchedsammy@gmail.com",
|
||||
"twitter": "TorchedSammy"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "torchedsammy.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"description": "A personal portfolio site for all my projects.",
|
||||
"owner": {
|
||||
"username": "scythe",
|
||||
"email": "scythetheedev@outlook.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "e0e8c1e9-55a5-4394-afd9-10de3434aee8.repl.co"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"description": "Aleksandr Polyakov's personal site",
|
||||
"owner": {
|
||||
"username": "sfsef",
|
||||
"email": "sfsef.official@yandex.ru"
|
||||
},
|
||||
"record": {
|
||||
"URL": "https://sfsef.me"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Snowflake's personal developer website",
|
||||
"repo": "https://github.com/snowflake107",
|
||||
"owner": {
|
||||
"username": "snowflake107",
|
||||
"email": "devsnowflake107@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "itzsnowflakex.netlify.app"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "This website is a link to my personal developer portfolio.",
|
||||
"repo": "https://github.com/loltdmmmos/loltdmmmos.github.io",
|
||||
"owner": {
|
||||
"username": "LolTDMMMOs",
|
||||
"email": "paymentstdm@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "loltdmmmos.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "A simple portfolio website by me (Tejas Agarwal)",
|
||||
"repo": "https://github.com/tejasag/webpage",
|
||||
"owner": {
|
||||
"username": "tejasag",
|
||||
"email": "togedemaru.1707@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"URL": "https://tejasagarwal.vercel.app/"
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
{
|
||||
"description": "my nickname, for using with github pages",
|
||||
"repo": "https://github.com/termonoid/termonoid.github.io",
|
||||
"description": "Domain for personal server",
|
||||
"repo": "https://github.com/Termonoid/",
|
||||
"owner": {
|
||||
"username": "Termonoid",
|
||||
"email": "termonoid@cumallover.me",
|
||||
"telegram": "termonoid"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "termonoid.github.io"
|
||||
"A": [
|
||||
"51.75.248.116"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"description": "Tyman's personal developer website",
|
||||
"repo": "https://github.com/TymanWasTaken/tyman.tech",
|
||||
"owner": {
|
||||
"username": "TymanWasTaken",
|
||||
"email": "",
|
||||
"discord": "Tyman#7318"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "tyman.tech"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Personal blog",
|
||||
"repo": "https://github.com/CwhiteKJ/CwhiteKJ.github.io",
|
||||
"owner": {
|
||||
"username": "CwhiteKJ",
|
||||
"email": "whitekj1221@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "CwhiteKJ.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "references for my npm packages",
|
||||
"repo": "https://github.com/teamjoelee",
|
||||
"owner": {
|
||||
"username": "teamjoelee",
|
||||
"email": "tojoeleeofficial@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "hosting.gitbook.io"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -4,9 +4,9 @@
|
||||
"owner": {
|
||||
"username": "WilloIzCitron",
|
||||
"email": "",
|
||||
"twitter": "tegasaziz"
|
||||
"twitter": "willoizcitron"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "willoizcitron.github.io"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"repo": "https://github.com/wonderlandpark/yerin-is-a-dev",
|
||||
"owner": {
|
||||
"username": "wonderlandpark",
|
||||
"email": "wonderlandpark@callisto.team"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "wonderlandpark.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Pratham Yadav Portfolio",
|
||||
"repo": "https://github.com/ypratham/portfolio.github.io",
|
||||
"owner": {
|
||||
"username": "ypratahm",
|
||||
"email": "ypratham0014@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "ypratham.github.io"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"description": "ZeroTwo's Website",
|
||||
"description": "The site for ZeroTwo's docs.",
|
||||
"repo": "https://github.com/ZeroTwoDev",
|
||||
"owner": {
|
||||
"username": "ZeroTwoDev",
|
||||
"email": "zerotwo@zerotwo.bot"
|
||||
"email": "halil_ismail@yahoo.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "zerotwodev.github.io"
|
||||
"CNAME": "hosting.gitbook.io"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+100
@@ -0,0 +1,100 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export ENV=production
|
||||
DRY_RUN=0
|
||||
if_dry_run() { [[ $DRY_RUN == 1 ]] && echo "$1" || echo "$2"; }
|
||||
|
||||
generate_certificate() {
|
||||
outdir=$(mktemp -d /tmp/is-a-dev-certbot.XXXXX);
|
||||
|
||||
certbot \
|
||||
--config-dir $outdir/config \
|
||||
--work-dir $outdir/work \
|
||||
--logs-dir $outdir/logs \
|
||||
certonly \
|
||||
--manual \
|
||||
-m 'phenax5@gmail.com' \
|
||||
-d '*.is-a.dev,is-a.dev' \
|
||||
$(if_dry_run "--dry-run" "");
|
||||
|
||||
echo "+-----------------------------------------------+";
|
||||
echo "| Certificates output to: |";
|
||||
echo "| $outdir |";
|
||||
echo "+-----------------------------------------------+";
|
||||
}
|
||||
|
||||
update_record() {
|
||||
local method=$([[ "$1" == "add" ]] && echo "addZoneRecord" || echo "removeZoneRecord");
|
||||
local type="$2";
|
||||
local name="$3";
|
||||
local address="$4";
|
||||
local ttl=${5:-"1"};
|
||||
echo "
|
||||
const { domainService } = require('./utils/domain-service');
|
||||
const { ENV, DOMAIN_DOMAIN } = require('./utils/constants');
|
||||
const record = {
|
||||
name: '$name',
|
||||
type: '$type',
|
||||
address: '$address',
|
||||
ttl: $ttl,
|
||||
};
|
||||
console.log('Uploading $name to', DOMAIN_DOMAIN, '(', ENV, ')...');
|
||||
domainService.$method(record)()
|
||||
.then(d => console.log(d.cpanelresult ? d.cpanelresult.data : d))
|
||||
.catch(console.error);
|
||||
" | node -
|
||||
}
|
||||
|
||||
update_acme_txt_record() {
|
||||
update_record add TXT '_acme-challenge' "$1";
|
||||
}
|
||||
|
||||
update_www_record() {
|
||||
update_record remove CNAME 'www' "is-a-dev.github.io";
|
||||
sleep 1;
|
||||
update_record add A 'www' "68.65.123.44";
|
||||
}
|
||||
|
||||
upload_acme_file() {
|
||||
local key="$1";
|
||||
local value="$2";
|
||||
echo "
|
||||
const { cpanel } = require('./utils/lib/cpanel');
|
||||
const { ENV, DOMAIN_DOMAIN, DOMAIN_USER } = require('./utils/constants');
|
||||
|
||||
const file = {
|
||||
dir: '/home/' + DOMAIN_USER + '/public_html/.well-known/acme-challenge',
|
||||
file: '$key',
|
||||
content: '$value',
|
||||
};
|
||||
|
||||
console.log('Uploading acme validation file to', DOMAIN_DOMAIN, '(', ENV, ')...');
|
||||
cpanel.file.write(file).then(console.log).catch(console.error);
|
||||
" | node -;
|
||||
}
|
||||
|
||||
reset_acme() {
|
||||
update_record remove A 'www.is-a.dev' "68.65.123.44";
|
||||
sleep 1;
|
||||
update_record add CNAME 'www.is-a.dev' "is-a-dev.github.io";
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
check)
|
||||
echo "TXT record:: $(dig +noall +answer _acme-challenge.is-a.dev TXT | awk '{print $5}')";
|
||||
;;
|
||||
acme_txt) update_acme_txt_record "$2" ;;
|
||||
acme_file) upload_acme_file "$2" "$3" ;;
|
||||
cert) generate_certificate ;;
|
||||
reset) reset_acme ;;
|
||||
*) echo "Invalid command"; exit 1; ;;
|
||||
esac
|
||||
|
||||
|
||||
### STEPS ###
|
||||
# Run ./scripts/certbot.sh cert
|
||||
# Run ./scripts/certbot.sh acme_txt "<key>"
|
||||
# Run ./scripts/certbot.sh acme_file "<key>" "<value>"
|
||||
# Upload cert.pem and privkey.pem contents to SSL > Manage SSL Sites
|
||||
# Run ./scripts/certbot.sh reset
|
||||
|
||||
@@ -18,6 +18,7 @@ const recordToZone = ({ name, type, address, id }) => ({
|
||||
type,
|
||||
address,
|
||||
...(type === 'CNAME' ? { cname: address } : {}),
|
||||
...(type === 'TXT' ? { txtdata: address } : {}),
|
||||
});
|
||||
|
||||
const cleanName = name => name === DOMAIN_DOMAIN ? '@' : `${name}`.replace(new RegExp(`\\.${DOMAIN_DOMAIN}\\.?$`), '').toLowerCase();
|
||||
@@ -114,7 +115,7 @@ const getDomainService = ({ cpanel }) => {
|
||||
return { added: add.length, removed: remove.length };
|
||||
};
|
||||
|
||||
return { getHosts, updateHosts };
|
||||
return { getHosts, addZoneRecord, removeZoneRecord, updateHosts };
|
||||
};
|
||||
|
||||
const domainService = getDomainService({ cpanel });
|
||||
|
||||
@@ -64,6 +64,9 @@ const CpanelClient = (options) => {
|
||||
// -> {}
|
||||
remove: uapi('Mime', 'delete_redirect'),
|
||||
},
|
||||
file: {
|
||||
write: uapi('Fileman', 'save_file_content', { from_charset: 'UTF-8', to_charset: 'UTF-8', fallback: 1 }),
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user