mirror of
https://github.com/fosrl/pangolin.git
synced 2026-04-02 16:06:38 +00:00
Revert "enhance: Systemd newt unit instructions"
This commit is contained in:
@@ -2607,9 +2607,6 @@
|
|||||||
"machineClients": "Machine Clients",
|
"machineClients": "Machine Clients",
|
||||||
"install": "Install",
|
"install": "Install",
|
||||||
"run": "Run",
|
"run": "Run",
|
||||||
"envFile": "Environment File",
|
|
||||||
"serviceFile": "Service File",
|
|
||||||
"enableAndStart": "Enable and Start",
|
|
||||||
"clientNameDescription": "The display name of the client that can be changed later.",
|
"clientNameDescription": "The display name of the client that can be changed later.",
|
||||||
"clientAddress": "Client Address (Advanced)",
|
"clientAddress": "Client Address (Advanced)",
|
||||||
"setupFailedToFetchSubnet": "Failed to fetch default subnet",
|
"setupFailedToFetchSubnet": "Failed to fetch default subnet",
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export function NewtSiteInstallCommands({
|
|||||||
|
|
||||||
const commandList: Record<Platform, Record<string, CommandItem[]>> = {
|
const commandList: Record<Platform, Record<string, CommandItem[]>> = {
|
||||||
unix: {
|
unix: {
|
||||||
Direct: [
|
All: [
|
||||||
{
|
{
|
||||||
title: t("install"),
|
title: t("install"),
|
||||||
command: `curl -fsSL https://static.pangolin.net/get-newt.sh | bash`
|
command: `curl -fsSL https://static.pangolin.net/get-newt.sh | bash`
|
||||||
@@ -64,54 +64,6 @@ export function NewtSiteInstallCommands({
|
|||||||
title: t("run"),
|
title: t("run"),
|
||||||
command: `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}`
|
command: `newt --id ${id} --secret ${secret} --endpoint ${endpoint}${acceptClientsFlag}`
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"Systemd Service": [
|
|
||||||
{
|
|
||||||
title: t("install"),
|
|
||||||
command: `curl -fsSL https://static.pangolin.net/get-newt.sh | bash`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("envFile"),
|
|
||||||
command: `# Create the directory and environment file
|
|
||||||
sudo install -d -m 0755 /etc/newt
|
|
||||||
sudo tee /etc/newt/newt.env > /dev/null << 'EOF'
|
|
||||||
NEWT_ID=${id}
|
|
||||||
NEWT_SECRET=${secret}
|
|
||||||
PANGOLIN_ENDPOINT=${endpoint}${!acceptClients ? `
|
|
||||||
DISABLE_CLIENTS=true` : ""}
|
|
||||||
EOF
|
|
||||||
sudo chmod 600 /etc/newt/newt.env`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("serviceFile"),
|
|
||||||
command: `sudo tee /etc/systemd/system/newt.service > /dev/null << 'EOF'
|
|
||||||
[Unit]
|
|
||||||
Description=Newt
|
|
||||||
Wants=network-online.target
|
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
Group=root
|
|
||||||
EnvironmentFile=/etc/newt/newt.env
|
|
||||||
ExecStart=/usr/local/bin/newt
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
UMask=0077
|
|
||||||
|
|
||||||
NoNewPrivileges=true
|
|
||||||
PrivateTmp=true
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("enableAndStart"),
|
|
||||||
command: `sudo systemctl daemon-reload
|
|
||||||
sudo systemctl enable --now newt`
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
windows: {
|
windows: {
|
||||||
@@ -346,7 +298,7 @@ function getPlatformName(platformName: Platform) {
|
|||||||
function getArchitectures(platform: Platform) {
|
function getArchitectures(platform: Platform) {
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case "unix":
|
case "unix":
|
||||||
return ["Direct", "Systemd Service"];
|
return ["All"];
|
||||||
case "windows":
|
case "windows":
|
||||||
return ["x64"];
|
return ["x64"];
|
||||||
case "docker":
|
case "docker":
|
||||||
|
|||||||
Reference in New Issue
Block a user