From 62481fdb6df623cd6f64e666774add24ba134c85 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Mon, 13 Nov 2023 14:44:17 -0500 Subject: [PATCH 01/42] Add design tokens --- packages/manager/package.json | 1 + .../manager/src/foundations/themes/light.ts | 262 +++++++++--------- yarn.lock | 173 +++++++++++- 3 files changed, 305 insertions(+), 131 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index 2fa04c2c624..fee38495b0b 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -16,6 +16,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@linode/api-v4": "*", + "@linode/design-language-system": "^0.0.11", "@linode/validation": "*", "@mui/icons-material": "^5.14.7", "@mui/material": "^5.14.7", diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index d31a0d04eda..9db17ebabfc 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -1,3 +1,4 @@ +import { Buttons, Colors } from '@linode/design-language-system/cloudmanager'; import { ThemeOptions } from '@mui/material/styles'; import { breakpoints } from 'src/foundations/breakpoints'; @@ -6,75 +7,75 @@ import { latoWeb } from 'src/foundations/fonts'; const inputMaxWidth = 416; export const bg = { - app: '#f4f5f6', - bgAccessRow: '#fafafa', + app: Colors.Neutrals[5], + bgAccessRow: Colors.Neutrals[5], bgAccessRowTransparentGradient: 'rgb(255, 255, 255, .001)', - bgPaper: '#ffffff', - lightBlue1: '#f0f7ff', - lightBlue2: '#e5f1ff', - main: '#f4f4f4', - mainContentBanner: '#33373d', - offWhite: '#fbfbfb', - primaryNavPaper: '#3a3f46', - tableHeader: '#f9fafa', - white: '#fff', + bgPaper: Colors.Neutrals.White, + lightBlue1: Colors.Brand[10], + lightBlue2: Colors.Brand[40], + main: Colors.Neutrals[5], + mainContentBanner: Colors.Neutrals[100], + offWhite: Colors.Neutrals[5], + primaryNavPaper: Colors.Neutrals[100], + tableHeader: Colors.Neutrals[5], + white: Colors.Neutrals.White, } as const; const primaryColors = { - dark: '#2466b3', - divider: '#f4f4f4', - headline: '#32363c', - light: '#4d99f1', - main: '#3683dc', - text: '#606469', - white: '#fff', + dark: Colors.Brand[90], + divider: Colors.Neutrals[5], + headline: Colors.Neutrals[100], + light: Colors.Brand[60], + main: Colors.Brand[80], + text: Colors.Neutrals[70], + white: Colors.Neutrals.White, }; export const color = { - black: '#222', - blue: '#3683dc', - blueDTwhite: '#3683dc', - border2: '#c5c6c8', - border3: '#eee', - boxShadow: '#ddd', - boxShadowDark: '#aaa', - disabledText: '#c9cacb', + black: Colors.Neutrals.Black, + blue: Colors.Brand[80], + blueDTwhite: Colors.Brand[80], + border2: Colors.Neutrals[40], + border3: Colors.Neutrals[20], + boxShadow: Colors.Neutrals[30], + boxShadowDark: Colors.Neutrals[50], + disabledText: Colors.Neutrals[40], drawerBackdrop: 'rgba(255, 255, 255, 0.5)', - green: '#00b159', - grey1: '#abadaf', - grey2: '#e7e7e7', - grey3: '#ccc', - grey4: '#8C929D', - grey5: '#f5f5f5', - grey6: '#e3e5e8', - grey7: '#e9eaef', - grey8: '#dbdde1', - grey9: '#f4f5f6', + green: Colors.Green[70], + grey1: Colors.Neutrals[50], + grey2: Colors.Neutrals[30], + grey3: Colors.Neutrals[40], + grey4: Colors.Neutrals[60], + grey5: Colors.Neutrals[5], + grey6: Colors.Neutrals[30], + grey7: Colors.Neutrals[20], + grey8: Colors.Neutrals[30], + grey9: Colors.Neutrals[5], headline: primaryColors.headline, - label: '#555', - offBlack: '#444', - orange: '#ffb31a', - red: '#ca0813', + label: Colors.Neutrals[70], + offBlack: Colors.Neutrals[90], + orange: Colors.Amber[70], + red: Colors.Red[70], tableHeaderText: 'rgba(0, 0, 0, 0.54)', - tagButton: '#f1f7fd', - tagIcon: '#7daee8', - teal: '#17cf73', - white: '#fff', - yellow: '#fecf2f', + tagButton: Colors.Brand[10], + tagIcon: Colors.Brand[60], + teal: Colors.Teal[70], + white: Colors.Neutrals.White, + yellow: Colors.Yellow[70], } as const; export const textColors = { - headlineStatic: '#32363c', - linkActiveLight: '#2575d0', - tableHeader: '#888f91', - tableStatic: '#606469', - textAccessTable: '#606469', + headlineStatic: Colors.Neutrals[100], + linkActiveLight: Colors.Brand[80], + tableHeader: Colors.Neutrals[60], + tableStatic: Colors.Neutrals[70], + textAccessTable: Colors.Neutrals[70], } as const; export const borderColors = { - borderTable: '#f4f5f6', - borderTypography: '#e3e5e8', - divider: '#e3e5e8', + borderTable: Colors.Neutrals[5], + borderTypography: Colors.Neutrals[30], + divider: Colors.Neutrals[30], } as const; const iconCircleAnimation = { @@ -222,8 +223,8 @@ export const lightTheme: ThemeOptions = { transition: 'color 400ms cubic-bezier(0.4, 0, 0.2, 1) 0ms', }, '& svg': { - fill: '#2575d0', - stroke: '#2575d0', + fill: Colors.Brand[80], + stroke: Colors.Brand[80], }, '&.Mui-expanded': { '& .caret': { @@ -268,7 +269,7 @@ export const lightTheme: ThemeOptions = { }, paddingRight: 4, svg: { - color: '#aaa', + color: Colors.Neutrals[40], }, top: 'unset', }, @@ -353,7 +354,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { colorDefault: { backgroundColor: 'unset', - color: '#c9c7c7', + color: Colors.Neutrals[40], // TODO: This was the closest color according to our palette }, }, }, @@ -375,16 +376,17 @@ export const lightTheme: ThemeOptions = { backgroundColor: primaryColors.text, }, '&:active': { - backgroundColor: primaryColors.dark, + backgroundColor: Buttons.Primary.Hover.Background, // TODO: We need an active token }, '&:disabled': { - color: 'white', + backgroundColor: Buttons.Primary.Disabled.Background, + color: Buttons.Primary.Disabled.Text, }, '&:hover, &:focus': { - backgroundColor: '#226dc3', + backgroundColor: Buttons.Primary.Hover.Background, }, - backgroundColor: primaryColors.main, - color: '#fff', + backgroundColor: Buttons.Primary.Default.Background, + color: Buttons.Primary.Default.Text, padding: '2px 20px', }, containedSecondary: { @@ -394,26 +396,26 @@ export const lightTheme: ThemeOptions = { }, '&:active': { backgroundColor: 'transparent', - borderColor: primaryColors.dark, - color: primaryColors.dark, + borderColor: Buttons.Secondary.Hover.Text, // TODO: We need an ACTIVE token + color: Buttons.Secondary.Hover.Text, // TODO: We need an ACTIVE token }, '&:disabled': { backgroundColor: 'transparent', - borderColor: '#c9cacb', - color: '#c9cacb', + borderColor: Buttons.Secondary.Disabled.Text, + color: Buttons.Secondary.Disabled.Text, }, '&:hover, &:focus': { backgroundColor: 'transparent', - color: textColors.linkActiveLight, + color: Buttons.Secondary.Hover.Text, }, backgroundColor: 'transparent', - color: textColors.linkActiveLight, + color: Buttons.Secondary.Default.Text, }, outlined: { '&:hover, &:focus': { - backgroundColor: '#f5f8ff', - border: '1px solid #d7dfed', - color: '#2575d0', + backgroundColor: Colors.Neutrals[5], // TODO: This was the closest color according to our palette + border: `1px solid ${Colors.Neutrals[30]}`, // TODO: This was the closest color according to our palette + color: Colors.Brand[80], }, backgroundColor: 'transparent', border: `1px solid ${primaryColors.main}`, @@ -448,14 +450,14 @@ export const lightTheme: ThemeOptions = { minWidth: 0, }, root: { - backgroundColor: '#fbfbfb', + backgroundColor: Colors.Neutrals[5], }, }, }, MuiCheckbox: { styleOverrides: { root: { - color: '#ccc', + color: Colors.Neutrals[40], }, }, }, @@ -463,12 +465,12 @@ export const lightTheme: ThemeOptions = { styleOverrides: { clickable: { '&:focus': { - backgroundColor: '#cce2ff', + bbackgroundColor: Colors.Brand[40], // TODO: This was the closest color according to our palette }, '&:hover': { - backgroundColor: '#cce2ff', + bbackgroundColor: Colors.Brand[40], // TODO: This was the closest color according to our palette }, - backgroundColor: '#e5f1ff', + backgroundColor: Colors.Brand[10], // TODO: This was the closest color according to our palette }, colorError: { color: color.white, @@ -506,7 +508,7 @@ export const lightTheme: ThemeOptions = { }, root: { '&:focus': { - outline: '1px dotted #999', + outline: `1px dotted ${Colors.Neutrals[60]}`, // TODO: This was the closest color according to our palette }, '&:last-child': { marginRight: 0, @@ -546,7 +548,7 @@ export const lightTheme: ThemeOptions = { MuiDialog: { styleOverrides: { paper: { - boxShadow: '0 0 5px #bbb', + boxShadow: `0 0 5px ${Colors.Neutrals[50]}`, // TODO: This was the closest color according to our palette [breakpoints.down('sm')]: { margin: 24, maxHeight: 'calc(100% - 48px)', @@ -583,7 +585,7 @@ export const lightTheme: ThemeOptions = { '& h2': { lineHeight: 1.2, }, - borderBottom: '1px solid #eee', + borderBottom: `1px solid ${Colors.Neutrals[20]}`, color: primaryColors.headline, marginBottom: 20, padding: '16px 24px', @@ -602,7 +604,7 @@ export const lightTheme: ThemeOptions = { MuiDrawer: { styleOverrides: { paper: { - boxShadow: '0 0 5px #bbb', + boxShadow: `0 0 5px ${Colors.Neutrals[50]}`, // TODO: This was the closest color according to our palette /** @todo This is breaking typing. */ // overflowY: 'overlay', display: 'block', @@ -616,7 +618,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { root: { '&.copy > div': { - backgroundColor: '#f4f4f4', + backgroundColor: Colors.Neutrals[5], }, [breakpoints.down('xs')]: { width: '100%', @@ -650,7 +652,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { root: { '&$error': { - color: '#ca0813', + color: Colors.Red[70], }, fontSize: '0.875rem', lineHeight: 1.25, @@ -662,16 +664,16 @@ export const lightTheme: ThemeOptions = { styleOverrides: { root: { '&$disabled': { - color: '#555', + color: Colors.Neutrals[70], opacity: 0.5, }, '&$error': { - color: '#555', + color: Colors.Neutrals[70], }, '&.Mui-focused': { - color: '#555', + color: Colors.Neutrals[70], }, - color: '#555', + color: Colors.Neutrals[70], fontFamily: latoWeb.bold, fontSize: '.875rem', marginBottom: 8, @@ -723,32 +725,32 @@ export const lightTheme: ThemeOptions = { root: { '& svg': { '&:hover': { - color: '#5e9aea', + color: Colors.Brand[60], }, color: primaryColors.main, fontSize: 18, }, '&$disabled': { - borderColor: '#ccc', + borderColor: Colors.Neutrals[40], color: 'rgba(0, 0, 0, 0.75)', opacity: 0.5, }, '&.Mui-error': { - borderColor: '#ca0813', + borderColor: Colors.Red[70], }, '&.Mui-focused': { '& .select-option-icon': { paddingLeft: `30px !important`, }, borderColor: primaryColors.main, - boxShadow: '0 0 2px 1px #e1edfa', + boxShadow: `0 0 2px 1px ${Colors.Neutrals[30]}`, }, '&.affirmative': { - borderColor: '#00b159', + borderColor: Colors.Green[70], }, alignItems: 'center', - backgroundColor: '#fff', - border: '1px solid #ccc', + backgroundColor: Colors.Neutrals.White, + border: `1px solid ${Colors.Neutrals[40]}`, boxSizing: 'border-box', [breakpoints.down('xs')]: { maxWidth: '100%', @@ -772,13 +774,13 @@ export const lightTheme: ThemeOptions = { [breakpoints.only('xs')]: { fontSize: '1rem', }, - color: '#606469', + color: Colors.Neutrals[70], fontSize: '0.9rem', }, [breakpoints.only('xs')]: { fontSize: '1rem', }, - color: '#606469', + color: Colors.Neutrals[70], fontSize: '0.9rem', whiteSpace: 'nowrap', }, @@ -807,7 +809,7 @@ export const lightTheme: ThemeOptions = { MuiLinearProgress: { styleOverrides: { colorPrimary: { - backgroundColor: '#b7d6f9', + backgroundColor: Colors.Brand[40], // TODO: This was the closest color according to our palette }, }, }, @@ -928,7 +930,7 @@ export const lightTheme: ThemeOptions = { MuiPaper: { styleOverrides: { outlined: { - border: '1px solid #e7e7e7', + border: `1px solid ${Colors.Neutrals[30]}`, }, root: {}, rounded: { @@ -940,7 +942,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { paper: { borderRadius: 0, - boxShadow: '0 0 5px #ddd', + boxShadow: `0 0 5px ${Colors.Neutrals[30]}`, [breakpoints.up('lg')]: { minWidth: 250, }, @@ -975,10 +977,10 @@ export const lightTheme: ThemeOptions = { }, '&.Mui-disabled': { '& .defaultFill': { - fill: '#f4f4f4', + fill: Colors.Neutrals[5], }, - color: '#ccc !important', - fill: '#f4f4f4 !important', + color: `${Colors.Neutrals[40]} !important`, + fill: `${Colors.Neutrals[5]} !important`, pointerEvents: 'none', }, '&:hover': { @@ -988,7 +990,7 @@ export const lightTheme: ThemeOptions = { color: theme.palette.primary.main, fill: theme.color.white, }, - color: '#ccc', + color: Colors.Neutrals[40], padding: '10px 10px', transition: theme.transitions.create(['color']), }), @@ -998,7 +1000,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { disabled: {}, icon: { - color: '#aaa !important', + color: `${Colors.Neutrals[50]} !important`, height: 28, marginRight: 4, marginTop: -2, @@ -1032,8 +1034,8 @@ export const lightTheme: ThemeOptions = { backgroundColor: 'white', borderLeft: `6px solid transparent`, borderRadius: 4, - boxShadow: '0 0 5px #ddd', - color: '#606469', + boxShadow: `0 0 5px ${Colors.Neutrals[30]}`, + color: Colors.Neutrals[70], }, }, }, @@ -1066,8 +1068,8 @@ export const lightTheme: ThemeOptions = { '& $disabled': { '&$switchBase': { '& + $track': { - backgroundColor: '#ddd', - borderColor: '#ccc', + backgroundColor: Colors.Neutrals[30], + borderColor: Colors.Neutrals[40], }, '& .square': { fill: 'white', @@ -1105,15 +1107,15 @@ export const lightTheme: ThemeOptions = { }, '&.Mui-disabled': { '& +.MuiSwitch-track': { - backgroundColor: '#ddd', - borderColor: '#ccc', + backgroundColor: Colors.Neutrals[30], + borderColor: Colors.Neutrals[40], }, }, color: primaryColors.main, padding: 16, }, track: { - backgroundColor: '#C9CACB', + backgroundColor: Colors.Neutrals[40], borderRadius: 1, boxSizing: 'content-box', height: 24, @@ -1161,7 +1163,7 @@ export const lightTheme: ThemeOptions = { selected: {}, textColorPrimary: { '&$selected': { - color: '#32363c', + color: Colors.Neutrals[100], }, }, }, @@ -1193,7 +1195,7 @@ export const lightTheme: ThemeOptions = { MuiTableRow: { styleOverrides: { head: { - backgroundColor: '#fbfbfb', + backgroundColor: Colors.Neutrals[5], height: 'auto', }, hover: { @@ -1211,7 +1213,7 @@ export const lightTheme: ThemeOptions = { root: { '&:hover, &:focus': { '&$hover': { - backgroundColor: '#fbfbfb', + backgroundColor: Colors.Neutrals[5], [breakpoints.up('md')]: { boxShadow: `inset 5px 0 0 ${primaryColors.main}`, }, @@ -1243,7 +1245,7 @@ export const lightTheme: ThemeOptions = { color: textColors.tableHeader, }, '&:focus': { - outline: '1px dotted #999', + outline: `1px dotted ${Colors.Neutrals[60]}`, // TODO: This was the closest color according to our palette }, '&:hover': { color: primaryColors.main, @@ -1290,7 +1292,7 @@ export const lightTheme: ThemeOptions = { width: 38, }, }, - boxShadow: 'inset 0 -1px 0 #c5c6c8', + boxShadow: `inset 0 -1px 0 ${Colors.Neutrals[40]}`, margin: '16px 0', minHeight: 48, position: 'relative', @@ -1308,12 +1310,12 @@ export const lightTheme: ThemeOptions = { tooltip: { backgroundColor: 'white', borderRadius: 0, - boxShadow: '0 0 5px #bbb', + boxShadow: `0 0 5px ${Colors.Neutrals[50]}`, // TODO: This was the closest color according to our palette [breakpoints.up('sm')]: { fontSize: '.9rem', padding: '8px 10px', }, - color: '#606469', + color: Colors.Neutrals[70], maxWidth: 200, textAlign: 'left', }, @@ -1348,7 +1350,7 @@ export const lightTheme: ThemeOptions = { maxHeight: 34, minWidth: 100, }, - color: '#fff', + color: Colors.Neutrals.White, cursor: 'pointer', fontFamily: latoWeb.bold, fontSize: '1rem', @@ -1436,30 +1438,30 @@ export const lightTheme: ThemeOptions = { }, divider: primaryColors.divider, error: { - dark: color.red, - light: color.red, - main: color.red, + dark: Colors.Red[70], + light: Colors.Red[10], + main: Colors.Red[40], }, info: { - dark: '#3682dd', - light: '#d7e3ef', - main: '#d7e3ef', + dark: Colors.Ultramarine[70], + light: Colors.Ultramarine[10], + main: Colors.Ultramarine[40], }, mode: 'light', primary: primaryColors, secondary: primaryColors, success: { - dark: '#00b159', - light: '#00b159', - main: '#00b159', + dark: Colors.Green[70], + light: Colors.Green[10], + main: Colors.Green[40], }, text: { primary: primaryColors.text, }, warning: { - dark: '#ffd002', - light: '#ffd002', - main: '#ffd002', + dark: Colors.Amber[70], + light: Colors.Amber[10], + main: Colors.Amber[40], }, }, shadows: [ diff --git a/yarn.lock b/yarn.lock index 5e7ffdbc62c..b6645803d60 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2560,6 +2560,13 @@ resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919" integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== +"@linode/design-language-system@^0.0.11": + version "0.0.11" + resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-0.0.11.tgz#9b7a5ef48e9f234d0035fec55cd5a4216bcf74db" + integrity sha512-x6ha8lTSu1UNiqqg5jh6tj6m8VZiPXblbfGc/mjUy9ptixDm1ctBIgOO1366jb6rEJnesh/015yOq3Eqo3P8sA== + dependencies: + style-dictionary "^3.7.2" + "@linode/eslint-plugin-cloud-manager@^0.0.3": version "0.0.3" resolved "https://registry.yarnpkg.com/@linode/eslint-plugin-cloud-manager/-/eslint-plugin-cloud-manager-0.0.3.tgz#dcb78ab36065bf0fb71106a586c1f3f88dbf840a" @@ -6189,6 +6196,14 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +camel-case@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" + integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== + dependencies: + pascal-case "^3.1.2" + tslib "^2.0.3" + camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -6228,6 +6243,15 @@ canvg@^3.0.6: stackblur-canvas "^2.0.0" svg-pathdata "^6.0.3" +capital-case@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" + integrity sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + upper-case-first "^2.0.2" + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -6294,6 +6318,24 @@ chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +change-case@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-4.1.2.tgz#fedfc5f136045e2398c0410ee441f95704641e12" + integrity sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A== + dependencies: + camel-case "^4.1.2" + capital-case "^1.0.4" + constant-case "^3.0.4" + dot-case "^3.0.4" + header-case "^2.0.4" + no-case "^3.0.4" + param-case "^3.0.4" + pascal-case "^3.1.2" + path-case "^3.0.4" + sentence-case "^3.0.4" + snake-case "^3.0.4" + tslib "^2.0.3" + change-emitter@^0.1.2: version "0.1.6" resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515" @@ -6618,6 +6660,11 @@ commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== +commander@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + common-tags@^1.8.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -6683,6 +6730,15 @@ concurrently@^4.1.1: resolved "https://registry.yarnpkg.com/consolidated-events/-/consolidated-events-2.0.2.tgz#da8d8f8c2b232831413d9e190dc11669c79f4a91" integrity sha512-2/uRVMdRypf5z/TW/ncD/66l75P5hH2vM/GR8Jf8HLc2xnfJtmina6F6du8+v4Z2vTrMo7jC+W1tmEEuuELgkQ== +constant-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-3.0.4.tgz#3b84a9aeaf4cf31ec45e6bf5de91bdfb0589faf1" + integrity sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + upper-case "^2.0.2" + content-disposition@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" @@ -7344,6 +7400,14 @@ domutils@^3.0.1: domelementtype "^2.3.0" domhandler "^5.0.1" +dot-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" + integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + dotenv-expand@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37" @@ -8700,6 +8764,15 @@ fs-extra@>=5, fs-extra@^11.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^9.0.0, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -9136,6 +9209,14 @@ he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +header-case@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/header-case/-/header-case-2.0.4.tgz#5a42e63b55177349cf405beb8d775acabb92c063" + integrity sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q== + dependencies: + capital-case "^1.0.4" + tslib "^2.0.3" + headers-polyfill@3.2.5: version "3.2.5" resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.2.5.tgz#6e67d392c9d113d37448fe45014e0afdd168faed" @@ -10715,7 +10796,7 @@ json5@^2.2.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonc-parser@^3.2.0: +jsonc-parser@^3.0.0, jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== @@ -11135,6 +11216,13 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3 dependencies: js-tokens "^3.0.0 || ^4.0.0" +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -11629,6 +11717,14 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + node-dir@^0.1.17: version "0.1.17" resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" @@ -12044,6 +12140,14 @@ pako@~0.2.0: resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" integrity sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA== +param-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" + integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -12099,6 +12203,14 @@ parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +pascal-case@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" + integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" @@ -12124,6 +12236,14 @@ patch-package@^7.0.0: tmp "^0.0.33" yaml "^2.2.2" +path-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-3.0.4.tgz#9168645334eb942658375c56f80b4c0cb5f82c6f" + integrity sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -13594,6 +13714,15 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" +sentence-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-3.0.4.tgz#3645a7b8c117c787fde8702056225bb62a45131f" + integrity sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + upper-case-first "^2.0.2" + serve-handler@6.1.5: version "6.1.5" resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.5.tgz#a4a0964f5c55c7e37a02a633232b6f0d6f068375" @@ -13791,6 +13920,14 @@ slice-ansi@^5.0.0: ansi-styles "^6.0.0" is-fullwidth-code-point "^4.0.0" +snake-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" + integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -14223,6 +14360,21 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== +style-dictionary@^3.7.2: + version "3.9.0" + resolved "https://registry.yarnpkg.com/style-dictionary/-/style-dictionary-3.9.0.tgz#c89ba60b81a821c52515ae45d5e5c2da41c34546" + integrity sha512-mnq8QfPJoj3ellKHRKZwmCgYUGgwYtoagW5edyKpR09O1W4/XqBdeKXoY/LbeIKqHrqVR7sGgk6E/dNYkPS4aA== + dependencies: + chalk "^4.0.0" + change-case "^4.1.2" + commander "^8.3.0" + fs-extra "^10.0.0" + glob "^7.2.0" + json5 "^2.2.2" + jsonc-parser "^3.0.0" + lodash "^4.17.15" + tinycolor2 "^1.4.1" + stylis@4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7" @@ -14477,6 +14629,11 @@ tiny-warning@^1.0.0, tiny-warning@^1.0.2, tiny-warning@^1.0.3: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== +tinycolor2@^1.4.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.6.0.tgz#f98007460169b0263b97072c5ae92484ce02d09e" + integrity sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -14915,6 +15072,20 @@ update-check@1.5.4: registry-auth-token "3.3.2" registry-url "3.1.0" +upper-case-first@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-2.0.2.tgz#992c3273f882abd19d1e02894cc147117f844324" + integrity sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg== + dependencies: + tslib "^2.0.3" + +upper-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-2.0.2.tgz#d89810823faab1df1549b7d97a76f8662bae6f7a" + integrity sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg== + dependencies: + tslib "^2.0.3" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" From 9c4d3c7dabd19d55ce22fe19594aa961a7d92d57 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Mon, 13 Nov 2023 15:18:05 -0500 Subject: [PATCH 02/42] Updates to status colors --- .../manager/src/components/PrimaryNav/PrimaryNav.styles.ts | 6 +++--- packages/manager/src/components/StatusIcon/StatusIcon.tsx | 6 +++--- .../src/features/Linodes/LinodeEntityDetail.styles.ts | 4 ++-- .../features/TopMenu/NotificationMenu/NotificationMenu.tsx | 2 +- packages/manager/src/foundations/themes/light.ts | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/manager/src/components/PrimaryNav/PrimaryNav.styles.ts b/packages/manager/src/components/PrimaryNav/PrimaryNav.styles.ts index 50094add4e7..fd444217a6b 100644 --- a/packages/manager/src/components/PrimaryNav/PrimaryNav.styles.ts +++ b/packages/manager/src/components/PrimaryNav/PrimaryNav.styles.ts @@ -10,7 +10,7 @@ const useStyles = makeStyles()( opacity: 1, }, '& svg': { - color: theme.color.teal, + color: theme.palette.success.dark, }, backgroundImage: 'linear-gradient(98deg, #38584B 1%, #3A5049 166%)', textDecoration: 'none', @@ -75,8 +75,8 @@ const useStyles = makeStyles()( opacity: 1, }, '& svg': { - color: theme.color.teal, - fill: theme.color.teal, + color: theme.palette.success.dark, + fill: theme.palette.success.dark, }, [`& .${classes.linkItem}`]: { color: 'white', diff --git a/packages/manager/src/components/StatusIcon/StatusIcon.tsx b/packages/manager/src/components/StatusIcon/StatusIcon.tsx index fab623fe350..54d84bfee4f 100644 --- a/packages/manager/src/components/StatusIcon/StatusIcon.tsx +++ b/packages/manager/src/components/StatusIcon/StatusIcon.tsx @@ -53,16 +53,16 @@ const StyledDiv = styled(Box, { transition: theme.transitions.create(['color']), width: '16px', ...(props.status === 'active' && { - backgroundColor: theme.color.teal, + backgroundColor: theme.palette.success.dark, }), ...(props.status === 'inactive' && { backgroundColor: theme.color.grey8, }), ...(props.status === 'error' && { - backgroundColor: theme.color.red, + backgroundColor: theme.palette.error.dark, }), ...(!['active', 'error', 'inactive'].includes(props.status) && { - backgroundColor: theme.color.orange, + backgroundColor: theme.palette.warning.dark, }), ...(props.pulse && { animation: 'pulse 1.5s ease-in-out infinite', diff --git a/packages/manager/src/features/Linodes/LinodeEntityDetail.styles.ts b/packages/manager/src/features/Linodes/LinodeEntityDetail.styles.ts index 045954149e8..c791fa3406c 100644 --- a/packages/manager/src/features/Linodes/LinodeEntityDetail.styles.ts +++ b/packages/manager/src/features/Linodes/LinodeEntityDetail.styles.ts @@ -59,10 +59,10 @@ export const StyledChip = styled(Chip, { backgroundColor: theme.color.grey8, }), ...(isOther && { - backgroundColor: theme.color.orange, + backgroundColor: theme.palette.warning.dark, }), ...(isRunning && { - backgroundColor: theme.color.teal, + backgroundColor: theme.palette.success.dark, }), }, borderRadius: 0, diff --git a/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx b/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx index 447c2ce18e5..b2f716d8f33 100644 --- a/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx +++ b/packages/manager/src/features/TopMenu/NotificationMenu/NotificationMenu.tsx @@ -38,7 +38,7 @@ const NotificationIconWrapper = styled(StyledTopMenuIconWrapper, { const NotificationIconBadge = styled('div')(({ theme }) => ({ alignItems: 'center', - backgroundColor: theme.color.green, + backgroundColor: theme.palette.success.dark, borderRadius: '50%', color: 'white', display: 'flex', diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 9db17ebabfc..3455dcf4a0b 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -17,7 +17,7 @@ export const bg = { mainContentBanner: Colors.Neutrals[100], offWhite: Colors.Neutrals[5], primaryNavPaper: Colors.Neutrals[100], - tableHeader: Colors.Neutrals[5], + tableHeader: Colors.Neutrals.White, // TODO: We need to ask CDS team about this 'Colors.Neutrals[5]' doesn't work... white: Colors.Neutrals.White, } as const; From 21df7ea1adfcbf2281c93278cc5c15e46c3bdaeb Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Wed, 15 Nov 2023 12:11:09 -0500 Subject: [PATCH 03/42] Saving... --- packages/manager/package.json | 2 +- .../manager/src/cachedData/marketplace.json | 2 +- packages/manager/src/cachedData/regions.json | 2 +- .../manager/src/cachedData/typesLegacy.json | 2 +- .../manager/src/foundations/themes/light.ts | 26 +++++++++---------- yarn.lock | 8 +++--- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index fee38495b0b..bd6aba3b189 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -16,7 +16,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@linode/api-v4": "*", - "@linode/design-language-system": "^0.0.11", + "@linode/design-language-system": "^0.0.12", "@linode/validation": "*", "@mui/icons-material": "^5.14.7", "@mui/material": "^5.14.7", diff --git a/packages/manager/src/cachedData/marketplace.json b/packages/manager/src/cachedData/marketplace.json index 4686e772c87..5fd3e4bab47 100644 --- a/packages/manager/src/cachedData/marketplace.json +++ b/packages/manager/src/cachedData/marketplace.json @@ -1 +1 @@ -{"data":[{"id":1146319,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster Null One-Click","description":"MongoDB Cluster Null One-Click\r\nNull stackscript for 1067004","ordinal":0,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":38,"deployments_active":2,"is_public":true,"mine":false,"created":"2023-03-23T14:00:01","updated":"2023-08-28T19:43:48","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1146322,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster Null One-Click","description":"PostgreSQL Cluster Null One-Click\r\nNull Stackscript for 1068726","ordinal":0,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":88,"deployments_active":6,"is_public":true,"mine":false,"created":"2023-03-23T14:17:07","updated":"2023-09-26T14:49:28","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1146324,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster Null One-Click","description":"Galera Cluster Null One-Click\r\nNull Stackscript for 1088136","ordinal":0,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":109,"deployments_active":9,"is_public":true,"mine":false,"created":"2023-03-23T14:19:14","updated":"2023-09-23T14:39:04","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1142293,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Redis Sentinel Cluster Null One-Click","description":"Redis Sentinel Cluster Null One-Click\r\nNull stackscript for 1132204","ordinal":0,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":151,"deployments_active":26,"is_public":true,"mine":false,"created":"2023-03-16T14:20:59","updated":"2023-08-28T19:43:48","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1226547,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Clients Null One-Click","description":"Nomad Cluster Clients One-Click","ordinal":0,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":226,"deployments_active":19,"is_public":true,"mine":false,"created":"2023-08-25T19:08:57","updated":"2023-09-28T14:08:26","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1226546,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Null One-Click","description":"Nomad Cluster Null One-Click","ordinal":0,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":257,"deployments_active":12,"is_public":true,"mine":false,"created":"2023-08-25T19:08:21","updated":"2023-09-28T14:06:12","rev_note":"","script":"#!/bin/bash/","user_defined_fields":[]},{"id":401697,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WordPress One-Click","description":"Wordpress One Click App","ordinal":1,"logo_url":"assets/WordPress.svg","images":["linode/ubuntu22.04"],"deployments_total":60287,"deployments_active":4876,"is_public":true,"mine":false,"created":"2019-03-08T21:04:07","updated":"2023-09-28T20:07:46","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-wordpress\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":632758,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Nextcloud One-Click","description":"One Click App - Nextcloud","ordinal":2,"logo_url":"assets/nextcloud.svg","images":["linode/ubuntu22.04"],"deployments_total":18362,"deployments_active":942,"is_public":true,"mine":false,"created":"2020-02-18T16:40:45","updated":"2023-09-28T18:33:41","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n\n# Install docker\ncurl -fsSL https://get.docker.com | sudo sh\n\n# Adjust permissions\nsudo mkdir -p /mnt/ncdata\nsudo chown -R 33:0 /mnt/ncdata\n\n# Install Nextcloud\nsudo docker run -d \\\n--init \\\n--name nextcloud-aio-mastercontainer \\\n--restart always \\\n-p 80:80 \\\n-p 8080:8080 \\\n-p 8443:8443 \\\n-e NEXTCLOUD_MOUNT=/mnt/ \\\n-e NEXTCLOUD_DATADIR=/mnt/ncdata \\\n--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \\\n--volume /var/run/docker.sock:/var/run/docker.sock:ro \\\nnextcloud/all-in-one:latest\n\n# Some Info\ncat << EOF > /etc/motd\n # # ###### # # ##### #### # #### # # #####\n ## # # # # # # # # # # # # # #\n # # # ##### ## # # # # # # # # #\n # # # # ## # # # # # # # # #\n # ## # # # # # # # # # # # # #\n # # ###### # # # #### ###### #### #### #####\nIf you point a domain to this server ($(hostname -I | cut -f1 -d' ')), you can open the admin interface at https://yourdomain.com:8443\nOtherwise you can open the admin interface at https://$(hostname -I | cut -f1 -d' '):8080\n \nFurther documentation is available here: https://github.com/nextcloud/all-in-one\nEOF\n\n# Install unattended upgrades\nsudo apt-get install unattended-upgrades -y\n\n# firewall\nufw allow 80\nufw allow 443\nufw allow 8080\nufw allow 8443\nufw allow 3478\n\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA email address","default":""}]},{"id":1017300,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kali Linux One-Click","description":"Kali Linux One-Click","ordinal":3,"logo_url":"assets/kalilinux.svg","images":["linode/kali"],"deployments_total":15565,"deployments_active":534,"is_public":true,"mine":false,"created":"2022-06-21T14:38:37","updated":"2023-09-28T20:01:30","rev_note":"","script":"#!/bin/bash\n## Kali\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction headlessoreverything {\n if [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"Yes\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $EVERYTHING == \"Yes\" ] && [ $HEADLESS == \"No\" ]; then\n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"No\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-headless -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"No\" ] && [ $EVERYTHING == \"No\" ]; then \n echo \"No Package Selected\"\n fi\n}\n\nfunction vncsetup {\n if [ $VNC == \"Yes\" ]; then \n ## XFCE & VNC Config\n apt-get install xfce4 xfce4-goodies dbus-x11 tigervnc-standalone-server expect -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n\n readonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\n sleep 2\n killvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\n kill $killvncprocess\n touch /etc/systemd/system/vncserver@.service\n cat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start vncserver@1.service\n systemctl enable vncserver@1.service\n\n cat < /etc/motd\n###################################\n# VNC SSH Tunnel Instructions #\n###################################\n\n* Ensure you have a VNC Client installed on your local machine\n* Run the command below to start the SSH tunnel for VNC \n\n ssh -L 61000:localhost:5901 -N -l $USERNAME $FQDN\n\n* For more Detailed documentation please visit the offical Documentation below\n\n https://www.linode.com/docs/products/tools/marketplace/guides/kalilinux\n\n### To remove this message, you can edit the /etc/motd file ###\nEOF\n fi\n}\n\nfunction main {\n headlessoreverything\n vncsetup\n stackscript_cleanup\n}\n\nmain","user_defined_fields":[{"name":"everything","label":"Would you like to Install the Kali Everything Package?","oneof":"Yes,No","default":"Yes"},{"name":"headless","label":"Would you like to Install the Kali Headless Package?","oneof":"Yes,No","default":"No"},{"name":"vnc","label":"Would you like to setup VNC to access Kali XFCE Desktop","oneof":"Yes,No","default":"Yes"},{"name":"username","label":"The VNC user to be created for the Linode. The username accepts only lowercase letters, numbers, dashes (-) and underscores (_)"},{"name":"password","label":"The password for the limited VNC user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA records (Requires API token)","default":""}]},{"id":593835,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plesk One-Click","description":"Plesk is the leading secure WordPress and website management platform. This Stackscript installs the latest publicly available Plesk, activates a trial license, installs essential extensions, and sets up and configures the firewall. Please allow the script around 15 minutes to finish.","ordinal":4,"logo_url":"assets/plesk.svg","images":["linode/centos7","linode/ubuntu20.04"],"deployments_total":10199,"deployments_active":496,"is_public":true,"mine":false,"created":"2019-09-26T17:34:17","updated":"2023-09-28T17:12:17","rev_note":"updated wording","script":"#!/bin/bash\n# This block defines the variables the user of the script needs to input\n# when deploying using this script.\n#\n## Enable logging\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction pleskautoinstall {\n echo \"Downloading Plesk Auto-Installer\"\n sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)\n echo \"turning on http2\"\n /usr/sbin/plesk bin http2_pref --enable\n}\n\nfunction firewall {\n echo \"Setting Firewall to allow proper ports.\"\n if [ \"${detected_distro[distro]}\" = 'centos' ]; then \n iptables -I INPUT -p tcp --dport 21 -j ACCEPT\n iptables -I INPUT -p tcp --dport 22 -j ACCEPT\n iptables -I INPUT -p tcp --dport 25 -j ACCEPT\n iptables -I INPUT -p tcp --dport 80 -j ACCEPT\n iptables -I INPUT -p tcp --dport 110 -j ACCEPT\n iptables -I INPUT -p tcp --dport 143 -j ACCEPT\n iptables -I INPUT -p tcp --dport 443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 465 -j ACCEPT\n iptables -I INPUT -p tcp --dport 993 -j ACCEPT\n iptables -I INPUT -p tcp --dport 995 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8447 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8880 -j ACCEPT\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n ufw allow 21\n ufw allow 22\n ufw allow 25\n ufw allow 80\n ufw allow 110\n ufw allow 143\n ufw allow 443\n ufw allow 465\n ufw allow 993\n ufw allow 995\n ufw allow 8443\n ufw allow 8447\n ufw allow 8880\nelse \necho \"Distro Not supported\"\nfi\n}\n\nfunction main {\n pleskautoinstall\n firewall\n}\n\n# Execute script\nsystem_update\nmain\nstackscript_cleanup","user_defined_fields":[]},{"id":595742,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"cPanel One-Click","description":"cPanel One-Click","ordinal":5,"logo_url":"assets/cpanel.svg","images":["linode/ubuntu20.04","linode/almalinux8","linode/rocky8"],"deployments_total":27121,"deployments_active":1061,"is_public":true,"mine":false,"created":"2019-09-30T20:17:52","updated":"2023-09-28T19:12:37","rev_note":"","script":"#!/bin/bash\nset -e\n\n# Commit: fde6587e08ea95321ce010e52a9c1b8d02455a97\n# Commit date: 2023-02-13 17:00:46 -0600\n# Generated: 2023-02-17 11:00:28 -0600\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\necho $(date +%Y%m%d%H%M%S) >> /tmp/cpdebug.log\n\n# Linode's Weblish console will truncate lines unless you do this tput smam. This\n# instructs the terminal to wrap your lines, which is especially important so that\n# the WHM login URL that gets printed at the end can be copied.\ntput smam\n\nsource /etc/os-release\n\nis_os_and_version_id_prefix() {\n [[ $ID == $1 ]] && [[ $VERSION_ID =~ ^$2 ]]\n}\n\nis_almalinux8() {\n is_os_and_version_id_prefix almalinux 8\n}\n\nis_centos7() {\n is_os_and_version_id_prefix centos 7\n}\n\nis_cloudlinux7() {\n is_os_and_version_id_prefix cloudlinux 7\n}\n\nis_cloudlinux8() {\n is_os_and_version_id_prefix cloudlinux 8\n}\n\nis_rocky8() {\n is_os_and_version_id_prefix rocky 8\n}\n\nis_ubuntu20() {\n is_os_and_version_id_prefix ubuntu 20.04\n}\n\nis_supported_os() {\n is_almalinux8 || \\\n is_centos7 || \\\n is_cloudlinux7 || \\\n is_cloudlinux8 || \\\n is_rocky8 || \\\n is_ubuntu20\n}\n\nhas_yum() {\n which yum >/dev/null 2>&1\n}\n\nhas_dnf() {\n which dnf >/dev/null 2>&1\n}\n\nhas_apt() {\n which apt >/dev/null 2>&1\n}\n\nis_networkmanager_enabled() {\n systemctl is-enabled NetworkManager.service > /dev/null 2>&1\n}\n\n# cPanel & WHM is incompatible with NetworkManager\nif is_networkmanager_enabled; then\n systemctl stop NetworkManager.service\n systemctl disable NetworkManager.service\n if has_dnf; then\n dnf -y remove NetworkManager\n elif has_yum; then\n yum -y remove NetworkManager\n fi\nfi\n\nhostnamectl set-hostname server.hostname.tld\n\ncd /home && curl -so installer -L https://securedownloads.cpanel.net/latest\n\nif is_supported_os; then\n if is_ubuntu20; then\n apt-get -o Acquire::ForceIPv4=true update -y\n DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\n sh installer --skiplicensecheck --skip-cloudlinux\n else\n sh installer --skiplicensecheck\n fi\nelse\n echo \"Your distribution is not supported by this StackScript.\"\n install -d -v -m 711 /var/cpanel\n touch /var/cpanel/cpinit.failed\nfi\n\nrm -f /etc/cpupdate.conf\ncat > /root/.bash_profile <<'END_OF_BASH_PROFILE'\n# .bash_profile\n# Get the aliases and functions\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n# User specific environment and startup programs\nPATH=$PATH:$HOME/bin\nexport PATH\nbash /etc/motd.sh\nif [ -t 0 ]; then\n URL=`whmlogin --nowait 2> /dev/null`\n WHMLOGIN_RETURN=$?\n if [ $WHMLOGIN_RETURN == 1 ]; then\n # whmlogin doesn't support --nowait. Output a URL and hope it's accurate.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n whmlogin\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n if [ $WHMLOGIN_RETURN == 2 ]; then\n # whmlogin indicates that cpinit hasn't updated the IP/hostname yet.\n echo \"To log in to WHM as the root user, run the command 'whmlogin' to get a web address for your browser.\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n # whmlogin returned a valid URL to use.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n echo \"$URL\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n fi\n fi\nfi\nEND_OF_BASH_PROFILE\n\ncat > /etc/motd.sh <<'END_OF_MOTD'\n#!/bin/bash\nsource /etc/os-release\necho \"\n ____ _ ___ __ ___ _ __ __\n ___| _ \\ __ _ _ __ ___| | ( _ ) \\ \\ / / | | | \\/ |\n / __| |_) / _. | ._ \\ / _ \\ | / _ \\/\\ \\ \\ /\\ / /| |_| | |\\/| |\n| (__| __/ (_| | | | | __/ | | (_> < \\ V V / | _ | | | |\n \\___|_| \\__._|_| |_|\\___|_| \\___/\\/ \\_/\\_/ |_| |_|_| |_|\n\"\necho \"Welcome to cPanel & WHM `/usr/local/cpanel/cpanel -V`\"\necho \"\"\necho \"Running $PRETTY_NAME\"\necho \"\"\necho \"For our full cPanel & WHM documentation: https://go.cpanel.net/docs\"\necho \"\"\necho \"For information on how to quickly set up a website in cPanel & WHM: https://go.cpanel.net/buildasite\"\necho \"\" # This new line makes output from bash_profiles easier to read\nEND_OF_MOTD\ntouch /var/cpanel/cpinit.done","user_defined_fields":[]},{"id":691621,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Cloudron One-Click","description":"Cloudron One-Click","ordinal":6,"logo_url":"assets/cloudron.svg","images":["linode/ubuntu20.04"],"deployments_total":13260,"deployments_active":675,"is_public":true,"mine":false,"created":"2020-11-30T21:21:45","updated":"2023-09-28T18:25:17","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\nwget https://cloudron.io/cloudron-setup\nchmod +x cloudron-setup\n./cloudron-setup --provider linode-mp\n\necho All finished! Rebooting...\n(sleep 5; reboot) &","user_defined_fields":[]},{"id":692092,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Secure Your Server One-Click","description":"Secure Your Server One-Click","ordinal":7,"logo_url":"assets/secureyourserver.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":4163,"deployments_active":574,"is_public":true,"mine":false,"created":"2020-12-03T10:01:28","updated":"2023-09-28T19:38:39","rev_note":"","script":"#!/usr/bin/env bash\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n#\n\n## Block Storage\n#\n#\n\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source Linode Helpers\nsource \nsource \nsource \nsource \n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode. (lower case only)"},{"name":"password","label":"The password for the limited sudo user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode"},{"name":"disable_root","label":"Would you like to disable root login over SSH?","oneof":"Yes,No"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address. This is used for creating DNS records and website VirtualHost configuration.","default":""},{"name":"send_email","label":"Would you like to be able to send email from this domain? (Requires domain)","oneof":"Yes,No","default":"No"},{"name":"volume","label":"To use a Block Storage volume, enter its name here.","default":""},{"name":"volume_size","label":"If creating a new Block Storage volume, enter its size in GB (NOTE: This creates a billable resource at $0.10/month per GB).","default":""}]},{"id":925722,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pritunl One-Click","description":"Pritunl One-Click","ordinal":8,"logo_url":"assets/pritunl.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":1026,"deployments_active":107,"is_public":true,"mine":false,"created":"2021-10-26T15:23:37","updated":"2023-09-28T16:28:08","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nfail2ban_install\n\n# Mongo Install\napt-get install -y wget gnupg dirmngr \nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Pritunl\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv E162F504A20CDF15827F718D4B7C549A058F8B6B\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.pritunl.com/stable/apt buster main\" | tee /etc/apt/sources.list.d/pritunl.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb http://repo.pritunl.com/stable/apt focal main\" | tee /etc/apt/sources.list.d/pritunl.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\n\napt update -y\napt install -y pritunl\n\nsystemctl enable pritunl.service\nsystemctl start pritunl.service\n\n# Performance tune\necho \"* hard nofile 64000\" >> /etc/security/limits.conf\necho \"* soft nofile 64000\" >> /etc/security/limits.conf\necho \"root hard nofile 64000\" >> /etc/security/limits.conf\necho \"root soft nofile 64000\" >> /etc/security/limits.conf\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA record","default":""}]},{"id":741206,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CyberPanel One-Click","description":"CyberPanel One-Click","ordinal":9,"logo_url":"assets/cyberpanel.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":10478,"deployments_active":615,"is_public":true,"mine":false,"created":"2021-01-27T02:46:19","updated":"2023-09-28T19:06:57","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### Install cyberpanel\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/cybersetup.sh )\n\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401709,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Minecraft: Java Edition One-Click","description":"Minecraft OCA","ordinal":10,"logo_url":"assets/Minecraft.svg","images":["linode/ubuntu20.04"],"deployments_total":18878,"deployments_active":403,"is_public":true,"mine":false,"created":"2019-03-08T21:13:32","updated":"2023-09-28T20:22:13","rev_note":"remove maxplayers hard coded options [oca-707]","script":"#!/usr/bin/env bash\n# Game config options:\n# https://minecraft.gamepedia.com/Server.properties\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n## Linode/SSH Security Settings - Required\n#\n#\n## Linode/SSH Settings - Optional\n#\n#\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n# Difficulty\n[[ \"$DIFFICULTY\" = \"Peaceful\" ]] && DIFFICULTY=0\n[[ \"$DIFFICULTY\" = \"Easy\" ]] && DIFFICULTY=1\n[[ \"$DIFFICULTY\" = \"Normal\" ]] && DIFFICULTY=2\n[[ \"$DIFFICULTY\" = \"Hard\" ]] && DIFFICULTY=3\n\n# Gamemode\n[[ \"$GAMEMODE\" = \"Survival\" ]] && GAMEMODE=0\n[[ \"$GAMEMODE\" = \"Creative\" ]] && GAMEMODE=1\n[[ \"$GAMEMODE\" = \"Adventure\" ]] && GAMEMODE=2\n[[ \"$GAMEMODE\" = \"Spectator\" ]] && GAMEMODE=3\n\n# Player Idle Timeout\n[[ \"$PLAYERIDLETIMEOUT\" = \"Disabled\" ]] && PLAYERIDLETIMEOUT=0\n\n# Minecraft-specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\nsystem_install_package mailutils postfix curl netcat wget file bzip2 \\\n gzip unzip bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux openjdk-17-jre dirmngr software-properties-common\n\n# Install LinuxGSM and Minecraft and enable the 'mcserver' service\nreadonly GAMESERVER='mcserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Minecraft configurations\nsed -i s/server-ip=/server-ip=\"$IP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Customer config\nsed -i s/allow-flight=false/allow-flight=\"$ALLOWFLIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/allow-nether=true/allow-nether=\"$ALLOWNETHER\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/announce-player-achievements=true/announce-player-achievements=\"$ANNOUNCEPLAYERACHIEVEMENTS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/difficulty=1/difficulty=\"$DIFFICULTY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-command-block=false/enable-command-block=\"$ENABLECOMMANDBLOCK\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-query=true/enable-query=\"$ENABLEQUERY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/force-gamemode=false/force-gamemode=\"$FORCEGAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/gamemode=0/gamemode=\"$GAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/generate-structures=true/generate-structures=\"$GENERATESTRUCTURES\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/hardcore=false/hardcore=\"$HARDCORE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-name=world/level-name=\"$LEVELNAME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-seed=/level-seed=\"$LEVELSEED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-type=DEFAULT/level-type=\"$LEVELTYPE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-build-height=256/max-build-height=\"$MAXBUILDHEIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-players=20/max-players=\"$MAXPLAYERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-tick-time=60000/max-tick-time=\"$MAXTICKTIME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-world-size=29999984/max-world-size=\"$MAXWORLDSIZE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/motd=.*/motd=\"$MOTD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/network-compression-threshold=256/network-compression-threshold=\"$NETWORKCOMPRESSIONTHRESHOLD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/op-permission-level=4/op-permission-level=\"$OPPERMISSIONLEVEL\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/player-idle-timeout=0/player-idle-timeout=\"$PLAYERIDLETIMEOUT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/pvp=true/pvp=\"$PVP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/resource-pack-sha1=/resource-pack-sha1=\"$RESOURCEPACKSHA1\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/server-port=25565/server-port=\"$PORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/snooper-enabled=true/snooper-enabled=\"$SNOOPERENABLED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-animals=true/spawn-animals=\"$SPAWNANIMALS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-monsters=true/spawn-monsters=\"$SPAWNMONSTERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-npcs=true/spawn-npcs=\"$SPAWNNPCS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/use-native-transport=true/use-native-transport=\"$USENATIVETRANSPORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/view-distance=10/view-distance=\"$VIEWDISTANCE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/rcon.password=*/rcon.password=\"\\\"$RCONPASSWORD\\\"\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-rcon=false/enable-rcon=true/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Start the service and setup firewall\nufw allow \"$PORT\"\nufw allow \"25575\"\n\n# Start and enable the Minecraft service\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"levelname","label":"World Name","default":"world"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"allowflight","label":"Flight Enabled","oneof":"true,false","default":"false"},{"name":"allownether","label":"Nether World Enabled","oneof":"true,false","default":"true"},{"name":"announceplayerachievements","label":"Player Achievements Enabled","oneof":"true,false","default":"true"},{"name":"maxplayers","label":"Maximum Players","default":"25"},{"name":"playeridletimeout","label":"Player Idle Timeout Limit","oneof":"Disabled,15,30,45,60","default":"Disabled"},{"name":"difficulty","label":"Difficulty Level","oneof":"Peaceful,Easy,Normal,Hard","default":"Easy"},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"true,false","default":"false"},{"name":"pvp","label":"PvP Enabled","oneof":"true,false","default":"true"},{"name":"forcegamemode","label":"Force Game Mode Enabled","oneof":"true,false","default":"false"},{"name":"leveltype","label":"World Type","oneof":"DEFAULT,AMPLIFIED,FLAT,LEGACY","default":"DEFAULT"},{"name":"levelseed","label":"World Seed","default":""},{"name":"spawnanimals","label":"Spawn Animals Enabled","oneof":"true,false","default":"true"},{"name":"spawnmonsters","label":"Spawn Monsters Enabled","oneof":"true,false","default":"true"},{"name":"spawnnpcs","label":"Spawn NPCs Enabled","oneof":"true,false","default":"true"},{"name":"gamemode","label":"Game Mode","oneof":"Survival,Creative,Adventure,Spectator","default":"Survival"},{"name":"generatestructures","label":"Structure Generation Enabled","oneof":"true,false","default":"true"},{"name":"maxbuildheight","label":"Maximum Build Height","oneof":"50,100,200,256","default":"256"},{"name":"maxworldsize","label":"Maximum World Size","oneof":"100,1000,10000,100000,1000000,10000000,29999984","default":"29999984"},{"name":"viewdistance","label":"View Distance","oneof":"2,5,10,15,25,32","default":"10"},{"name":"enablecommandblock","label":"Command Block Enabled","oneof":"true,false","default":"false"},{"name":"enablequery","label":"Querying Enabled","oneof":"true,false","default":"true"},{"name":"enablercon","label":"Enable RCON","oneof":"true,false","default":"false"},{"name":"rconpassword","label":"RCON Password","default":""},{"name":"rconport","label":"RCON Port","default":"25575"},{"name":"maxticktime","label":"Maximum Tick Time","default":"60000"},{"name":"networkcompressionthreshold","label":"Network Compression Threshold","default":"256"},{"name":"oppermissionlevel","label":"Op-permission Level","oneof":"1,2,3,4","default":"4"},{"name":"port","label":"Port Number","default":"25565"},{"name":"snooperenabled","label":"Snooper Enabled","oneof":"true,false","default":"true"},{"name":"usenativetransport","label":"Use Native Transport Enabled","oneof":"true,false","default":"true"},{"name":"username","label":"The username for the Linode's non-root admin/SSH user(must be lowercase)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's non-root admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":869129,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"aaPanel One-Click","description":"aaPanel One-Click","ordinal":11,"logo_url":"assets/aapanel.svg","images":["linode/centos7"],"deployments_total":4873,"deployments_active":344,"is_public":true,"mine":false,"created":"2021-07-20T18:50:46","updated":"2023-09-28T14:41:28","rev_note":"","script":"#!/bin/bash\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Yum Update\nyum update -y\n\n# Install aapanel\nyum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && echo y|bash install.sh aapanel\n\n# Log aaPanel login information\nbt default > /root/.aapanel_info\n\n# Stackscript Cleanup\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[]},{"id":923033,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Akaunting One-Click","description":"Akaunting One-Click","ordinal":12,"logo_url":"assets/akaunting.svg","images":["linode/ubuntu22.04"],"deployments_total":586,"deployments_active":23,"is_public":true,"mine":false,"created":"2021-10-18T01:01:19","updated":"2023-09-28T15:34:24","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# \n# \n# \n# \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nDEBIAN_FRONTEND=noninteractive apt-get update -qq >/dev/null\n\n###########################################################\n# Install NGINX\n###########################################################\napt-get install -y nginx\n\ncat <<'END' >/var/www/html/index.html\n\n \n \n \n \n \n\n Installing Akaunting\n\n \n \n\n \n \n\n \n
\n
\n \n
\n\n
\n \n
\n
\n

Installing...

Get back after 3 minutes!

\n
\n
\n \n\nEND\n\nchown www-data:www-data /var/www/html/index.html\nchmod 644 /var/www/html/index.html\n\n###########################################################\n# MySQL\n###########################################################\napt install -y mariadb-server expect\n\nfunction mysql_secure_install {\n # $1 - required - Root password for the MySQL database\n [ ! -n \"$1\" ] && {\n printf \"mysql_secure_install() requires the MySQL database root password as its only argument\\n\"\n return 1;\n }\n local -r db_root_password=\"$1\"\n local -r secure_mysql=$(\nexpect -c \"\nset timeout 10\nspawn mysql_secure_installation\nexpect \\\"Enter current password for root (enter for none):\\\"\nsend \\\"$db_root_password\\r\\\"\nexpect \\\"Change the root password?\\\"\nsend \\\"n\\r\\\"\nexpect \\\"Remove anonymous users?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Disallow root login remotely?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Remove test database and access to it?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Reload privilege tables now?\\\"\nsend \\\"y\\r\\\"\nexpect eof\n\")\n printf \"$secure_mysql\\n\"\n}\n\n# Set DB root password\necho \"mysql-server mysql-server/root_password password ${DB_PASSWORD}\" | debconf-set-selections\necho \"mysql-server mysql-server/root_password_again password ${DB_PASSWORD}\" | debconf-set-selections\n\nmysql_secure_install \"$DB_PASSWORD\"\n\n# Create DB\necho \"CREATE DATABASE ${DB_NAME};\" | mysql -u root -p\"$DB_PASSWORD\"\n\n# create DB user with password\necho \"CREATE USER '$DBUSER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\" | mysql -u root -p\"$DB_PASSWORD\"\n\necho \"GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DBUSER'@'localhost';\" | mysql -u root -p\"$DB_PASSWORD\"\necho \"FLUSH PRIVILEGES;\" | mysql -u root -p\"$DB_PASSWORD\"\n\n\n###########################################################\n# Install PHP \n###########################################################\napt-get install -y zip unzip php-mbstring php-zip php-gd php-cli php-curl php-intl php-imap php-xml php-xsl php-tokenizer php-sqlite3 php-pgsql php-opcache php-simplexml php-fpm php-bcmath php-ctype php-json php-pdo php-mysql\n\n###########################################################\n# Akaunting\n###########################################################\nmkdir -p /var/www/akaunting \\\n && curl -Lo /tmp/akaunting.zip 'https://akaunting.com/download.php?version=latest&utm_source=linode&utm_campaign=developers' \\\n && unzip /tmp/akaunting.zip -d /var/www/html \\\n && rm -f /tmp/akaunting.zip\n\ncat </var/www/html/.env\nAPP_NAME=Akaunting\nAPP_ENV=production\nAPP_LOCALE=en-GB\nAPP_INSTALLED=false\nAPP_KEY=\nAPP_DEBUG=false\nAPP_SCHEDULE_TIME=\"09:00\"\nAPP_URL=\n\nDB_CONNECTION=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_DATABASE=${DB_NAME}\nDB_USERNAME=${DBUSER}\nDB_PASSWORD=${DBUSER_PASSWORD}\nDB_PREFIX=\n\nBROADCAST_DRIVER=log\nCACHE_DRIVER=file\nSESSION_DRIVER=file\nQUEUE_CONNECTION=sync\nLOG_CHANNEL=stack\n\nMAIL_MAILER=mail\nMAIL_HOST=localhost\nMAIL_PORT=2525\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_NAME=null\nMAIL_FROM_ADDRESS=null\n\nFIREWALL_ENABLED=false\nEND\n\ncd /var/www/html && php artisan key:generate\n\n# Install Akaunting\nphp /var/www/html/artisan install --db-host=\"localhost\" --db-name=\"$DB_NAME\" --db-username=\"$DBUSER\" --db-password=\"$DBUSER_PASSWORD\" --company-name=\"$COMPANY_NAME\" --company-email=\"$COMPANY_EMAIL\" --admin-email=\"$ADMIN_EMAIL\" --admin-password=\"$ADMIN_PASSWORD\"\n\n# Fix permissions\nchown -Rf www-data:www-data /var/www/html\nfind /var/www/html/ -type d -exec chmod 755 {} \\;\nfind /var/www/html/ -type f -exec chmod 644 {} \\;\n\n###########################################################\n# Configure NGINX\n###########################################################\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat << END > /etc/nginx/nginx.conf\n# Generic startup file.\nuser www-data;\n\n#usually equal to number of CPUs you have. run command \"grep processor /proc/cpuinfo | wc -l\" to find it\nworker_processes auto;\nworker_cpu_affinity auto;\n\nerror_log /var/log/nginx/error.log;\npid /var/run/nginx.pid;\n\n# Keeps the logs free of messages about not being able to bind().\n#daemon off;\n\nevents {\nworker_connections 1024;\n}\n\nhttp {\n# rewrite_log on;\n\ninclude mime.types;\ndefault_type application/octet-stream;\naccess_log /var/log/nginx/access.log;\nsendfile on;\n# tcp_nopush on;\nkeepalive_timeout 64;\n# tcp_nodelay on;\n# gzip on;\n #php max upload limit cannot be larger than this \nclient_max_body_size 13m;\nindex index.php index.html index.htm;\n\n# Upstream to abstract backend connection(s) for PHP.\nupstream php {\n #this should match value of \"listen\" directive in php-fpm pool\n server unix:/run/php/php$PHP_VERSION-fpm.sock;\n server 127.0.0.1:9000;\n}\n\nserver {\n listen 80 default_server;\n\n server_name _;\n\n root /var/www/html;\n\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Content-Type-Options \"nosniff\";\n\n index index.html index.htm index.php;\n\n charset utf-8;\n\n location / {\n try_files \\$uri \\$uri/ /index.php?\\$query_string;\n }\n\n # Prevent Direct Access To Protected Files\n location ~ \\.(env|log) {\n deny all;\n }\n\n # Prevent Direct Access To Protected Folders\n location ~ ^/(^app$|bootstrap|config|database|overrides|resources|routes|storage|tests|artisan) {\n deny all;\n }\n\n # Prevent Direct Access To modules/vendor Folders Except Assets\n location ~ ^/(modules|vendor)\\/(.*)\\.((?!ico|gif|jpg|jpeg|png|js\\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ {\n deny all;\n }\n\n error_page 404 /index.php;\n\n # Pass PHP Scripts To FastCGI Server\n location ~ \\.php$ {\n fastcgi_split_path_info ^(.+\\.php)(/.+)\\$;\n fastcgi_pass php;\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n include fastcgi_params;\n }\n\n location ~ /\\.(?!well-known).* {\n deny all;\n }\n}\n}\nEND\n\n# Remove installation screen\nrm -f /var/www/html/index.html\n\nservice nginx reload\n\n###########################################################\n# Firewall\n###########################################################\napt-get install ufw -y\nufw limit ssh\nufw allow http\nufw allow https\n\nufw --force enable\n\n###########################################################\n# Stackscript cleanup\n###########################################################\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"company_name","label":"Company Name","example":"My Company"},{"name":"company_email","label":"Company Email","example":"my@company.com"},{"name":"admin_email","label":"Admin Email","example":"my@company.com"},{"name":"admin_password","label":"Admin Password","example":"s3cur39a55w0r0"},{"name":"db_name","label":"MySQL Database Name","example":"akaunting"},{"name":"db_password","label":"MySQL root Password","example":"s3cur39a55w0r0"},{"name":"dbuser","label":"MySQL Username","example":"akaunting"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur39a55w0r0"}]},{"id":985374,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Enterprise Edition One-Click","description":"Ant Media Enterprise Edition One-Click","ordinal":13,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":1264,"deployments_active":71,"is_public":true,"mine":false,"created":"2022-03-08T17:39:39","updated":"2023-09-28T15:29:20","rev_note":"","script":"#!/usr/bin/env bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\nZIP_FILE=\"https://antmedia.io/linode/antmedia_2.5.3.zip\"\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":804144,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Community Edition One-Click","description":"Ant Media Server One-Click","ordinal":14,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":5200,"deployments_active":450,"is_public":true,"mine":false,"created":"2021-04-01T12:50:57","updated":"2023-09-28T18:12:17","rev_note":"","script":"#!/usr/bin/env bash \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nZIP_FILE=\"https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.5.3/ant-media-server-community-2.5.3.zip\"\n\n\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":1102900,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Apache Airflow One-Click","description":"Apache Airflow One-Click App","ordinal":15,"logo_url":"assets/apacheairflow.svg","images":["linode/ubuntu20.04"],"deployments_total":108,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-12-20T17:32:08","updated":"2023-09-27T22:45:08","rev_note":"","script":"#!/bin/bash\n#\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n# install depends\nexport DEBIAN_FRONTEND=noninteractive\nsudo apt update\n#sudo apt -y upgrade\nsudo apt install -y python3-pip\nsudo apt install -y build-essential libssl-dev libffi-dev python3-dev\nsudo apt install -y python3-venv # One of the Airflow examples requires virtual environments\n\nexport AIRFLOW_HOME=~/airflow\n\n# Install Airflow using the constraints file\nAIRFLOW_VERSION=2.4.1\nPYTHON_VERSION=\"$(python3 --version | cut -d \" \" -f 2 | cut -d \".\" -f 1-2)\"\n# For example: 3.7\nCONSTRAINT_URL=\"https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt\"\n# For example: https://raw.githubusercontent.com/apache/airflow/constraints-2.4.1/constraints-3.7.txt\npip install \"apache-airflow==${AIRFLOW_VERSION}\" --constraint \"${CONSTRAINT_URL}\"\n\n# The Standalone command will initialise the database, make a user,\n# and start all components for you.\nairflow standalone &\n\n###\n# \n# systemd unit file and per component settings go here\n# \n### \n\n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${DEFAULT_RDNS};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http \nufw allow https \nsystemctl enable ufw\n\nsleep 60 \n\n## install SSL certs. required \npip install pyOpenSSL --upgrade\napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n\n## write some login details\nexport ADMIN_PASS=$(cat /root/airflow/standalone_admin_password.txt)\ncat < /etc/motd \nThe installation of Apache Airflow is now complete, and the application is running in standalone mode.\n#\nYou can log into the Airflow GUI at ${ABS_DOMAIN}\nWith the credentials: \nUsername: admin\nPassword: ${ADMIN_PASS}\n#\nStandalone mode is not recommended for production.\nEND\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1160820,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Appwrite One-Click","description":"Appwrite One-Click ","ordinal":16,"logo_url":"assets/appwrite.svg","images":["linode/ubuntu22.04"],"deployments_total":130,"deployments_active":12,"is_public":true,"mine":false,"created":"2023-04-21T13:09:13","updated":"2023-09-28T00:16:08","rev_note":"","script":"#!/bin/bash\n### linode \n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nbash ./get-docker.sh\n\n# install haveged\nsudo apt-get install -y haveged\n\n# Install Appwrite\n# Grab latest version\nappversion=$(curl -s https://api.github.com/repos/appwrite/appwrite/releases/latest | grep -oP '\"tag_name\": \"\\K.*?(?=\")')\n\ndocker run --rm \\\n --volume /var/run/docker.sock:/var/run/docker.sock \\\n --volume \"$(pwd)\"/appwrite:/usr/src/code/appwrite:rw \\\n appwrite/appwrite:$appversion sh -c \"install --httpPort=80 --httpsPort=443 --interactive=N\"\n\necho \"Installation complete!\"","user_defined_fields":[]},{"id":401699,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ark One-Click","description":"Ark - Latest One-Click","ordinal":17,"logo_url":"assets/Ark@1x.svg","images":["linode/debian11"],"deployments_total":1123,"deployments_active":5,"is_public":true,"mine":false,"created":"2019-03-08T21:05:54","updated":"2023-09-09T18:16:56","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"arkserver\"\n\nset_hostname\napt_setup_update\n\n\n# ARK specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc-s1 libstdc++6 libstdc++6:i386 \n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install ARK\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\nsed -i s/XPMultiplier=.*/XPMultiplier=\"$XPMULTIPLIER\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPassword=.*/ServerPassword=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerHardcore=.*/ServerHardcore=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPVE=.*/ServerPVE=\"$SERVERPVE\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/Message=.*/Message=\"$MOTD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/SessionName=.*/SessionName=\"$SESSIONNAME\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerAdminPassword=.*/ServerAdminPassword=\"\\\"$RCONPASSWORD\\\"\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015/udp\nufw allow 7777:7778/udp\nufw allow 27020/tcp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rconpassword","label":"RCON password"},{"name":"sessionname","label":"Server Name","default":"Ark Server"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"serverpassword","label":"Server Password","default":""},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"True,False","default":"False"},{"name":"xpmultiplier","label":"XP Multiplier","oneof":"1,1.5,2,5,10,20","default":"2"},{"name":"serverpve","label":"Server PvE","oneof":"True,False","default":"False"}]},{"id":662118,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Azuracast One-Click","description":"AzuraCast One-Click","ordinal":18,"logo_url":"assets/azuracast.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":2587,"deployments_active":202,"is_public":true,"mine":false,"created":"2020-08-12T15:50:09","updated":"2023-09-28T02:16:33","rev_note":"","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, apt configuration and update/upgrade\nset_hostname\napt_setup_update\n\n# Install GIT\napt-get update && apt-get install -q -y git\n# Cloning AzuraCast and install\nmkdir -p /var/azuracast\ncd /var/azuracast\ncurl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh > docker.sh\nchmod a+x docker.sh\nyes 'Y' | ./docker.sh setup-release\nyes '' | ./docker.sh install\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":913277,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BeEF One-Click","description":"BeEF One-Click","ordinal":19,"logo_url":"assets/beef.svg","images":["linode/ubuntu22.04"],"deployments_total":29200,"deployments_active":1310,"is_public":true,"mine":false,"created":"2021-09-30T18:28:58","updated":"2023-09-28T20:31:48","rev_note":"","script":"#!/bin/bash\n#\n# Script to install BEEF on Linode\n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nbeef_config=\"/home/beef/config.yaml\"\nkey=\"privkey.pem\"\ncert=\"fullchain.pem\"\n\n# System Update\napt_setup_update\n\n# UFW\nufw allow 80\nufw allow 443\nufw allow 3000\n\nfunction configure_nginx {\n apt install git nginx -y\n # NGINX\n mkdir -p /var/www/certs/.well-known\n chown -R www-data:www-data /var/www/certs/\n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\n\nfunction configure_ssl {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction create_beef_user {\n function create_beef {\n groupadd --system beef\n useradd -s /sbin/nologin --system -g beef beef\n }\n\n grep beef /etc/passwd\n if [ $? -eq 1 ];then\n create_beef\n else\n echo \"[INFO] beef already on the system. Deleting user\"\n deluser --remove-home beef\n create_beef\n fi\n}\n\nfunction configure_beef {\n git clone https://github.com/beefproject/beef.git /home/beef\n chown -R beef: /home/beef\n cd /home/beef\n cp /etc/letsencrypt/live/$FQDN/$key .\n cp /etc/letsencrypt/live/$FQDN/$cert .\n\n # get line number to replace\n get_https_enable=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"enable:\" | awk -F \"-\" {'print $1'})\n get_https_public_enabled=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"public_enabled:\" | awk -F \"-\" {'print $1'})\n\n # replacing line numebr\n sed -i \"\"$get_https_enable\"s/enable: false/enable: true/\" $beef_config\n sed -i \"\"$get_https_public_enabled\"s/public_enabled: false/public_enabled: true/\" $beef_config\n sed -i \"/key:/c\\ key: \\\"$key\\\"\" $beef_config\n sed -i \"/cert:/c\\ cert: \\\"$cert\\\"\" $beef_config\n\n # creds\n #sed -i \"/user:/c\\ user: \\\"beef\\\"\" $beef_config\n sed -i \"/passwd:/c\\ passwd: \\\"$BEEFPASSWORD\\\"\" $beef_config\n\n # install local copy of beef\n yes | ./install\n}\n\nfunction beef_startup {\n cat < /home/beef/start_beef\n#!/bin/bash\nfunction start_beef {\n cd /home/beef\n echo no | ./beef\n}\nstart_beef\nEOF\n chown -R beef:beef /home/beef\n chmod +x /home/beef/start_beef\n}\n \nfunction beef_job {\n cat < /etc/systemd/system/beef.service\n[Unit]\nDescription=Browser Exploitation Framework\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=beef\nGroup=beef\nExecStart=/home/beef/start_beef\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start beef\n systemctl enable beef\n}\n\nfunction ssl_renew_cron {\n cat </root/certbot-beef-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & BeEf\n# Debug\n# set -xo pipefail\nexport BEEF_FULL=/home/beef/fullchain.pem\nexport BEEF_PRIVKEY=/home/beef/privkey.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat \\$FULLCHAIN > \\$BEEF_FULL\ncat \\$PRIVKEY > \\$BEEF_PRIVKEY\nservice beef reload\nEND\n chmod +x /root/certbot-beef-renewal.sh\n\n# Setup Cron\n crontab -l > cron\n echo \"* 1 * * 1 bash /root/certbot-beef-renewal.sh\" >> cron\n crontab cron\n rm cron\n\n}\n\nfunction install_complete {\n cat < /root/beef.info\n##############################\n# BEEF INSTALLATION COMPLETE #\n##############################\nEndpoint: https://$FQDN:3000/ui/panel\nCredentials can be found here:\n/home/beef/config.yaml\nHappy hunting!\nEOF\n}\n\nfunction main {\n create_beef_user\n configure_nginx\n configure_ssl\n configure_beef\n beef_startup\n beef_job\n ssl_renew_cron\n install_complete\n}\nmain\n\n# Clean up\nstackscript_cleanup\ncat /root/beef.info","user_defined_fields":[{"name":"beefpassword","label":"BEEF Password"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode. The username cannot contain any spaces or capitol letters. For this application the username 'beef' is reserved for the application, so please choose an alternative username for this deployment.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BitNinja One-Click","description":"BitNinja One-Click","ordinal":20,"logo_url":"assets/bitninja.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":34,"deployments_active":1,"is_public":true,"mine":false,"created":"2021-10-18T01:03:02","updated":"2023-09-26T10:24:43","rev_note":"","script":"#!bin/bash\n\n# \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nwget -qO- https://get.bitninja.io/install.sh | /bin/bash -s - --license_key=\"$license_key\" -y","user_defined_fields":[{"name":"license_key","label":"License Key"}]},{"id":1037036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Budibase One-Click","description":"Budibase One Click App","ordinal":21,"logo_url":"assets/budibase.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":400,"deployments_active":25,"is_public":true,"mine":false,"created":"2022-08-02T18:42:41","updated":"2023-09-28T19:59:34","rev_note":"","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker.io\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Install Docker Compose\ncurl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\ndocker-compose --version\n\necho \"Creating passwords for /opt/budibase/.env\"\nVAR_JWT_SECRET=$(pwgen 16)\nVAR_MINIO_ACCESS_KEY=$(pwgen 16)\nVAR_MINIO_SECRET_KEY=$(pwgen 16)\nVAR_COUCH_DB_PASSWORD=$(pwgen 16)\nVAR_REDIS_PASSWORD=$(pwgen 16)\nVAR_INTERNAL_API_KEY=$(pwgen 16)\nIP=`hostname -I | awk '{print$1}'`\n\nmkdir -p /opt/budibase\ncd /opt/budibase\necho \"Fetch budibase docker compose file\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/docker-compose.yaml -o /opt/budibase/docker-compose.yml\necho \"Fetch budibase .env template\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/.env -o /opt/budibase/.env\necho \"Set passwords in /opt/budibase/.env\"\nsed -i \"s/JWT_SECRET=testsecret/JWT_SECRET=$VAR_JWT_SECRET/\" /opt/budibase/.env\nsed -i \"s/MINIO_ACCESS_KEY=budibase/MINIO_ACCESS_KEY=$VAR_MINIO_ACCESS_KEY/\" /opt/budibase/.env\nsed -i \"s/MINIO_SECRET_KEY=budibase/MINIO_SECRET_KEY=$VAR_MINIO_SECRET_KEY/\" /opt/budibase/.env\nsed -i \"s/COUCH_DB_PASSWORD=budibase/COUCH_DB_PASSWORD=$VAR_COUCH_DB_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/REDIS_PASSWORD=budibase/REDIS_PASSWORD=$VAR_REDIS_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/INTERNAL_API_KEY=budibase/INTERNAL_API_KEY=$VAR_INTERNAL_API_KEY/\" /opt/budibase/.env\nsed -i \"s/MAIN_PORT=10000/MAIN_PORT=$BBPORT/\" /opt/budibase/.env\ndocker-compose up -d\n\ncat </etc/profile.d/budibase_welcome.sh\n#!/bin/sh\n#\nIP=$(hostname -I | awk '{print$1}')\necho \"\n********************************************************************************\nWelcome to Budibase!\nTo help keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH) and the Web UI port $BBPORT.\n********************************************************************************\n # Budibase UI: http://$IP:$BBPORT/\n # Website: https://budibase.com\n # Documentation: https://docs.budibase.com\n # Github: https://github.com/Budibase/budibase\n # Community Support: https://github.com/Budibase/budibase/discussions\n # Restart Budibase: cd /opt/budibase; docker-compose down; docker-compose up -d\n # Budibase config: /etc/budibase/.env\n\"\nEND\nchmod +x /etc/profile.d/budibase_welcome.sh\n# Enable UFW and add some rules to it\nufw enable\nufw limit ssh/tcp comment 'Rate limit the SSH port'\nufw allow $BBPORT/tcp comment \"TCP Listen port for Budibase\"\nufw --force enable\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"BBPORT","label":"Budibase Port","example":"Default: 80","default":"80"}]},{"id":869155,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Chevereto One-Click","description":"Chevereto One-Click","ordinal":22,"logo_url":"assets/chevereto.svg","images":["linode/ubuntu20.04"],"deployments_total":231,"deployments_active":8,"is_public":true,"mine":false,"created":"2021-07-20T19:07:56","updated":"2023-09-24T13:57:40","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/chevereto/linode-marketplace\n\nset -e\n\nCHEVERETO_INSTALLER_TAG=\"3.1.0\"\nWORKING_DIR=\"/var/www/html\"\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php\napt install -y mysql-server\napt install -y php\napt install -y php-{common,cli,curl,fileinfo,gd,imagick,intl,json,mbstring,mysql,opcache,pdo,pdo-mysql,xml,xmlrpc,zip}\napt install -y python3-certbot-apache software-properties-common unzip\n\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\n\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Chevereto at http://\\$myip/installer.php\n * Secure your database by running:\n > mysql_secure_installation\n * Setup email delivery at http://\\$myip/dashboard/settings/email\nFor help and more information visit https://chevereto.com\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\n\ncat >/etc/cron.d/chevereto </etc/php/7.4/apache2/conf.d/chevereto.ini <>/var/log/per-instance.log\n\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\n\nCHEVERETO_DB_HOST=localhost\nCHEVERETO_DB_PORT=3306\nCHEVERETO_DB_NAME=chevereto\nCHEVERETO_DB_USER=chevereto\nCHEVERETO_DB_PASS=$(openssl rand -hex 16)\n\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\n\necho \"[OK] Chevereto Installer $CHEVERETO_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":869158,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ClusterControl One-Click","description":"ClusterControl One-Click","ordinal":23,"logo_url":"assets/clustercontrol.svg","images":["linode/ubuntu20.04"],"deployments_total":160,"deployments_active":3,"is_public":true,"mine":false,"created":"2021-07-20T19:13:44","updated":"2023-09-20T21:12:51","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Severalnines settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\nworkdir=/tmp\nIP=`hostname -I | awk '{print$1}'`\n# if command -v dig &>/dev/null; then\n# echo -e \"\\nDetermining network interfaces.\" \n# ext_ip=$(dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null)\n# [[ ! -z $ext_ip ]] && IP=${ext_ip}\n# fi\nlog_progress() {\n\n echo \"$1\" >> /root/cc_install.log\n}\n\ninstall_cc() {\n export HOME=/root\n export USER=root\n wget --no-check-certificate https://severalnines.com/downloads/cmon/install-cc\n chmod +x install-cc\n echo \"mysql cmon password = $CMONUSER_PASSWORD\" >> /root/.cc_passwords\n echo \"mysql root password = $DBROOT_PASSWORD\" >> /root/.cc_passwords\n SEND_DIAGNOSTICS=0 S9S_CMON_PASSWORD=$CMONUSER_PASSWORD S9S_ROOT_PASSWORD=$DBROOT_PASSWORD INNODB_BUFFER_POOL_SIZE=256 ./install-cc\n}\n\nfirstboot() {\n hostnamectl set-hostname clustercontrol\n\n ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N \"\"\n ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub\n SSH_KEY=$(cat /root/.ssh/id_rsa.pub)\n\n cat < /etc/update-motd.d/99-cc-motd \n#!/bin/sh\necho \"###\"\necho \"\"\necho \"Welcome to Severalnines Database Monitoring and Management Application - ClusterControl\"\necho \"Open your web browser to http://${IP}/clustercontrol to access ClusterControl's web application\"\necho \"\"\necho \"The public SSH key (root) is:\"\necho \"$SSH_KEY\"\necho \"\"\necho \"###\"\nEND\n\n chmod +x /etc/update-motd.d/99-cc-motd\n}\n\nenable_fw() {\n ufw default deny incoming\n ufw default allow outgoing\n ufw allow ssh\n ufw allow http\n ufw allow https\n ufw allow 9999\n ufw allow 9501\n}\n\ncleanup() {\n rm -rf /tmp/* /var/tmp/* /root/scripts\n history -c\n cat /dev/null > /root/.bash_history\n unset HISTFILE\n\n apt-get -y autoremove\n apt-get -y autoclean\n\n cat /dev/null > /var/log/lastlog; cat /dev/null > /var/log/wtmp; cat /dev/null > /var/log/auth.log\n\n ufw enable\n ufw status\n\n touch /.cc-provisioned\n}\n\nlog_progress \"** Installing ClusterControl, this could take several minutes. Please wait ...\"\ninstall_cc\nlog_progress \"** Setting motd ...\"\nfirstboot\nlog_progress \"** Enabling firewall ...\"\nenable_fw\nif [[ \"$SSL\" == \"Yes\" ]]; then\n log_progress \"** Enabling Let's Encrypt SSL ...\"\n python --version | grep -q 3.\n [[ $? -eq 0 ]] && PYTHON3=1\n if [[ -n $PYTHON3 ]]; then\n apt install -y certbot python3-certbot-apache\n else\n apt install -y certbot python-certbot-apache\n fi\n\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\ncleanup\n\n# Clean up\nlog_progress \"** Stackscript cleanup please wait ...\"\nstackscript_cleanup\n\nlog_progress \"** Installation successful...\"\n/etc/update-motd.d/99-cc-motd | tee -a /root/cc_install.log\n\nsystemctl restart sshd","user_defined_fields":[{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"cmonuser_password","label":"CMON user password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above)","oneof":"Yes,No","default":"Yes"}]},{"id":401700,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CS:GO One-Click","description":"CS:GO - Latest One-Click","ordinal":24,"logo_url":"assets/CSGO2.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":2133,"deployments_active":13,"is_public":true,"mine":false,"created":"2019-03-08T21:06:26","updated":"2023-09-27T14:31:44","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"csgoserver\"\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\n#Buyanywhere\nif [[ \"$BUYANYWHERE\" = \"Enabled\" ]]; then\n BUYANYWHERE=1\nelif [[ \"$BUYANYWHERE\" = \"Disabled\" ]]; then\n BUYANYWHERE=0\nelif [[ \"$BUYANYWHERE\" = \"Terrorists Only\" ]]; then\n BUYANYWHERE=2\nelif [[ \"$BUYANYWHERE\" = \"Counter-Terrorists Only\" ]]; then\n BUYANYWHERE=3\nfi\n\n#friendlyfire\n\nif [[ \"$FRIENDLYFIRE\" = \"Enabled\" ]]; then\n FRIENDLYFIRE=1\nelif [[ \"$FRIENDLYFIRE\" = \"Disabled\" ]]; then\n FRIENDLYFIRE=0\nfi\n\nset_hostname\napt_setup_update\n\n\n# CSGO specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install CSGO\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\n> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\n\ncat <> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsv_contact \"\"\nsv_lan 0\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile 0\nsv_hibernate_when_empty 1\nsv_hibernate_ms 5\nhost_name_store 1\nhost_info_show 1\nhost_players_show 2\nexec banned_user.cfg\nexec banned_ip.cfg\nwriteid\nwriteip\nEND\n\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"hostname $SERVERNAME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_roundtime $ROUNDTIME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsed -i s/mp_buy_anywhere.*/mp_buy_anywhere\\ \"$BUYANYWHERE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_maxrounds.*/mp_maxrounds\\ \"$MAXROUNDS\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_friendlyfire.*/mp_friendlyfire\\ \"$FRIENDLYFIRE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"$MOTD\" > /home/csgoserver/serverfiles/csgo/motd.txt\n\n\nif [[ \"$FRIENDLYFIRE\" = \"1\" ]]; then\nsed -i s/ff_damage_reduction_bullets.*/ff_damage_reduction_bullets\\ 0\\.85/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade.*/ff_damage_reduction_gernade\\ 0\\.33/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade_self.*/ff_damage_reduction_gernade_self\\ 0\\.4/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_other.*/ff_damage_reduction_other\\ 1/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"sv_kick_ban_duration 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_disable_autokick 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nfi\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015\nufw allow 27020/udp\nufw allow 27005/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server."},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode CS:GO Server"},{"name":"rconpassword","label":"RCON password"},{"name":"svpassword","label":"CSGO server password","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"roundtime","label":"Round Time Limit","oneof":"5,10,15,20,60","default":"5"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,5,10,15,20","default":"10"},{"name":"buyanywhere","label":"Buy Anywhere ","oneof":"Disabled,Enabled,Counter-Terrorists Only, Terrorists Only","default":"Disabled"},{"name":"friendlyfire","label":"Friendly Fire Enabled","oneof":"Enabled,Disabled","default":"Disabled"}]},{"id":688891,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Discourse One-Click","description":"Discourse One-Click","ordinal":25,"logo_url":"assets/discourse.svg","images":["linode/ubuntu20.04"],"deployments_total":1175,"deployments_active":62,"is_public":true,"mine":false,"created":"2020-11-17T20:55:26","updated":"2023-09-25T19:26:31","rev_note":"","script":"#!/bin/bash\n\n## Discourse Settings\n\n#\n#\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n#Install dependencies needed for Discourse\napt install git apt-transport-https ca-certificates curl software-properties-common net-tools -y\n\n#Clone Discourse Docker repo for install and management\ngit clone https://github.com/discourse/discourse_docker.git /var/discourse\n#UFW Firewall Rules\nufw allow http\nufw allow https\nufw allow 25\nufw allow 465\nufw allow 587\nufw enable <\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Python & Django\napt-get install -y python3 python3-pip\npip3 install Django\n\n# Create & Setup Django APP\nmkdir /var/www/\ncd /var/www/\ndjango-admin startproject DjangoApp\ncd DjangoApp\npython3 manage.py migrate\necho \"from django.contrib.auth.models import User; User.objects.create_superuser('$DJANGOUSER', '$DJANGOUSEREMAIL', '$DJANGOUSERPASSWORD')\" | python3 manage.py shell\nsed -i \"s/ALLOWED_HOSTS = \\[\\]/ALLOWED_HOSTS = \\['$IP'\\]/g\" DjangoApp/settings.py\npython3 manage.py runserver 0.0.0.0:8000 &\n\n# Start Django app on reboot\ncrontab -l | { cat; echo \"@reboot cd /var/www/DjangoApp && python3 manage.py runserver 0.0.0.0:8000 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"djangouser","label":"Django USER","example":"user1"},{"name":"djangouserpassword","label":"Django Password","example":"s3cure_p4ssw0rd"},{"name":"djangouseremail","label":"Django USER email","example":"user@email.tld"}]},{"id":607433,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Docker One-Click","description":"Docker One Click App","ordinal":27,"logo_url":"assets/docker.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":32209,"deployments_active":1858,"is_public":true,"mine":false,"created":"2019-10-31T20:14:04","updated":"2023-09-28T20:20:50","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Docker Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n### Logging and other debugging helpers\n\n## Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n## install docker\napt install docker docker-compose -y\n\n# Download the Dockerfile, if specified\nif [[ -n ${DOCKERFILE} ]]; then\ncurl -LO \"$DOCKERFILE\"\nelse echo \"No Dockerfile\";\nfi\n\n# Wait 2 seconds, then run the container\nsleep 2\nif [[ -n ${RUNCMD} ]]; then\n$RUNCMD &\nelse echo \"No Docker command\";\nfi\n\nstackscript_cleanup","user_defined_fields":[{"name":"dockerfile","label":"Resource to download?","example":"URL to Dockerfile or docker-compose.yml","default":""},{"name":"runcmd","label":"Command to run?","example":"docker run --name spigot --restart unless-stopped -e JVM_OPTS=-Xmx4096M -p 25565:25565 -itd example/docker-spigot","default":""},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required if filling out any of the domain-related fields.","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":401698,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Drupal One-Click","description":"Drupal One-Click","ordinal":28,"logo_url":"assets/Drupal.svg","images":["linode/ubuntu22.04"],"deployments_total":1792,"deployments_active":83,"is_public":true,"mine":false,"created":"2019-03-08T21:04:47","updated":"2023-09-28T04:16:26","rev_note":"","script":"#!/usr/bin/env bash\n## Drupal Settings\n# \n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, apt configuration and update/upgrade\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Install/configure UFW\nufw allow http\nufw allow https\n\n# Install/configure MySQL\napt-get install mariadb-server -y\nsystemctl start mariadb\nsystemctl enable mariadb\nmysql_root_preinstall\nrun_mysql_secure_installation\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE drupaldb\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT ALL ON drupaldb.* TO 'drupal'@'localhost' IDENTIFIED BY '$DB_PASSWORD'\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\n# Install & Configure Apache\napt-get install -y apache2\ntouch /var/log/apache2/drupal-error_log /var/log/apache2/drupal-access_log\ncp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/drupal.conf\ncat < /etc/apache2/sites-available/drupal.conf\n\n DocumentRoot /var/www/drupal\n ServerName $FQDN\n ServerAlias www.$FQDN\n \n Options FollowSymLinks\n AllowOverride All\n Order allow,deny\n allow from all\n RewriteEngine on\n RewriteBase /\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteCond %{REQUEST_URI} !=/favicon.ico\n RewriteRule ^ index.php [L]\n\n ErrorLog /var/log/apache2/drupal-error_log\n CustomLog /var/log/apache2/drupal-access_log common\n\nEND\na2enmod rewrite\na2dissite 000-default.conf\na2ensite drupal.conf\nsed -ie \"s/KeepAlive Off/KeepAlive On/g\" /etc/apache2/apache2.conf\nsystemctl restart apache2\nsystemctl enable apache2\n\n# Install PHP 8.1\napt-get install php libapache2-mod-php php-mysql php-curl php-cgi php-gd php-mbstring php-xml php-xmlrpc -y\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat < /etc/php/$PHP_VERSION/apache2/php.ini\nerror_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR\nerror_log = /var/log/php/error.log\nmax_input_time = 30\nEND\nmkdir /var/log/php\nchown www-data /var/log/php\n\n# Install Drupal\nrm -r /var/www/html\ncd ~; wget -4 https://www.drupal.org/download-latest/tar.gz\ntar -xf tar.gz -C /var/www/ && mv /var/www/drupal* /var/www/drupal\nrm tar.gz\nmkdir /var/www/drupal/sites/default/files\nchmod a+w /var/www/drupal/sites/default/files\ncp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php\nchmod a+w /var/www/drupal/sites/default/settings.php\ncat <> /var/www/drupal/sites/default/settings.php\n\\$settings['trusted_host_patterns'] = [\n '^$FQDN\\$',\n];\nEND\n\n# Cleanup\nsystemctl restart apache2\nsystemctl restart mysql\n\n# SSL\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"dbroot_password","label":"MySQL root Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"db_password","label":"Database Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Drupal server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1008125,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Easypanel One-Click","description":"Easypanel One-Click","ordinal":29,"logo_url":"assets/easypanel.svg","images":["linode/ubuntu22.04"],"deployments_total":1267,"deployments_active":83,"is_public":true,"mine":false,"created":"2022-05-18T16:43:00","updated":"2023-09-28T14:40:21","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nsh get-docker.sh\n\n# setup easypanel\ndocker run --rm \\\n -v /etc/easypanel:/etc/easypanel \\\n -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n easypanel/easypanel setup","user_defined_fields":[]},{"id":691620,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"FileCloud One-Click","description":"FileCloud One-Click","ordinal":30,"logo_url":"assets/filecloud.svg","images":["linode/ubuntu20.04"],"deployments_total":713,"deployments_active":17,"is_public":true,"mine":false,"created":"2020-11-30T21:16:19","updated":"2023-09-26T11:32:26","rev_note":"","script":"#!/bin/bash \n\n## Domain Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source and run the New Linode Setup script for DNS configuration\n# This also sets some useful variables, like $IP and $FQDN\n\nsource \n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nset pipefail -o\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Allow traffic on ports 80 and 443\nufw allow 80\nufw allow 443\n\n# Installing Filecloud and Prequisites\nwget -qO - https://repo.filecloudlabs.com/static/pgp/filecloud.asc | sudo apt-key add -\nwget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\necho \"deb [ arch=amd64 ] https://repo.filecloudlabs.com/apt/ubuntu focal/filecloud/22.1 main\" | sudo tee /etc/apt/sources.list.d/filecloud.list\napt-get update -y\napt-get install apache2 mongodb-org -y\napt install -y --no-install-recommends php8.1*\nACCEPT_EULA=Y apt-get install filecloud -y\n\nif [[ \"$SSL\" == \"Yes\" ]]; then\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"ssl","label":"Would you like to use a free CertBot SSL certificate?","oneof":"Yes,No","default":"No"},{"name":"soa_email_address","label":"Email Address for Lets' Encrypt Certificate","default":""},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":609392,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Flask One-Click","description":"Flask One-Click","ordinal":31,"logo_url":"assets/flask.svg","images":["linode/debian10"],"deployments_total":2051,"deployments_active":144,"is_public":true,"mine":false,"created":"2019-11-07T06:24:17","updated":"2023-09-27T18:47:07","rev_note":"Initial import","script":"#!/bin/bash\n\n## Enable logging\nexec > /var/log/stackscript.log 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\nufw_install\nufw allow http\n\n# Install Prereq's & Flask APP\napt install -y git\ncd /home\ngit clone https://github.com/abalarin/Flask-on-Linode.git flask_app_project\n\n# Install & configure Nginx\napt install -y nginx\ncat < /etc/nginx/sites-enabled/flask_app\nserver {\n listen 80;\n server_name $IP;\n location / {\n proxy_pass http://127.0.0.1:8000;\n proxy_set_header Host \\$host;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\n\nunlink /etc/nginx/sites-enabled/default\nnginx -s reload\n\n# Install python & Packages\napt install -y python3 python3-pip\ncd /home/flask_app_project\npip3 install -r flask_app/requirements.txt\n\n# Configure Flask\ncat < /etc/config.json\n{\n \"SECRET_KEY\": \"$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)\",\n \"SQLALCHEMY_DATABASE_URI\": \"sqlite:///site.db\"\n}\nEND\n\ncat < /home/flask_app_project/flask_app/__init__.py\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_login import LoginManager\nimport json\nimport urllib3\napp = Flask(__name__)\nwith open('/etc/config.json') as config_file:\n config = json.load(config_file)\napp.config['SECRET_KEY'] = config.get('SECRET_KEY')\napp.config['SQLALCHEMY_DATABASE_URI'] = config.get('SQLALCHEMY_DATABASE_URI')\ndb = SQLAlchemy(app)\nlogin_manager = LoginManager()\nlogin_manager.init_app(app)\nfrom flask_app import routes\nEND\n\n# Install and Configure Gunicorn\napt install -y gunicorn3\ngunicorn3 --workers=3 flask_app:app &\n\n# Install and Configure Supervisor\napt install -y supervisor\ncat < /etc/supervisor/conf.d/flask_app.conf\n[program:flask_app]\ndirectory=/home/flask_app_project\ncommand=gunicorn3 --workers=3 flask_app:app\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/flask_app/flask_app.err.log\nstdout_logfile=/var/log/flask_app/flask_app.out.log\nEND\n\nmkdir /var/log/flask_app\ntouch /var/log/flask_app/flask_app.out.log\ntouch /var/log/flask_app/flask_app.err.log\nsupervisorctl reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":971045,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Focalboard One-Click","description":"Focalboard One-Click","ordinal":32,"logo_url":"assets/focalboard.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":440,"deployments_active":15,"is_public":true,"mine":false,"created":"2022-02-08T16:23:08","updated":"2023-09-28T15:02:38","rev_note":"","script":"#!/bin/bash\n## Focalboard Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n## Linode Docker OCA\nsource \n\nfunction focalboardinstall {\n docker pull mattermost/focalboard\n docker volume create focalboard\n docker run -d --restart=always -p 8000:8000 -v focalboard:/app/data --name focalboard mattermost/focalboard\n}\n\nfunction nginxreverse {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n server_name $FQDN;\n error_log /var/log/nginx/$FQDN.error;\n access_log /var/log/nginx/$FQDN.access;\n location / {\n proxy_pass http://localhost:8000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n proxy_set_header Host \\$host;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n \n}\n\nfunction ssl_lemp {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n focalboardinstall\n firewall\n nginxreverse\n ssl_lemp\n}\n\n# Execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1088136,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster One-Click","description":"Galera Cluster One-Click","ordinal":33,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":105,"deployments_active":6,"is_public":true,"mine":false,"created":"2022-11-15T20:41:27","updated":"2023-09-27T06:51:30","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_PAT=\"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\"\nexport GIT_REPO=\"https://linode-solutions:${GIT_PAT}@github.com/linode-solutions/galera-mariadb-occ\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/mariadb-galera\" ]; then\n rm -rf /tmp/mariadb-galera\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n export DEBIAN_FRONTEND=noninteractive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # add private IP address\n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/mariadb-galera\n cd /tmp/mariadb-galera/\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip3 install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"cluster_name","label":"Cluster Name"},{"name":"token_password","label":"Your Linode API token"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Galera CA"},{"name":"common_name","label":"Common Name","default":"Galera Server"},{"name":"cluster_size","label":"Galera cluster size","default":"3","oneof":"3"}]},{"id":688911,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gitea One-Click","description":"Gitea One-Click","ordinal":34,"logo_url":"assets/gitea.svg","images":["linode/debian10"],"deployments_total":976,"deployments_active":70,"is_public":true,"mine":false,"created":"2020-11-17T21:16:09","updated":"2023-09-28T12:03:53","rev_note":"","script":"#! /bin/bash\n\n## Database Settings\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n#assigns var for IP address\nreadonly ip=$(hostname -I | awk '{print$1}')\n\n#intall git\napt install -y git\n\n#install nginx\napt install -y nginx\n\n#install mysql and secure\nmysql_root_preinstall\napt-get install -y mariadb-server\nsystemctl start mariadb\nsystemctl enable mariadb\nrun_mysql_secure_installation\n\n#create mysql db and user\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE gitea;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE USER 'gitea'@'localhost' IDENTIFIED BY '$(printf '%q' \"$DB_PASSWORD\")';\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' WITH GRANT OPTION;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES;\"\n\n#create user for gitea\nadduser --system --disabled-password --group --shell /bin/bash --gecos 'Git Version Control' --home /home/git git\n\n#create directories for gitea\nmkdir -p /var/lib/gitea/{custom,data,log}\nchown -R git:git /var/lib/gitea/\nchmod -R 750 /var/lib/gitea/\nmkdir /etc/gitea\nchown root:git /etc/gitea\nchmod 770 /etc/gitea\n\n#pull down gitea binary\nwget -O gitea https://dl.gitea.io/gitea/1.13.0/gitea-1.13.0-linux-amd64\nchmod +x gitea\n\n#validate gpg\napt install gnupg -y\ngpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2\ngpg --verify gitea-1.13.0-linux-amd64.asc gitea-1.13.0-linux-amd64\n\n#copy gitea to global location\ncp gitea /usr/local/bin/gitea\n\n#download systemd file from gitea\nwget https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service -P /etc/systemd/system/\n\n#add requires mysql to the systemd file\nsed -i 's/#Requires=mariadb.service/Requires=mariadb.service/' /etc/systemd/system/gitea.service\n\n#start gitea as systemd service\nsystemctl daemon-reload\nsystemctl start gitea\nsystemctl enable gitea\n\n#configures ufw rules before nginx\nsystemctl start ufw\nufw allow http\nufw allow https\nufw enable\n\n#set absolute domain if any, otherwise use localhost\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=localhost\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:3000;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx\n\nsleep 60\n\n#sets certbot ssl\nif [[ $SSL = \"Yes\" ]]; then\n check_dns_propagation ${ABS_DOMAIN} ${ip}\n apt install python3-certbot-nginx -y\n certbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${EMAIL_ADDRESS} -w /var/www/html/\nfi\n\nstackscript_cleanup","user_defined_fields":[{"name":"dbroot_password","label":"MySQL root Password"},{"name":"db_password","label":"gitea Database Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records.","default":""},{"name":"subdomain","label":"The subdomain for your server (Domain required)","default":""},{"name":"domain","label":"Your domain (API Token required)","default":""},{"name":"soa_email_address","label":"SOA Email for your domain (Required for new domains)","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate for your domain?","oneof":"Yes,No","default":"No"},{"name":"email_address","label":"Admin Email for Let's Encrypt certificate","default":""}]},{"id":401707,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"GitLab One-Click","description":"GitLab One-Click","ordinal":35,"logo_url":"assets/GitLab.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":3169,"deployments_active":140,"is_public":true,"mine":false,"created":"2019-03-08T21:12:21","updated":"2023-09-27T07:05:18","rev_note":"Remove SSH Pubkey UDF","script":"#!/usr/bin/env bash\n\n## Gitlab Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction gitlab {\n # Install dependencies\n apt-get install curl ca-certificates apt-transport-https gnupg2 -y\n\n curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash\n apt-get update -y\n EXTERNAL_URL=\"https://$FQDN\" apt-get install gitlab-ce -y\n\n}\n\nfunction sslgitlab {\n # Taking advantage of Gitlab's Let's Encrypt cert capabilities\n sed -i \"s/# letsencrypt\\['enable'\\] = nil/letsencrypt\\['enable'\\] = true/g\" /etc/gitlab/gitlab.rb\n sed -i -E \"s/(# )(letsencrypt\\['auto_renew*)/\\2/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/letsencrypt['auto_renew_minute'] = nil/letsencrypt['auto_renew_minute'] = 0/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/# letsencrypt\\['contact_emails'\\] = \\[\\]/letsencrypt\\['contact_emails'\\] = \\['$SOA_EMAIL_ADDRESS']/g\" /etc/gitlab/gitlab.rb\n\n gitlab-ctl reconfigure\n}\n\nfunction firewallgitlab {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n gitlab\n firewallgitlab\n sslgitlab\n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Gitlab server's DNS records","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""}]},{"id":1102905,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gopaddle One-Click","description":"Gopaddle One-Click app","ordinal":36,"logo_url":"assets/gopaddle.svg","images":["linode/ubuntu22.04"],"deployments_total":40,"deployments_active":2,"is_public":true,"mine":false,"created":"2022-12-20T17:44:47","updated":"2023-09-23T10:19:09","rev_note":"","script":"#!/bin/bash\nexec >/var/log/stackscript.log 2>&1\n# Install Docker\napt-get update -y\napt-get install -y ca-certificates curl gnupg lsb-release\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\napt-get update -y\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get update -y\napt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\n\n# Install microk8s\napt-get install snapd -y \nsudo snap install core\nexport PATH=$PATH:/snap/bin\nsnap install microk8s --classic --channel=1.25\nsnap refresh microk8s --channel=1.25\nmicrok8s status --wait-ready\n\n\n# Install gopaddle\nmicrok8s addons repo add gp-lite https://github.com/gopaddle-io/microk8s-community-addons-gplite.git\nmicrok8s enable gopaddle-lite\n\necho Waiting for gopaddle services to move to running state ...\nmicrok8s.kubectl wait --for=condition=ready pod -l released-by=gopaddle -n gp-lite --timeout=15m\n\nRDNS=$(dnsdomainname -A | awk '{print $1}')\n\necho gopaddle-lite installation is complete ! You can now access the gopaddle dashboard @ http://$RDNS:30003/","user_defined_fields":[]},{"id":607256,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Grafana One-Click","description":"Grafana One Click App","ordinal":37,"logo_url":"assets/grafana.svg","images":["linode/debian11"],"deployments_total":807,"deployments_active":60,"is_public":true,"mine":false,"created":"2019-10-30T20:43:07","updated":"2023-09-28T18:31:45","rev_note":"","script":"#!/usr/bin/env bash\n\n### Grafana OCA\n\n## Grafana Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Source the Bash StackScript Library\nsource \n\n# Source and run the New Linode Setup script for SSH configuration\nsource \n\n# Install PreReqs\napt-get install -y apt-transport-https \\\nsoftware-properties-common \\\nwget \\\ngnupg2 \\\nsqlite3\n\nwget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\necho \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\napt-get -y update\napt-get -y install grafana\nsystemctl start grafana-server\nsystemctl enable grafana-server\n\n## reset Grafana admin password\n#grafana-cli --homepath \"/usr/share/grafana\" admin reset-admin-password $grafana_password. --not working -hmorris\necho \"Initializing DB.....\" && sleep 25\nsqlite3 /var/lib/grafana/grafana.db <\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction grav {\n apt-get install -y apache2 php libapache2-mod-php php-mysql mysql-server composer php-curl php-common php-gd php-json php-mbstring php-xml php-zip\n run_mysql_secure_installation_ubuntu20\n cd /var/www/html\n git clone https://github.com/getgrav/grav.git\n cd grav\n chown www-data:www-data -R .\n su -l www-data -s /bin/bash -c \"cd /var/www/html/grav && composer install --no-dev -o && bin/grav install && bin/gpm install admin\"\n chown www-data:www-data -R .\n}\n\nfunction apache_conf {\n cat < /etc/apache2/sites-available/grav.conf\n\nServerAdmin $SOA_EMAIL_ADDRESS\nDocumentRoot /var/www/html/grav/\nServerName $FQDN\nServerAlias www.$FQDN\n\nOptions FollowSymLinks\nAllowOverride All\nOrder allow,deny\nallow from all\n\nErrorLog /var/log/apache2/$FQDN-error_log\nCustomLog /var/log/apache2/$FQDN-access_log common\n\n\nEND\n a2enmod rewrite\n a2ensite grav.conf\n a2dissite 000-default.conf\n service apache2 restart\n}\n\nfunction ssl {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n firewall\n grav\n apache_conf\n ssl\n\n}\n\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":688914,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Guacamole One-Click","description":"Guacamole One-Click","ordinal":39,"logo_url":"assets/guacamole.svg","images":["linode/ubuntu22.04"],"deployments_total":4278,"deployments_active":77,"is_public":true,"mine":false,"created":"2020-11-17T21:28:05","updated":"2023-09-27T23:35:48","rev_note":"","script":"#!/usr/bin/env bash\n### Apache Guacamole OCA\n### Required UDFs\n## Guacamole Settings\n#\n#\n#\n#\n#\n### Optional UDFs\n## Linode/SSH Security Settings\n#\n#\n## Domain Settings\n#\n#\n#\n## Logging and other debugging helpers\n# Put bash into verbose mode\nset -o pipefail\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Imports\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n### Main Script\n## Open the needed firewall ports\nufw allow http\nufw allow https\n# Install dependencies\nsystem_install_package build-essential libcairo2-dev libpng-dev libtool-bin libossp-uuid-dev libvncserver-dev freerdp2-dev libssh2-1-dev \\\nlibtelnet-dev libwebsockets-dev libpulse-dev libvorbis-dev libwebp-dev \\\nlibssl-dev libpango1.0-dev libswscale-dev libavcodec-dev libavutil-dev \\\nlibavformat-dev\n# Download the Guacamole Server source code\n# Fetch the latest release page\nlatest_release_page=$(curl -sL https://guacamole.apache.org/releases/ | grep -m 1 -o 'href=\"/releases/[0-9.]\\+/\"')\n# Extract the version number from the release page URL\nlatest_version=$(echo $latest_release_page | grep -Eo '[0-9]\\.[0-9]+.[0-9]+')\n# Download the server component\nwget https://downloads.apache.org/guacamole/$latest_version/source/guacamole-server-$latest_version.tar.gz\ntar -xvf guacamole-server-$latest_version.tar.gz\ncd guacamole-server-$latest_version\n# Build Guacamole Server using the downloaded source code\n./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots\nmake\nmake install\n# Update installed library cache and reload systemd\nldconfig\nsystemctl daemon-reload\n# Start guacd\nsystemctl enable guacd\n## Install Guacamole Web App\n# Install Apache Tomcat\nsystem_install_package tomcat9 tomcat9-admin tomcat9-common tomcat9-user\n# Download and install the Guacamole Client\nwget https://downloads.apache.org/guacamole/$latest_version/binary/guacamole-$latest_version.war\nmv guacamole-$latest_version.war /var/lib/tomcat9/webapps/guacamole.war\nsystemctl restart tomcat9 guacd\n## Guacamole configs\nmkdir /etc/guacamole\nreadonly ENCRYPTED_GUACAMOLE_PASSWORD=\"$(echo -n \"$GUACAMOLE_PASSWORD\" | openssl md5 | awk '{print $2}')\"\ncat <> /etc/guacamole/user-mapping.xml\n\n \n \n \n \n vnc\n localhost\n 5901\n ${PASSWORD}\n \n \n\nEOF\ncat <> /etc/guacamole/guacd.conf\n[daemon]\npid_file = /var/run/guacd.pid\n#log_level = debug\n[server]\nbind_host = 127.0.0.1\nbind_port = 4822\nEOF\ncat <> /etc/guacamole/guacamole.properties\n# Hostname and port of guacamole proxy\nguacd-hostname: localhost\nguacd-port: 4822\nEOF\nsystemctl restart tomcat9 guacd\n## Install a desktop environment (XFCE) and VNC Server\n# Install XFCE & NVC\nsystem_install_package xfce4 xfce4-goodies tigervnc-standalone-server expect\n# Set the VNC Server password\nreadonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\nsystemctl restart tomcat9 guacd\nkillvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\nkill $killvncprocess\n# Create a systemd service for Tiger VNC\ntouch /etc/systemd/system/vncserver@.service\ncat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n# Start and enable the systemd service\nsystemctl start vncserver@1.service\nsystemctl enable vncserver@1.service\n## Reverse proxy for the Guacamole client\n# Install Apache\napache_install\na2enmod proxy proxy_http headers proxy_wstunnel\n# Create the VirtualHost for Guacamole\ncat < /etc/apache2/sites-available/guacamole.conf\n\n ServerName $FQDN\n ErrorLog ${APACHE_LOG_DIR}/guacamole_error.log\n CustomLog ${APACHE_LOG_DIR}/guacamole_access.log combined\n \n Require all granted\n ProxyPass http://localhost:8080/guacamole/ flushpackets=on\n ProxyPassReverse http://localhost:8080/guacamole/\n \n \n Require all granted\n ProxyPass ws://localhost:8080/guacamole/websocket-tunnel\n ProxyPassReverse ws://localhost:8080/guacamole/websocket-tunnel\n \n Header always unset X-Frame-Options\n\nEOF\n# Enable the VirtualHost\na2ensite guacamole.conf\nsystemctl restart apache2\n## HTTPS\nsystem_install_package python3-certbot-apache\ncertbot -n --apache --agree-tos --redirect --hsts --staple-ocsp --email \"$SOA_EMAIL_ADDRESS\" -d \"$FQDN\" \n## Cleanup after ourselves\nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo/VNC user to be created for the Linode"},{"name":"password","label":"The password for the limited sudo/VNC user"},{"name":"guacamole_user","label":"The username to be used with Guacamole"},{"name":"guacamole_password","label":"The password to be used with Guacamole"},{"name":"soa_email_address","label":"Email for SSL certificate"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required if filling out any of the domain-related fields.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record","default":""},{"name":"domain","label":"The domain for the Linode's DNS record","default":""}]},{"id":1102902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HaltDOS Community WAF One-Click","description":"HaltDOS Community WAF One-Click app","ordinal":40,"logo_url":"assets/haltdos.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":153,"deployments_active":9,"is_public":true,"mine":false,"created":"2022-12-20T17:34:20","updated":"2023-09-25T03:04:51","rev_note":"","script":"#!/bin/bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\necho -e \"\\n---------------HALTDOS COMMUNITY WAF SETUP---------------\"\n\nexport NEEDRESTART_SUSPEND=1\nip=`ip route get 8.8.8.8 | awk -F\"src \" 'NR==1{split($2,a,\" \");print a[1]}'`\necho -e \"Checking OS ...\"\nsource /etc/os-release > /dev/null 2>&1\narch=`uname -m`\nif [[ \"$ID\" == \"ubuntu\" || \"$ID\" == \"debian\" ]]; then\n if [[ \"$VERSION_ID\" == \"18.04\" || \"$VERSION_ID\" == \"20.04\" || \"$VERSION_ID\" == \"22.04\" || \"$VERSION_ID\" == \"11\" ]]; then\n if [ \"$arch\" != \"x86_64\" ]; then\n echo -e \"\\e[1;31m$arch is not yet supported. Supported System Architecture - x86_64 \\e[0m\"\n fi\n else\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported OS - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\n fi\nelse\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported Versions - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\nfi\n\necho -e \"Downloading dependencies ...\"\n\napt-get update &> /dev/null\n\napt-get install -y default-jdk default-jre &> /dev/null\necho \"JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/\" >> /etc/environment\nsource /etc/environment\n\necho -e \"Downloading latest binaries ...\"\n\nsource /etc/os-release > /dev/null 2>&1\nif [ \"$VERSION_ID\" == \"18.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null \n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-18/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"20.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-20/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"22.04\" ]; then\n apt-get install -y libmaxminddb-dev libmaxminddb0 mmdb-bin python2-dev python2 &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-22/hd-community-waf-x86_64.deb &> /dev/null\nelif [[ \"$ID\" == \"debian\" && \"$VERSION_ID\" == \"11\" ]]; then\n apt-get install -y sudo libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/debian-11/hd-community-waf-x86_64.deb &> /dev/null\nfi\n\napt-get install -y ./hd-community-waf.deb &> /dev/null\nrm hd-community-waf.deb\necho -e \"Haltdos Community WAF Installed\"\n\n\ncurl -s -k -o hd-community-controller.deb https://binary.haltdos.com/community/waf/gui/hd-community-controller-x86_64.deb &> /dev/null\napt-get install -y ./hd-community-controller.deb &> /dev/null\nrm hd-community-controller.deb\necho -e \"Haltdos Community Controller Installed\"\n\n\necho -e \"Haltdos Community WAF Setup Done\\n\"\necho -e \"Configure your WAF on https://$ip:9000\\n\"\nexport NEEDRESTART_SUSPEND=0","user_defined_fields":[]},{"id":912262,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Harbor One-Click","description":"Harbor One-Click","ordinal":41,"logo_url":"assets/harbor.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":254,"deployments_active":13,"is_public":true,"mine":false,"created":"2021-09-29T17:06:13","updated":"2023-09-26T09:50:59","rev_note":"","script":"#!/bin/bash\n\n## Harbor Settings\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\n## Linode Docker OCA\nsource \n\n# Logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Installation\nufw_install\nufw allow http\nufw allow https\nmkdir -p /data/harbor\ncurl -s https://api.github.com/repos/goharbor/harbor/releases/latest | grep browser_download_url | cut -d '\"' -f 4 | grep '\\.tgz$' | wget -i -\ntar xvzf harbor-offline-installer*.tgz\ncd harbor\ncp harbor.yml.tmpl harbor.yml\n\n# SSL\napt install certbot -y\ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\ncertbot certonly --standalone -d $FQDN --preferred-challenges http --agree-tos -n -m $SOA_EMAIL_ADDRESS --keep-until-expiring\n# Configure auto-renewal for the certificate\ncrontab -l > cron\necho \"* 1 * * 1 /etc/certbot/certbot renew\" >> cron\ncrontab cron\nrm cron\n\ncat < harbor.yml\nhostname: $FQDN\nhttp:\n port: 80\nhttps:\n port: 443\n certificate: /etc/letsencrypt/live/$FQDN/fullchain.pem\n private_key: /etc/letsencrypt/live/$FQDN/privkey.pem\nharbor_admin_password: $HARBOR_PASSWORD\ndatabase:\n password: $HARBOR_DB_PASSWORD\n max_idle_conns: 50\n max_open_conns: 100\ndata_volume: /data/harbor/\nclair:\n updaters_interval: 12\njobservice:\n max_job_workers: 10\nnotification:\n webhook_job_max_retry: 10\nchart:\n absolute_url: disabled\nlog:\n level: info\n local:\n rotate_count: 50\n rotate_size: 200M\n location: /var/log/harbor\nEND\n\n# Harbor install\n./install.sh\n\n# Configure service file\ncat < /etc/systemd/system/harbor.service\n[Unit]\nDescription=Docker Compose Harbor Application Service\nRequires=harbor.service\nAfter=harbor.service\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/local/bin/docker-compose up -d\nExecStop=/usr/local/bin/docker-compose down\nExecReload=/usr/local/bin/docker-compose up -d\nWorkingDirectory=/root/harbor/\n\n[Install]\nWantedBy=multi-user.target\nEND\n\n# Enable harbor daemon\nsystemctl daemon-reload\nsystemctl enable harbor.service\nsystemctl start harbor.service\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"harbor_password","label":"The Harbor admin password"},{"name":"harbor_db_password","label":"The Harbor database password"},{"name":"soa_email_address","label":"Admin Email for the Harbor server"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1037037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad One-Click","description":"HashiCorp Nomad One Click App","ordinal":42,"logo_url":"assets/nomad.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":97,"deployments_active":2,"is_public":true,"mine":false,"created":"2022-08-02T18:46:19","updated":"2023-09-08T16:54:03","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## set some variables\nexport NOMAD_DIR=/usr/bin\nexport NOMAD_PATH=${NOMAD_DIR}/nomad\nexport NOMAD_CONFIG_DIR=/etc/nomad.d\nexport NOMAD_DATA_DIR=/opt/nomad/data\nexport NOMAD_TLS_DIR=/opt/nomad/tls\nexport NOMAD_ENV_VARS=${NOMAD_CONFIG_DIR}/nomad.conf\nexport IP=$(hostname -I | awk '{print$1}')\n\n\n## install gpg\napt-get install -y gpg\n\n## Install Nomad\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\nsudo apt update -y && sudo apt install -y nomad\n\n#echo \"Start Nomad in -server mode\"\nsudo tee ${NOMAD_ENV_VARS} > /dev/null < ${NOMAD_ENV_VARS}\n[Unit]\nDescription=Nomad Agent\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nRestart=on-failure\nEnvironmentFile=/etc/nomad.d/nomad.conf\nExecStart=/usr/local/bin/nomad agent -config /etc/nomad.d $FLAGS\nExecReload=/bin/kill -HUP $MAINPID\nKillSignal=SIGTERM\nUser=root\nGroup=root\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\n## enable and start nomad\nsystemctl enable nomad\nsystemctl start nomad\n\n## Install Docker\ncurl -fsSL get.docker.com | sudo sh\n\n## Configure nginx container\ncat << EOF > /root/nginx.conf\nevents {}\n\nhttp {\n server {\n location / {\n proxy_pass http://nomad-ws;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n\n # Nomad blocking queries will remain open for a default of 5 minutes.\n # Increase the proxy timeout to accommodate this timeout with an\n # additional grace period.\n proxy_read_timeout 310s;\n\n # Nomad log streaming uses streaming HTTP requests. In order to\n # synchronously stream logs from Nomad to NGINX to the browser\n # proxy buffering needs to be turned off.\n proxy_buffering off;\n\n # The Upgrade and Connection headers are used to establish\n # a WebSockets connection.\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n\n # The default Origin header will be the proxy address, which\n # will be rejected by Nomad. It must be rewritten to be the\n # host address instead.\n proxy_set_header Origin \"\\${scheme}://\\${proxy_host}\";\n }\n }\n\n # Since WebSockets are stateful connections but Nomad has multiple\n # server nodes, an upstream with ip_hash declared is required to ensure\n # that connections are always proxied to the same server node when possible.\n upstream nomad-ws {\n ip_hash;\n server host.docker.internal:4646;\n }\n}\nEOF\n\n## start docker container\ndocker run -d --publish=8080:80 --add-host=host.docker.internal:host-gateway \\\n --mount type=bind,source=$PWD/nginx.conf,target=/etc/nginx/nginx.conf \\\n nginx:latest\n\n## firewall\nufw allow 22\nufw allow 80\nufw allow 443\nufw allow 4646\nufw allow 8080\n\ncat << EOF > /etc/motd\n#################################\n The Nomad GUI is now available at HTTP://${IP}:8080\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Nomad configurations at https://www.nomadproject.io/docs/configuration\n#################################\nEOF\n\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1226544,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster One-Click","description":"Nomad Cluster One-Click","ordinal":43,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":47,"deployments_active":4,"is_public":true,"mine":false,"created":"2023-08-25T19:05:25","updated":"2023-09-28T14:02:30","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\ngit_username=\"akamai-compute-marketplace\"\nexport GIT_REPO_1=\"https://github.com/$git_username/nomad-occ.git\"\nexport GIT_REPO_2=\"https://github.com/$git_username/nomad-client-occ.git\"\nexport DEBIAN_FRONTEND=non-interactive\nexport UUID=$(uuidgen | awk -F - '{print $1}')\nexport CLUSTER_MODE='cluster'\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-server-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction tag_provisioner {\n export INSTANCE_TAG='consul-server'\n echo \"[info] tagging the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${INSTANCE_TAG}\\\"]}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO_1} /tmp/linode\n git clone ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n # clone one branch to test \n # git clone -b develop ${GIT_REPO_1} /tmp/linode\n # git clone -b develop ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Total instance count","default":"6","oneof":"6"},{"name":"servers","label":"Nomad Server count","default":"3","oneof":"3"},{"name":"clients","label":"Nomad client size","default":"3","oneof":"3"}]},{"id":1226545,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Clients Cluster One-Click","description":"Nomad Cluster Clients One-Click","ordinal":44,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-08-25T19:07:27","updated":"2023-09-11T19:38:11","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n\n# git repo\ngit_username=\"akamai-compute-marketplace\"\nexport GIT_REPO=\"https://github.com/$git_username/nomad-client-occ.git\"\nexport UUID=$(uuidgen | awk -F - '{print $1}')\nexport CLUSTER_MODE='client'\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-client-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction tag_provisioner {\n export INSTANCE_TAG='consul-server'\n echo \"[info] tagging the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${INSTANCE_TAG}\\\"]}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=noninteractive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n # clone one branch to test \n # git clone -b develop ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Nomad Client Count","default":"3","oneof":"3,5,7"},{"name":"consul_nomad_autojoin_token_password","label":"consul_nomad_autojoin_token generated by Nomad Server OCC"}]},{"id":1037038,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Vault One-Click","description":"HashiCorp Vault One Click App","ordinal":45,"logo_url":"assets/vault.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":195,"deployments_active":19,"is_public":true,"mine":false,"created":"2022-08-02T18:47:32","updated":"2023-09-25T05:12:33","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nexport IP=$(hostname -I | awk '{print$1}')\nexport VAULT_ADDR=\"http://${IP}:8200\"\n\n## install gpg\napt install -y gpg\n\n## add hashicorp gpg key and repo\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg >/dev/null\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\n\n## install vault\napt update && apt install -y vault\n\n## basic vault configs\nmkdir -p /vault/data\nchown -R vault:vault /vault\ncat << EOF > /etc/vault.d/vault.hcl\nstorage \"raft\" {\n path = \"/vault/data\"\n node_id = \"node1\"\n}\n\nlistener \"tcp\" {\n address = \"${IP}:8200\"\n tls_disable = \"true\"\n}\n\ndisable_mlock = true\n\napi_addr = \"http://127.0.0.1:8200\"\ncluster_addr = \"https://127.0.0.1:8201\"\nui = true\nEOF\n\n## systemd for vault\nsystemctl enable vault.service\n\n## Start vault server and stash the tokens\nsystemctl start vault.service\ntouch /root/.vault_tokens.txt\nsleep 20\nvault operator init | grep 'Token\\|Unseal' >> /root/.vault_tokens.txt\n\n## firewall\nufw allow 22\nufw allow 8200\n\n## config info and recommendations\ncat << EOF > /etc/motd\n#####################################\n The Vault server GUI is now available at ${VAULT_ADDR}\n The randomly generate Unseal Tokens and Initial Root Token are listed in /root/.vault_tokens.txt\n ** STORE THESE VALUES SOMEWHERE SAFE AND SECURE **\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Vault configurations at https://www.vaultproject.io/docs/configuration\n######################################\nEOF\n\nsleep 20\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1177605,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Illa Builder One-Click","description":"Illa Builder One-Click App","ordinal":46,"logo_url":"assets/illabuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":81,"deployments_active":4,"is_public":true,"mine":false,"created":"2023-05-17T14:22:00","updated":"2023-09-25T10:16:58","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Sources OCA helpers\nsource \nsource \nsource \nsource \n# Apt update/upgrade\nexport DEBIAN_FRONTEND=non-interactive\napt update && apt upgrade -y\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Env config\nILLA_HOME_DIR=~/illa\nPG_VOLUMN=${ILLA_HOME_DIR}/database\nDRIVE_VOLUMN=${ILLA_HOME_DIR}/drive\n\n\n# Init\nmkdir -p ${ILLA_HOME_DIR}\nmkdir -p ${PG_VOLUMN}\nmkdir -p ${DRIVE_VOLUMN}\n\n# Run\ndocker run -d \\\n --name illa_builder \\\n -v $PG_VOLUMN:/opt/illa/database \\\n -v $DRIVE_VOLUMN:/opt/illa/drive \\\n -p 80:2022 \\\n illasoft/illa-builder:latest\n\necho \"\n********************************************************************************\nWelcome to ILLA Builder!\n********************************************************************************\n # ILLA Builder: http://\"$FQDN\"\n # Website: https://www.illacloud.com\n # Documentation: https://www.illacloud.com/docs/about-illa\n # Github: https://github.com/illacloud\n # Community Support: https://github.com/orgs/illacloud/discussions\n\"","user_defined_fields":[]},{"id":607401,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jenkins One-Click","description":"Jenkins One-Click App","ordinal":47,"logo_url":"assets/jenkins.svg","images":["linode/debian11"],"deployments_total":1878,"deployments_active":133,"is_public":true,"mine":false,"created":"2019-10-31T15:29:54","updated":"2023-09-28T20:19:48","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prereq's & Jenkins\napt install -y default-jre wget gnupg2\nwget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -\nsh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'\napt_setup_update\napt install -y jenkins\nsystemctl enable --now jenkins\n\n# Cleanup \nstackscript_cleanup","user_defined_fields":[]},{"id":869623,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"JetBackup One-Click","description":"JetBackup One-Click","ordinal":48,"logo_url":"assets/jetbackup.svg","images":["linode/centos7","linode/almalinux8"],"deployments_total":99,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-21T12:45:59","updated":"2023-09-21T21:01:57","rev_note":"","script":"#!/bin/bash\n\n# JetBackup StackScript UDF Variables\n# \n# \n#\n# The next line makes the Official cPanel StackScript available if cPanel/WHM is selected as the control panel. Do not remove this line.\n# source \n#\n# Log File Paths:\n# StackScript Log: /var/log/stackscript.log\n# cPanel/WHM installation: /var/log/stackscript-595742.log\n# Debugging: /var/log/stackscript-debug.log\n#\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>/var/log/stackscript-debug.log\necho \"PID: $$\"\nCONTROLPANEL=${CONTROLPANEL}\nRELEASE=${RELEASETIER}\nJBDIR=\"/usr/local/jetapps/etc/jetbackup5\"\n\nif [[ -z ${CONTROLPANEL} ]]; then\necho \"Error: No panel selected. Please select a panel to deploy JetBackup.\"\nexit 1\nelif [[ -d ${JBDIR} ]]; then\necho \"Error: JetBackup already installed. Aborting StackScript.\"\nexit 0\nfi\n\necho \"Installing JetApps Repository\"\nrpm --import http://repo.jetlicense.com/centOS/RPM-GPG-KEY-JETAPPS\nyum -y -q install http://repo.jetlicense.com/centOS/jetapps-repo-latest.rpm\nyum -y -q install jetapps --disablerepo=* --enablerepo=jetapps\necho \"JetApps Repository Successfully Installed.\"\n\ncpanelinstall() {\n\necho \"Running cPanel/WHM Marketplace StackScript. You can track the progress of cPanel/WHM with: tail -f /var/log/stackscript-595742.log \"\n(source /root/ssinclude-595742 >>/var/log/stackscript-595742.log 2>&1)\n\n}\n\n# JETBACKUP 5 FOR LINUX - STANDALONE INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"Linux\" ]; then\necho \"Installing JetBackup 5.\"\npackage='jetbackup5-linux'\njetapps --install $package $RELEASE\njbhostname=$(hostname)\njbhostname=\"https://${jbhostname}:3035\"\necho \"Adding a Firewall rule to open port 3035. Port 3035 must be open for access to the JetBackup 5 Linux UI.\"\nfirewall-cmd --permanent --add-port=3035/tcp\nfirewall-cmd --reload\necho \"To go to JetBackup and Accept the User Agreement, go to ${jbhostname} and enter your root login credentials.\"\necho \"To generate a one-time JetBackup 5 login URL after installation and acceptance of the EULA type the following command in the terminal:\"\necho \"jb5login\"\nfi\n\n# JETBACKUP 5 FOR CPANEL/WHM INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"cPanel/WHM\" ]; then\n\npackage='jetbackup5-cpanel'\ncpanelinstall\nsleep 2\necho \"Installing JetBackup 5.\"\njetapps --install $package $RELEASE\necho \"To log in to cPanel/WHM as root user, please enter the following command to generate a one-time login token:\"\necho \"\"\necho \"whmlogin\"\nfi\n\necho \"Review the JetBackup 5 Getting Started Guide at https://docs.jetbackup.com/v5.1/adminpanel/gettingStarted.html\"\ninstallVersion=\"$(jetbackup5 --version | cut -d ' ' -f 1,3,4 | sed \"2 d\")\"\necho \"${installVersion} Successfully Installed!\"\nrm /root/ssinclude-595742\nrm /root/StackScript\nexit 0","user_defined_fields":[{"name":"CONTROLPANEL","label":"Choose a Control Panel to use with JetBackup 5. cPanel/WHM or Linux (No Control Panel)","default":"cPanel/WHM","oneof":"cPanel/WHM,Linux"},{"name":"RELEASETIER","label":"Choose a JetBackup Release Tier.","default":"stable","oneof":"stable,beta,edge"}]},{"id":662121,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jitsi One-Click","description":"Jitsi One-Click","ordinal":49,"logo_url":"assets/jitsi.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":4416,"deployments_active":134,"is_public":true,"mine":false,"created":"2020-08-12T16:08:51","updated":"2023-09-28T17:23:54","rev_note":"","script":"#!/bin/bash\n\n## Jitsi Settings\n#\n\n## Domain Settings\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# dependencies\nexport DEBIAN_FRONTEND=noninteractive\napt install apt-transport-https gnupg2 curl wget -y\napt-add-repository universe\napt update -y\n\n#Install Jitisi dep Prosody\necho deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list\nwget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -\napt install lua5.2\n\n#Install Nginx\napt install -y nginx\nsystemctl start nginx\nsystemctl enable nginx\n\n#Install Jitsi Meet\ncurl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg'\necho 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null\n\n# update all package sources\napt update -y\necho \"jitsi-videobridge jitsi-videobridge/jvb-hostname string $FQDN\" | debconf-set-selections\necho \"jitsi-meet-web-config jitsi-meet/cert-choice select 'Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)'\" | debconf-set-selections\napt --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes install jitsi-meet\n\n# Firewall\nsudo ufw allow 80/tcp\nsudo ufw allow 443/tcp\nsudo ufw allow 10000/udp\nsudo ufw allow 22\nsudo ufw allow 3478/udp\nsudo ufw allow 5349/tcp\nsudo ufw enable\n\n# SSL \ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh <\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction lampjoomla {\n apt-get install apache2 mariadb-server php php-common libapache2-mod-php php-cli php-fpm php-mysql php-json php-opcache php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-zip -y\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cat < /etc/php/$PHP_VERSION/apache2/php.ini\nmemory_limit = 512M\nupload_max_filesize = 256M\npost_max_size = 256M \nmax_execution_time = 300\noutput_buffering = off\ndisplay_errors = off\nupload_tmp_dir = \"/var/www/html/joomla/tmp\"\nEND\n}\n\nfunction databaseconf {\n run_mysql_secure_installation\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE DATABASE joomla_db;\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER 'joomla'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla'@'localhost';\"\n}\n\nfunction apachejoomla {\n apt-get install wget unzip -y\n mkdir -p /var/www/html/joomla\n cd /tmp && wget https://downloads.joomla.org/cms/joomla4/4-1-0/Joomla_4-1-0-Stable-Full_Package.zip?format=zip\n unzip Joomla_4* -d /var/www/html/joomla\n chown -R www-data:www-data /var/www/html/joomla \n chmod -R 755 /var/www/html/joomla\n cat < /etc/apache2/sites-available/joomla.conf\n\n ServerAdmin $SOA_EMAIL_ADDRESS\n DocumentRoot /var/www/html/joomla\n ServerName $FQDN\n\n \n Options FollowSymlinks\n AllowOverride All\n Require all granted\n \n\n ErrorLog ${APACHE_LOG_DIR}/$FQDN_error.log\n CustomLog ${APACHE_LOG_DIR}/$FQDN_access.log combined\n\n\nEND\n a2ensite joomla.conf\n a2enmod rewrite\n a2enmod php$PHP_VERSION\n a2dissite 000-default.conf\n systemctl restart apache2\n\n ufw allow http\n ufw allow https\n}\nfunction ssljoomla {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\n\nfunction main {\n lampjoomla\n databaseconf\n apachejoomla\n ssljoomla\n stackscript_cleanup\n}\n# Execute script\nmain","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":985380,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Joplin One-Click","description":"Joplin One-Click","ordinal":51,"logo_url":"assets/joplin.svg","images":["linode/ubuntu20.04"],"deployments_total":377,"deployments_active":30,"is_public":true,"mine":false,"created":"2022-03-08T18:14:30","updated":"2023-09-27T17:46:38","rev_note":"","script":"#!/bin/bash\n## Joplin Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n## Linode Docker OCA\nsource \n\nfunction joplininstall {\n mkdir -p /etc/docker/compose/joplin/ && cd /etc/docker/compose/joplin/\n cat < /etc/docker/compose/joplin/docker-compose.yml\nversion: '3'\n\nservices:\n db:\n image: postgres:13\n volumes:\n - ./data/postgres:/var/lib/postgresql/data\n ports:\n - \"5432:5432\"\n restart: unless-stopped\n environment:\n - POSTGRES_PASSWORD=$POSTGRES_PASSWORD\n - POSTGRES_USER=joplin\n - POSTGRES_DB=joplin\n app:\n image: joplin/server:latest\n depends_on:\n - db\n ports:\n - \"22300:22300\"\n restart: unless-stopped\n environment:\n - APP_PORT=22300\n - APP_BASE_URL=https://$FQDN\n - DB_CLIENT=pg\n - POSTGRES_PASSWORD=$POSTGRES_PASSWORD\n - POSTGRES_DATABASE=joplin\n - POSTGRES_USER=joplin\n - POSTGRES_PORT=5432\n - POSTGRES_HOST=db\nEND\n cat < /etc/systemd/system/joplin.service\n[Unit]\nDescription=Docker Compose Joplin Application Service\nRequires=joplin.service\nAfter=joplin.service\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/docker-compose up -d\nExecStop=/usr/bin/docker-compose down\nExecReload=/usr/bin/docker-compose up -d\nWorkingDirectory=/etc/docker/compose/joplin/\n[Install]\nWantedBy=multi-user.target\nEND\n systemctl daemon-reload\n systemctl enable joplin.service \n systemctl start joplin.service \n}\n\nfunction nginxreverse {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n server_name $FQDN;\n error_log /var/log/nginx/$FQDN.error;\n access_log /var/log/nginx/$FQDN.access;\n location / {\n proxy_pass http://localhost:22300;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n proxy_set_header Host \\$host;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n \n}\n\nfunction ssl_lemp {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n joplininstall\n firewall\n nginxreverse\n ssl_lemp\n stackscript_cleanup\n}\n\n# Execute script\nmain","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"postgres_password","label":"Password for the postgres database","example":"s3cure_p4ssw0rd"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":688912,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kepler Builder One-Click","description":"Kepler Builder One-Click","ordinal":52,"logo_url":"assets/keplerbuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":259,"deployments_active":4,"is_public":true,"mine":false,"created":"2020-11-17T21:17:33","updated":"2023-09-15T20:37:19","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-keplerbuilder\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401701,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LAMP One-Click","description":"LAMP One-Click","ordinal":53,"logo_url":"assets/LAMP.svg","images":["linode/ubuntu22.04"],"deployments_total":13461,"deployments_active":1133,"is_public":true,"mine":false,"created":"2019-03-09T02:07:09","updated":"2023-09-28T19:20:56","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LAMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-lamp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lamp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":606691,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LEMP One-Click","description":"LEMP Stack","ordinal":54,"logo_url":"assets/LEMP.svg","images":["linode/ubuntu22.04"],"deployments_total":4038,"deployments_active":303,"is_public":true,"mine":false,"created":"2019-10-27T15:29:04","updated":"2023-09-27T06:56:56","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LEMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-lemp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lemp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923032,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiteSpeed cPanel One-Click","description":"LiteSpeed cPanel One-Click","ordinal":55,"logo_url":"assets/litespeedcpanel.svg","images":["linode/almalinux8"],"deployments_total":972,"deployments_active":21,"is_public":true,"mine":false,"created":"2021-10-18T00:57:12","updated":"2023-09-27T20:51:19","rev_note":"","script":"#!/bin/bash\n## Logging\nexec > /var/log/stackscript.log 2>&1\n## Install cPanel\nyum install -y kernel grub2\nsed -i -e \"s/GRUB_TIMEOUT=5/GRUB_TIMEOUT=10/\" /etc/default/grub\nsed -i -e \"s/crashkernel=auto rhgb console=ttyS0,19200n8/console=ttyS0,19200n8/\" /etc/default/grub\nmkdir /boot/grub\ngrub2-mkconfig -o /boot/grub/grub.cfg\nsystemctl stop firewalld.service\nsystemctl disable firewalld.service\nsystemctl stop NetworkManager\nsystemctl disable NetworkManager\nsystemctl enable network\nsystemctl start network\nyum remove NetworkManager -y\ncd /home \ncurl -o latest -L https://securedownloads.cpanel.net/latest && sh latest\nyum remove ea-apache24-mod_ruid2 -y\n## Install LSWS on cPanel\nADMIN_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo '')\ncat <>/home/lsws.options\n## 1 = enable, 0 = disable, 2 = user home directory\nphp_suexec=\"2\"\nport_offset=\"0\"\nadmin_user=\"admin\"\nadmin_pass=\"${ADMIN_PASS}\"\nadmin_email=\"root@localhost\"\neasyapache_integration=\"1\"\nauto_switch_to_lsws=\"1\"\ndeploy_lscwp=\"1\"\nEOT\nbash <( curl https://get.litespeed.sh ) TRIAL","user_defined_fields":[]},{"id":1008123,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiveSwitch One-Click","description":"LiveSwitch One-Click","ordinal":56,"logo_url":"assets/liveswitch.svg","images":["linode/ubuntu20.04"],"deployments_total":172,"deployments_active":1,"is_public":true,"mine":false,"created":"2022-05-18T16:41:37","updated":"2023-09-26T19:05:18","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\nsudo dpkg --configure -a\n\n# kill any background updater jobs\nsudo killall apt apt-get\n\n# helpers\nsudo apt-get install dialog apt-utils -y -q\n\nsudo DEBIAN_FRONTEND=noninteractive apt-get update -y\nsudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef -y\n\n# firewall\n# normal defaults\nsudo ufw default deny incoming\nsudo ufw default allow outgoing\n# ssh on\nsudo ufw allow ssh\n# dynamic inbound traffic\nsudo ufw allow 49152:65535/udp\n# TURN\nsudo ufw allow 3478/udp\n# TURN TCP\nsudo ufw allow 80/tcp\n# TURNS\nsudo ufw allow 443/tcp\n# admin (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 9090/tcp\nsudo ufw allow 9443/tcp\n# gateway (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 8080/tcp\nsudo ufw allow 8443/tcp\n\n# sip\n# sudo ufw allow 5061/udp\n# sudo ufw allow 5061/tcp\n\n# we will turn on the firewall at the end because it disconnects us\n\n# install docker\nsudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\napt-cache policy docker-ce\nsudo apt-get install -y docker-ce\n\n# entropy fix for docker\nsudo apt-get install -y haveged\n\n# install docker compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n\n# retrieve docker compose files\nmkdir -p /opt/liveswitch\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose-liveswitch.service\" -o /opt/liveswitch/docker-compose-liveswitch.service\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose.yml\" -o /opt/liveswitch/docker-compose.yml\n\n# install liveswitch docker compose\nsudo cp /opt/liveswitch/docker-compose-liveswitch.service /etc/systemd/system/\nsudo systemctl enable docker\nsudo systemctl enable docker-compose-liveswitch\nsudo systemctl start docker-compose-liveswitch\n\n# clean up some logs\nsudo rm -f /var/log/cloud-init-output.log\nsudo rm -f /var/log/dpkg.log\nsudo rm -f /var/log/kern.log\nsudo rm -f /var/log/ufw.log\n\n# turn on the firewall\nsudo ufw --force enable\nsudo reboot","user_defined_fields":[]},{"id":869159,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MagicSpam One-Click","description":"MagicSpam One-Click","ordinal":57,"logo_url":"assets/magicspam.svg","images":["linode/centos7"],"deployments_total":4,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-20T19:13:52","updated":"2023-08-28T19:43:48","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\n# source the stackscript for the selected control panel\nif [ \"$CONTROL_PANEL\" == \"cPanel\" ]; then\n # redirect ALL output to the stackscript log for future troubleshooting\n exec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n # cPanel Marketplace App install\n source \n\n # set the hostname to replicate Plesk stackscript for consistent behavior\n IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n echo $HOSTNAME > /etc/hostname\n hostname -F /etc/hostname\n echo $IPADDR $HOSTNAME >> /etc/hosts\nelif [ \"$CONTROL_PANEL\" == \"Plesk\" ]; then\n # Plesk Marketplace App install\n # NOTE: do not redirect output to the stackscript log to avoid duplicate log\n # lines as the Plesk stackscript already redirects to it\n source \nelse\n echo \"Invalid control panel option detected. Aborting...\"\n exit 1\nfi\n\n# install MagicSpam via the installer script\nwget https://www.magicspam.com/download/magicspam-installer.sh -O /root/magicspam-installer\nchmod +x /root/magicspam-installer\n/root/magicspam-installer -l \"$MS_LICENSE_KEY\"","user_defined_fields":[{"name":"control_panel","label":"The Control Panel to deploy alongside with MagicSpam. Make sure to select an Image supported by the selected Control Panel. For more information, please refer to the MagicSpam App Information Sidebar.","oneof":"cPanel,Plesk"},{"name":"ms_license_key","label":"The MagicSpam license key. Please make sure to use the appropriate license key for the selected Control Panel. For more information, please refer to the MagicSpam App information sidebar."},{"name":"hostname","label":"The server's hostname."}]},{"id":1096122,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mastodon One-Click","description":"Mastodon is an open-source and decentralized micro-blogging platform, supporting federation and public access to the server.","ordinal":58,"logo_url":"assets/mastodon.svg","images":["linode/debian11"],"deployments_total":1581,"deployments_active":65,"is_public":true,"mine":false,"created":"2022-12-05T15:57:04","updated":"2023-09-28T09:43:00","rev_note":"","script":"#!/bin/bash\nset -x\n## Mastodon Settings\n#\n#\n#\n#\n#\n#\n\n\n# git repo + workdirs\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/mastodon-oca.git\"\nexport WORK_DIR=\"/tmp/oca-deployment\"\nexport LINODE_API_TOKEN=\"${TOKEN_PASSWORD}\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nsource \n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction setup {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip python3-dev build-essential\n\n #clone repo and set up ansible environment\n mkdir -p ${WORK_DIR}\n cd ${WORK_DIR}\n git clone $GIT_REPO\n cd mastodon-oca\n\n # write udf vars\n cat < group_vars/mastodon/vars\n domain: ${DOMAIN}\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n owner_username: ${OWNER_USERNAME}\n owner_email: ${OWNER_EMAIL}\n single_user_mode: ${SINGLE_USER_MODE}\nEND\n\n #venv\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n}\n\nfunction run {\n# run playbooks\n ansible-playbook -v site.yml\n}\n\n# main\nsetup\nrun\ncleanup\necho \"Installation Complete!\"","user_defined_fields":[{"name":"domain","label":"Domain name for your Mastodon instance.","example":"domain.tld"},{"name":"token_password","label":"Your Linode API token"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"owner_username","label":"Username for Mastodon Owner","example":""},{"name":"owner_email","label":"Email address for Mastodon Owner","example":"owner@example.com"},{"name":"single_user_mode","label":"Do you want to start Mastodon in single-user mode?","oneof":"Yes,No"}]},{"id":611895,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MEAN One-Click","description":"MEAN One-Click","ordinal":59,"logo_url":"assets/mean.svg","images":["linode/ubuntu20.04"],"deployments_total":702,"deployments_active":41,"is_public":true,"mine":false,"created":"2019-11-14T04:49:44","updated":"2023-09-20T19:44:10","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MEAN Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction dependmean {\n apt-get install -y build-essential git fontconfig libpng-dev ruby ruby-dev wget gnupg\n gem install sass\n}\n\nfunction mongoinstall {\n cd && wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n echo \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\n\nfunction meaninstall {\n apt-get install -y curl software-properties-common\n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n apt-get install -y nodejs\n\n # MEAN APP CONFIGURATION\n cd && mkdir -p /opt/mean\n cd /opt/mean\n cat <> package.json\n{\n\"name\" : \"mean\",\n\"version\": \"0.0.1\"\n}\nEND\n npm install express --save\n npm install angular\n cat <> server.js\nvar express = require('express');\nvar app = express();\nvar port = 3000;\napp.get('/', function(req, res) {\nres.send('Hello World Powered By: Linode Marketplace');\n});\napp.listen(port, function(){\nconsole.log(\"Listening at port: \" + port);\n})\nEND\n # Start App on reboot\n cd && npm install pm2 -g\n pm2 start --name=\"MEAN_APP\" /opt/mean/server.js\n pm2 startup \n pm2 save\n}\n\nfunction nginxmean {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslmean {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallmean {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n dependmean\n firewallmean\n mongoinstall\n meaninstall\n nginxmean\n sslmean\n\n}\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401702,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MERN One-Click","description":"MERN One-Click","ordinal":60,"logo_url":"assets/MERN.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":1397,"deployments_active":52,"is_public":true,"mine":false,"created":"2019-03-08T21:07:40","updated":"2023-09-28T07:39:26","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3000\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install dependencies\napt-get install -y build-essential git \n\n# Install Mongodb\napt-get install -y wget gnupg\nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Install NodeJS and NPM\napt-get install -y curl software-properties-common\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \ncurl -fsSL https://deb.nodesource.com/setup_16.x | bash -\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\ncurl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get install -y nodejs\n\n# Install ExpressJS\nnpm update -g\nnpm install --global express\nnpm link express\nnpm -g install create-react-app\ncd /opt\ncreate-react-app hello-world\nnpm i --package-lock-only\nnpm audit fix\n\n# Start App on reboot\ncat < /lib/systemd/system/hello-world.service\n[Unit]\nDescription=Hello World React Application Service\nRequires=hello-world.service\nAfter=hello-world.service\n\n[Service]\nType=simple\nUser=root\nRemainAfterExit=yes\nRestart=on-failure\nWorkingDirectory=/opt/hello-world\nExecStart=npm start --host 0.0.0.0 --port=3000\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nsystemctl daemon-reload\nsystemctl start hello-world\nsystemctl enable hello-world\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1051714,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Microweber One-Click","description":"Microweber One-Click","ordinal":61,"logo_url":"assets/microweber.svg","images":["linode/ubuntu20.04"],"deployments_total":444,"deployments_active":20,"is_public":true,"mine":false,"created":"2022-09-01T15:43:41","updated":"2023-09-28T19:46:06","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/microweber/microweber\nset -o pipefail\nMICROWEBER_INSTALLER_TAG=\"1.3.1\"\nWORKING_DIR=\"/var/www/html\"\nDOWNLOAD_URL='http://updater.microweberapi.com/builds/master/microweber.zip'\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php8.1\napt install -y mysql-server\napt install -y php8.1-{bcmath,xml,fpm,mysql,iconv,xsl,zip,intl,ldap,gd,cli,dev,bz2,curl,exif,mbstring,pgsql,sqlite3,tokenizer,opcache,soap,cgi,common,imap,opcache}\napt install -y python3-certbot-apache software-properties-common unzip curl\napt install -y php-pear\npecl install -f libsodium\nsed -i 's/;opcache.enable\\s*=.*/opcache.enable=1/g' /etc/php/8.1/cli/php.ini\necho 'extension=sodium.so' > /etc/php/8.1/cli/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/fpm/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/cgi/10-sodium.ini\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Microweber at http://\\$myip/\n * Secure your database by running:\n > mysql_secure_installation\nFor help and more information visit https://microweber.org\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\ncat >/etc/cron.d/microweber </etc/php/8.1/apache2/conf.d/30-microweber.ini <>/var/log/per-instance.log\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\nMICROWEBER_DB_HOST=localhost\nMICROWEBER_DB_PORT=3306\nMICROWEBER_DB_NAME=microweber\nMICROWEBER_DB_USER=microweber\nMICROWEBER_DB_PASS=$(openssl rand -hex 16)\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\necho \"[OK] Microweber Installer $MICROWEBER_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":691614,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mist.io One-Click","description":"Mist.io One-Click","ordinal":62,"logo_url":"assets/mistio.svg","images":["linode/debian10"],"deployments_total":313,"deployments_active":3,"is_public":true,"mine":false,"created":"2020-11-30T20:25:44","updated":"2023-09-17T02:05:32","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\n# \n\n# \n\n## install docker\nsudo apt-get install -y \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n gnupg-agent \\\n software-properties-common\n\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -\n\nsudo add-apt-repository \\\n \"deb [arch=amd64] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) \\\n stable\"\n\nsudo apt-get update\n\nsudo apt-get install -y docker-ce docker-ce-cli containerd.io\n\n## install docker-compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n\nsudo chmod +x /usr/local/bin/docker-compose\n\n## get latest mist\nmkdir ~/mist && cd ~/mist\n\nexport MIST_CE_REPO=https://github.com/mistio/mist-ce/releases/latest\nexport LATEST_TAG=\"$(curl -sI \"${MIST_CE_REPO}\" | grep -Po 'tag\\/\\K(v\\S+)')\"\n\nwget https://github.com/mistio/mist-ce/releases/download/$LATEST_TAG/docker-compose.yml\n\n# set CORE_URI\nmkdir settings\nexport IP=$(ip r | grep /24 | grep -Eo \"([0-9]{1,3}[\\.]){3}[1-9]{1,3}\")\necho 'CORE_URI=\"http://'$IP'\"' > settings/settings.py\n\ndocker-compose up -d\n\nwhile !(curl -sSLf http://localhost >/dev/null); do\n sleep 5\ndone\n\ndocker-compose exec -T api ./bin/adduser --admin \"${MIST_EMAIL}\" --password \"${MIST_PASSWORD}\"","user_defined_fields":[{"name":"mist_email","label":"Mist admin user's email.","example":"Set your admin user's email."},{"name":"mist_password","label":"Mist admin user's password.","example":"Set your admin user's password."}]},{"id":609195,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB One-Click","description":"MongoDB One-Click","ordinal":63,"logo_url":"assets/mongodb.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":1757,"deployments_active":84,"is_public":true,"mine":false,"created":"2019-11-06T07:14:07","updated":"2023-08-28T19:43:49","rev_note":"","script":"#!/bin/bash\n## Mongo Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction mongoinstall {\n apt-get install -y wget gnupg\n if [ $MONGOVERSION == \"5.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ $MONGOVERSION == \"4.4\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\n elif [ $MONGOVERSION == \"4.2\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list\n elif [ $MONGOVERSION == \"4.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list\n fi\n\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\nfunction createmongouser {\n echo \"Creating Mongo User\" & sleep 3\n mongo < /etc/mongod.conf\n# mongod.conf\n# for documentation of all options, see:\n# http://docs.mongodb.org/manual/reference/configuration-options/\n# Where and how to store data.\nstorage:\n dbPath: /var/lib/mongodb\n journal:\n enabled: true\n# engine:\n# wiredTiger:\n# where to write logging data.\nsystemLog:\n destination: file\n logAppend: true\n path: /var/log/mongodb/mongod.log\n# network interfaces\nnet:\n port: 27017\n bindIp: 127.0.0.1\n# how the process runs\nprocessManagement:\n timeZoneInfo: /usr/share/zoneinfo\nsecurity:\n authorization: enabled\n#operationProfiling:\n#replication:\n#sharding:\n## Enterprise-Only Options:\n#auditLog:\n#snmp:\nEOF\n service mongod restart\n}\n\nfunction main {\n mongoinstall\n createmongouser \n setauth\n}\n\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"db_password","label":"Mongo Password"},{"name":"mongoversion","label":"Mongo Version","oneof":"5.0,4.4,4.2,4.0","default":"5.0"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for soa record","default":""}]},{"id":1067004,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster One-Click","description":"MongoDB replica set","ordinal":64,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":49,"deployments_active":2,"is_public":true,"mine":false,"created":"2022-09-29T18:32:36","updated":"2023-08-28T19:43:49","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_PAT=\"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\"\nexport GIT_REPO=\"https://linode-solutions:${GIT_PAT}@github.com/linode-solutions/mongodb-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/mongodb-cluster\" ]; then\n rm -rf /tmp/mongodb-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction destroy_linode {\n curl -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X DELETE \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # Rename Provisioner & add Private IP \n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/mongodb-cluster\n cd /tmp/mongodb-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"cluster_name","label":"Domain Name"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Mongo CA"},{"name":"common_name","label":"Common Name","default":"Mongo Server"},{"name":"cluster_size","label":"MongoDB cluster size","default":"3","oneof":"3"}]},{"id":869127,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Moodle One-Click","description":"Moodle One-Click","ordinal":65,"logo_url":"assets/moodle.svg","images":["linode/ubuntu20.04"],"deployments_total":1211,"deployments_active":91,"is_public":true,"mine":false,"created":"2021-07-20T18:48:49","updated":"2023-09-18T19:16:02","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n## Moodle settings\n#\n#\n#\n#\n\n## Domain settings\n#\n#\n#\n\n## Linode/SSH Security Settings \n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\n# Install dependencies \napt install -y apache2 mysql-client mysql-server php libapache2-mod-php git graphviz aspell ghostscript clamav php7.4-pspell php7.4-curl php7.4-gd php7.4-intl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-ldap php7.4-zip php7.4-soap php7.4-mbstring\n\n# Firewall\nufw allow http \nufw allow https\n\n# Secure MySQL\nrun_mysql_secure_installation_ubuntu20\n\n# Install Moodle\ncd /var/www/html\ngit clone git://git.moodle.org/moodle.git\ncd moodle\ngit branch --track MOODLE_39_STABLE origin/MOODLE_39_STABLE\ngit checkout MOODLE_39_STABLE\n\n# Configure Moodle\nmkdir /var/moodledata\nchmod -R 777 /var/moodledata \nchmod -R 755 /var/www/html/moodle \n\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE USER 'moodle'@'localhost' IDENTIFIED BY '$DB_PASSWORD';\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodle'@'localhost';\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\ncat < /etc/apache2/sites-available/moodle.conf\n\n ServerAdmin admin@$FQDN\n DocumentRoot /var/www/html/moodle/\n ServerName $FQDN\n ServerAlias www.$FQDN \n \n Options +FollowSymlinks\n AllowOverride All\n Require all granted\n \n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEND\n\na2enmod rewrite\na2ensite moodle.conf\na2dissite 000-default.conf\nservice apache2 restart\n\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n/usr/bin/php admin/cli/install.php --chmod=777 --lang=en_us --wwwroot=https://$FQDN --dataroot=/var/moodledata/ --dbtype=mysqli --dbhost=localhost --dbname=moodle --dbuser=moodle --dbpass=$DB_PASSWORD --dbport=3306 --dbsocket=1 --prefix=mdl_ --fullname=moodle --shortname=moodle --summary=\"Moodle: Powered By Linode Marketplace\" --adminuser=moodle --adminpass=\"$ADMIN_PASSWORD\" --adminemail=$SOA_EMAIL_ADDRESS --upgradekey= --non-interactive --agree-license\n\nchown -R www-data: /var/www/html/moodle\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"admin_password","label":"Moodle Admin Password"},{"name":"soa_email_address","label":"Moodle Admin Email"},{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"db_password","label":"Moodle database User password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":607026,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MySQL/MariaDB One-Click","description":"MySql One Click","ordinal":66,"logo_url":"assets/mysql.svg","images":["linode/ubuntu20.04"],"deployments_total":4358,"deployments_active":305,"is_public":true,"mine":false,"created":"2019-10-29T19:03:33","updated":"2023-09-27T18:51:45","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MySQL Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3306\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\nif [[ \"$DATABASE\" == \"MySQL\" ]]; then\n # Install/configure MySQL\n apt install -y mysql-server\n # Secure MySQL install\n run_mysql_secure_installation_ubuntu20 \nelse \n # Install/configure MySQL\n apt install -y mariadb-server\n # Secure MySQL install\n run_mysql_secure_installation\nfi\n\nmysql -uroot -p$DBROOT_PASSWORD -e \"create database $DATABASE_NAME;\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER '$DBUSER' IDENTIFIED BY '$DBUSER_PASSWORD';\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON $DATABASE_NAME.* TO '$DBUSER'@'%' WITH GRANT OPTION;\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"database","label":"Would you like to install MySQL or MariaDB?","oneof":"MySQL,MariaDB"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser","label":"MySQL User","example":"user1"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"database_name","label":"Create Database","example":"testdb"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970561,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NodeJS One-Click","description":"NodeJS One-Click","ordinal":67,"logo_url":"assets/nodejs.svg","images":["linode/ubuntu20.04"],"deployments_total":1981,"deployments_active":256,"is_public":true,"mine":false,"created":"2022-02-07T17:21:41","updated":"2023-09-28T10:05:01","rev_note":"","script":"#!/usr/bin/env bash\n\n## NodeJS Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction nodejs {\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get install -y nodejs\n \n mkdir -p /opt/nodejs\n cat < /opt/nodejs/hello.js\nconst http = require('http');\n\nconst hostname = 'localhost';\nconst port = 3000;\n\nconst server = http.createServer((req, res) => {\n res.statusCode = 200;\n res.setHeader('Content-Type', 'text/plain');\n res.end('Hello World Powered By Linode Marketplace');\n});\n\nserver.listen(port, hostname, () => {\n console.log(`Server running at http://localhost:3000/`);\n});\nEND\n}\n\nfunction pm2nodejs {\n npm install pm2@latest -g --no-audit\n cd /opt/nodejs/\n pm2 start hello.js\n sleep 5\n pm2 startup systemd\n sleep 5\n pm2 save\n}\n\nfunction nginxnodejs {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslnodejs {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallnodejs {\n ufw allow http\n ufw allow https\n\n}\nfunction main {\n nodejs\n pm2nodejs\n firewallnodejs \n nginxnodejs \n sslnodejs \n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":869156,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NirvaShare One-Click","description":"NirvaShare One-Click","ordinal":68,"logo_url":"assets/nirvashare.svg","images":["linode/ubuntu20.04"],"deployments_total":209,"deployments_active":4,"is_public":true,"mine":false,"created":"2021-07-20T19:08:35","updated":"2023-09-28T03:25:34","rev_note":"","script":"#!/bin/bash\n#\n# Script to install NirvaShare applications on Linode\n# Installs docker, docker-compose, postgres db, nirvashare admin and user share app\n#\n#\n# \n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n## Linode Docker OCA\nsource \n\n# Configure service file\ncat < /etc/systemd/system/nirvashare.service\n[Unit]\nDescription=Docker Compose NirvaShare Application Service\nRequires=nirvashare.service\nAfter=nirvashare.service\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/docker-compose up -d\nExecStop=/usr/bin/docker-compose down\nExecReload=/usr/bin/docker-compose up -d \nWorkingDirectory=/var/nirvashare/\n[Install]\nWantedBy=multi-user.target\nEND\n\n# Get Docker Composer file\nmkdir -p /var/nirvashare\ncd /var/nirvashare\necho \"version: '3'\nservices:\n admin:\n image: nirvato/nirvashare-admin:latest\n container_name: nirvashare_admin\n networks:\n - nirvashare\n restart: always\n ports:\n# # Public HTTP Port:\n - 8080:8080\n environment:\n ns_db_jdbc_url: 'jdbc:postgresql://nirvashare_database:5432/postgres'\n ns_db_username: 'nirvashare'\n ns_db_password: '$DBPASSWORD'\n volumes:\n - /var/nirvashare:/var/nirvashare \n depends_on:\n - db\n userapp:\n image: nirvato/nirvashare-userapp:latest\n container_name: nirvashare_userapp\n networks:\n - nirvashare\n restart: always\n ports:\n# # Public HTTP Port:\n - 8081:8080\n environment:\n ns_db_jdbc_url: 'jdbc:postgresql://nirvashare_database:5432/postgres'\n ns_db_username: 'nirvashare'\n ns_db_password: '$DBPASSWORD'\n volumes:\n - /var/nirvashare:/var/nirvashare \n depends_on:\n - admin\n db:\n image: postgres:13.2\n networks:\n - nirvashare\n container_name: nirvashare_database\n restart: always\n# ports:\n# - 5432:5432\n environment: \n POSTGRES_PASSWORD: '$DBPASSWORD'\n POSTGRES_USER: 'nirvashare'\n volumes:\n - db_data:/var/lib/postgresql/data\nvolumes:\n db_data:\nnetworks:\n nirvashare: {}\n\" > /var/nirvashare/docker-compose.yml\n\n# Enable Nirvashare daemon\nsystemctl daemon-reload\nsystemctl enable nirvashare.service\nsystemctl start nirvashare.service\n\n# Open port 8080\nufw allow 8080\nufw reload\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"dbpassword","label":"Database Password"}]},{"id":971043,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Odoo One-Click","description":"Odoo One-Click","ordinal":69,"logo_url":"assets/odoo.svg","images":["linode/ubuntu20.04"],"deployments_total":1661,"deployments_active":100,"is_public":true,"mine":false,"created":"2022-02-08T16:21:37","updated":"2023-09-28T07:27:47","rev_note":"","script":"#!/bin/bash\n## ODOO Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n## Linode Docker OCA\nsource \n\nfunction odooinstall {\n docker volume create odoo-db\n docker volume create odoo-data\n docker run -d --restart=always -v odoo-db:/var/lib/postgresql/data -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -e POSTGRES_DB=postgres --name db postgres:13\n docker run -d --restart=always -v odoo-data:/var/lib/odoo -d -p 8069:8069 --name odoo --link db:db -t odoo\n}\n\nfunction nginxreverse {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n server_name $FQDN;\n error_log /var/log/nginx/$FQDN.error;\n access_log /var/log/nginx/$FQDN.access;\n location / {\n proxy_pass http://localhost:8069;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n proxy_set_header Host \\$host;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n \n}\n\nfunction ssl_lemp {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n odooinstall\n firewall\n nginxreverse\n ssl_lemp\n}\n\n# Execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"postgres_password","label":"Postgres Password for the ODOO user","example":"s3cur3_9a55w04d"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1102907,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ONLYOFFICE Docs One-Click","description":"ONLYOFFICE Docs One-Click app","ordinal":70,"logo_url":"assets/onlyoffice.svg","images":["linode/ubuntu22.04"],"deployments_total":263,"deployments_active":11,"is_public":true,"mine":false,"created":"2022-12-20T17:50:23","updated":"2023-09-22T18:39:41","rev_note":"","script":"#!/usr/bin/env bash\n# \n# \n# \n\n# SSL Settings\n# \n# \n# \n# \n\n# Enable Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n\n# Get and install docker\n# curl -fsSL get.docker.com | sudo sh\napt install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \napt update\napt install -y docker-ce\nsystemctl enable --now docker.service\n\nCONTAINER_NAME=\"onlyoffice-docs\"\n\n# Run ONLYOFFICE-Docs with SSL\nif [[ \"${SSL_ENABLED}\" == \"true\" ]]; then\n\tif [[ -z ${ABS_DOMAIN} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_DOMAIN parameter for correct SSL work\"\n\t\texit 1\n\tfi\n\tif [[ -z ${LETS_ENCRYPT_MAIL} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_MAIL parameter for correct SSL work\"\n\t\texit 1\n fi\n\tsudo docker run -i -t -d -p 80:80 -p 443:443 \\\n\t\t-e JWT_ENABLED=${JWT_ENABLED} \\\n \t\t-e JWT_SECRET=${JWT_SECRET} \\\n\t\t-e LETS_ENCRYPT_DOMAIN=${ABS_DOMAIN} \\\n -e LETS_ENCRYPT_MAIL=${LETS_ENCRYPT_MAIL} \\\n\t\t-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n\t\t-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n \t-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n \t-v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n \t-v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n \t-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n\t\t--name ${CONTAINER_NAME} \\\n\t\tonlyoffice/documentserver:${DOCS_VERSION}\n\telse \n# Run ONLYOFFICE-Docs without SSL\n\tsudo docker run -i -t -d -p 80:80 \\\n -e JWT_ENABLED=${JWT_ENABLED} \\\n -e JWT_SECRET=${JWT_SECRET} \\\n -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n -v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n --name ${CONTAINER_NAME} \\\n onlyoffice/documentserver:${DOCS_VERSION}\nfi\n\n# Wait for run\nready_check() {\n echo -e \"\\e[0;32m Waiting for the launch of DocumentServer... \\e[0m\" \n for i in {1..30}; do\n echo \"Getting the DocumentServer status: ${i}\"\n OUTPUT=\"$(curl -Is http://localhost/healthcheck/ | head -1 | awk '{ print $2 }')\"\n if [ \"${OUTPUT}\" == \"200\" ]; then\n echo -e \"\\e[0;32m DocumentServer is ready \\e[0m\"\n local DS_READY\n DS_READY='yes'\n break\n else\n sleep 10\n fi\n done\n if [[ \"${DS_READY}\" != 'yes' ]]; then\n err \"\\e[0;31m Something goes wrong documentserver does not started, check logs with command --> docker logs -f ${CONTAINER_NAME} \\e[0m\"\n exit 1\n fi\n}\n\nready_check\n\n# Enable Docs-example\nsudo docker exec ${CONTAINER_NAME} supervisorctl start ds:example\n\n# Add Docs-example to autostart\nsudo docker exec ${CONTAINER_NAME} sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf\n\n# Add MOTD \ncat >/etc/motd < >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Django\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/djangosetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Reboot server\nreboot","user_defined_fields":[]},{"id":923031,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed NodeJS One-Click","description":"OpenLiteSpeed NodeJS One-Click","ordinal":72,"logo_url":"assets/openlitespeednodejs.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":458,"deployments_active":20,"is_public":true,"mine":false,"created":"2021-10-18T00:52:51","updated":"2023-09-25T01:55:46","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and NodeJS\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/nodejssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":923030,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed Rails One-Click","description":"OpenLiteSpeed Rails One-Click","ordinal":73,"logo_url":"assets/openlitespeedrails.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":47,"deployments_active":1,"is_public":true,"mine":false,"created":"2021-10-18T00:51:05","updated":"2023-08-28T19:43:49","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Rails\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/railssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":691622,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed WordPress One-Click","description":"OpenLiteSpeed WordPress One-Click","ordinal":74,"logo_url":"assets/openlitespeedwordpress.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":7592,"deployments_active":618,"is_public":true,"mine":false,"created":"2020-11-30T21:25:01","updated":"2023-09-28T20:14:15","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### linode\n### Install OpenLiteSpeed and WordPress\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/wpimgsetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401719,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenVPN One-Click","description":"OpenVPN OCA Debian 11 & ubuntu 20","ordinal":75,"logo_url":"assets/OpenVPN.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":38821,"deployments_active":1728,"is_public":true,"mine":false,"created":"2019-03-09T03:02:02","updated":"2023-09-28T20:24:29","rev_note":"Install extra dependencies ","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Install OpenVPN dependencies\napt update && apt -y install ca-certificates wget net-tools gnupg\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian bullseye main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian focal main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelse \necho \"Distro Not Supported\"\nfi\n\n## Apt Update & Install OpenVPN\napt update -y && apt -y install openvpn-as\n\n# UFW install\nufw_install\nufw allow 1194/udp\nsed -ie \"s/DEFAULT_FORWARD_POLICY=\\\"DROP\\\"/DEFAULT_FORWARD_POLICY=\\\"ACCEPT\\\"/g\" /etc/default/ufw\n\n# Cleanup\nstackscript_cleanup\n\n# Adding to display default password as last line in LISH console\nsleep 3\ncat /usr/local/openvpn_as/init.log | grep 'To login'; echo \"(password can be changed on Admin UI)\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""}]},{"id":804172,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Owncast One-Click","description":"Owncast One-Click","ordinal":76,"logo_url":"assets/owncast.svg","images":["linode/debian10"],"deployments_total":1695,"deployments_active":95,"is_public":true,"mine":false,"created":"2021-04-01T15:24:50","updated":"2023-09-26T17:22:39","rev_note":"","script":"#!/usr/bin/bash\n#\n#\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Add owncast user\nadduser owncast --disabled-password --gecos \"\"\n\n# Install dependencies\napt-get install -y libssl-dev unzip curl\n\n# Install Owncast\nmkdir -p /opt/owncast\ncd /opt/owncast || exit\n\ncurl -s https://owncast.online/install.sh | bash\nchown -R owncast:owncast /opt/owncast\n\n# Setup Owncast as a systemd service\ncat >/etc/systemd/system/owncast.service </etc/caddy/Caddyfile </etc/motd <\n#\n#\n## LAMP Stack Settings\n#\n#\n#\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\n## Update\napt_setup_update\n\n## Local Functions used by this StackScript\nfunction owncloud_install {\n system_install_package unzip php-gd php-json php-curl php-mbstring \\\n php-intl php-imagick php-xml php-zip\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cd /var/www\n wget https://download.owncloud.com/server/stable/owncloud-complete-latest.zip\n unzip owncloud-complete-latest.zip\n chown -R www-data:www-data owncloud\n rm owncloud-complete-latest.zip\n local -a input_text=(\n \"Alias / \\\"/var/www/owncloud/\\\"\"\n \"\"\n \" Options +FollowSymlinks\"\n \" AllowOverride All\"\n \"\"\n \" Dav off\"\n \"\"\n \"SetEnv HOME /var/www/owncloud\"\n \"SetEnv HTTP_HOME /var/www/owncloud\"\n \"\"\n )\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n a2ensite owncloud\n a2enmod rewrite headers env dir mime\n sed -i '/^memory_limit =/s/=.*/= 512M/' /etc/php/$PHP_VERSION/apache2/php.ini\n systemctl restart apache2\n echo \"ownCloud is installed\"\n}\n\nfunction owncloud_vhost_configure {\n local -r fqdn=\"$1\"\n local -r soa_email_address=\"$2\"\n local -a input_text=(\n \"\"\n \" ServerName ${fqdn}\"\n \" ServerAdmin ${soa_email_address}\"\n \" DocumentRoot /var/www/owncloud\"\n \" \"\n \" Require all granted\"\n \" AllowOverride All\"\n \" Options FollowSymLinks MultiViews\"\n \" SetEnv HOME /var/www/owncloud\"\n \" SetEnv HTTP_HOME /var/www/owncloud\"\n \" \"\n \"\"\n )\n echo \"\" >> /etc/apache2/sites-available/owncloud.conf\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n}\n\n## Main Script\n# Install and configure the LAMP Stack\nlamp_stack \"$DB_NAME\" \"$DB_ROOT_PASSWORD\" \"${DB_USERNAME:-owncloud}\" \"$DB_USER_PASSWORD\"\n\n# Install ownCloud to be accessed via domain and configure the VirtualHost\nowncloud_install \"$FQDN\"\nowncloud_vhost_configure \"$FQDN\" \"$SOA_EMAIL_ADDRESS\"\n\n# Configure ownCloud - This replaces the installer GUI that was in the previous version of this OCA\nsudo -u www-data php /var/www/owncloud/occ maintenance:install \\\n --database \"mysql\" \\\n --database-name \"$DB_NAME\" \\\n --database-user \"${DB_USERNAME:-owncloud}\" \\\n --database-pass \"$DB_USER_PASSWORD\" \\\n --admin-user \"$OC_ADMIN\" \\\n --admin-pass \"$OC_ADMIN_PASSWORD\"\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 1 --value=$FQDN\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 2 --value=$IP\necho \"Trusted Domain setting added\"\n\n# Open the needed firewall ports\nufw allow http\nufw allow https\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"oc_admin","label":"The name of the admin user for ownCloud"},{"name":"oc_admin_password","label":"The password for ownCloud's admin user"},{"name":"soa_email_address","label":"Admin Email for the ownCloud server"},{"name":"db_name","label":"The name of the database","default":"owncloud"},{"name":"db_root_password","label":"The root password for the database"},{"name":"db_username","label":"The name of the database user to create","default":"owncloud"},{"name":"db_user_password","label":"The password for the created database user"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""}]},{"id":1102906,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Passky One-Click","description":"Passky One-Click app","ordinal":78,"logo_url":"assets/passky.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":158,"deployments_active":11,"is_public":true,"mine":false,"created":"2022-12-20T17:48:51","updated":"2023-09-23T23:06:15","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nInstalling...\nPlease logout and come back in few minutes.\nEOF\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\nDEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n\n# Install docker compose\nsystem_install_package docker-compose\n\n#\n# Passky Server\n#\nwget https://github.com/Rabbit-Company/Passky-Server/releases/latest/download/passky-server.tar.xz\ntar -xf passky-server.tar.xz\ncd passky-server\ncp .env.example .env\n\nSERVER_CORES=$(grep -c ^processor /proc/cpuinfo)\nIP_ADDRESS=$(system_primary_ip)\n\nsed -i \"s/SERVER_CORES=1/SERVER_CORES=$SERVER_CORES/g\" .env\nsed -i \"s/ADMIN_USERNAME=admin/ADMIN_USERNAME=$ADMINUSER/g\" .env\nsed -i \"s/ADMIN_PASSWORD=/ADMIN_PASSWORD=$ADMIN_PASSWORD/g\" .env\n\ndocker-compose up -d\n\napache_install\na2enmod proxy && a2enmod proxy_http && systemctl restart apache2\necho \"\" > /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPreserveHost On\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyRequests Off\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ServerName $WEBSITE\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPass / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPassReverse / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \"\" >> /etc/apache2/sites-available/$WEBSITE.conf\na2ensite \"$WEBSITE\"\nsystemctl restart apache2\n\n# Install SSL\nsystem_install_package python3-certbot-apache\ncat << EOF > /usr/local/bin/installCert\n#!/bin/bash\nif ! certbot -n --apache --agree-tos --redirect -d $WEBSITE -m $EMAIL; then\n echo \"There was a problem while installing SSL certificate. Make sure your A record for domain: $WEBSITE does redirect to IP: $IP_ADDRESS\"\nelse\n echo \"Certificate installed successfully.\"\nfi\nEOF\nchmod +x /usr/local/bin/installCert\n\n# Configure auto-renewal for the certificate\ncrontab -l > cron\necho \"0 4 * * * /usr/bin/certbot renew\" >> cron\ncrontab cron\nrm cron\n\nstackscript_cleanup\n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nAdmin Panel:\n Link: http://$IP_ADDRESS (https://$WEBSITE)\n Username: $ADMINUSER\n Password: $ADMIN_PASSWORD\nTo install SSL certificate please run command: installCert\nEOF","user_defined_fields":[{"name":"website","label":"Website","example":"passky.domain.com"},{"name":"email","label":"Email Address","example":"info@rabbit-company.com"},{"name":"adminuser","label":"Admin Username"},{"name":"admin_password","label":"Admin Password"}]},{"id":804143,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Peppermint One-Click","description":"Peppermint One-Click","ordinal":79,"logo_url":"assets/peppermint.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":1664,"deployments_active":153,"is_public":true,"mine":false,"created":"2021-04-01T12:45:15","updated":"2023-09-28T13:43:33","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# Docker install\napt install docker docker-compose -y\n\n# Configure service file\ncat < /etc/systemd/system/peppermint.service\n[Unit]\nDescription=Docker Compose Peppermint Application Service\nRequires=peppermint.service\nAfter=peppermint.service\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/docker-compose up -d\nExecStop=/usr/bin/docker-compose down\nExecReload=/usr/bin/docker-compose up -d\nWorkingDirectory=/etc/docker/compose/peppermint/\n[Install]\nWantedBy=multi-user.target\nEND\n\n# Get Docker Composer file\nmkdir -p /etc/docker/compose/peppermint/\ncd /etc/docker/compose/peppermint/\n#wget https://raw.githubusercontent.com/Peppermint-Lab/Peppermint/master/docker-compose.yml\ncat < /etc/docker/compose/peppermint/docker-compose.yml\nversion: \"3.1\"\n\nservices:\n postgres:\n container_name: postgres\n image: postgres:latest\n restart: always\n volumes:\n - ./docker-data/db:/data/db\n environment: \n POSTGRES_USER: peppermint\n POSTGRES_PASSWORD: 1234\n POSTGRES_DB: peppermint\n\n client:\n container_name: peppermint\n image: pepperlabs/peppermint:latest\n ports:\n - 5001:5001\n restart: on-failure\n depends_on:\n - postgres\n environment:\n PORT: 5001\n DB_USERNAME: peppermint\n DB_PASSWORD: 1234\n DB_HOST: 'postgres'\n BASE_URL: \"http://$IP:5001\"\nEND\n\n# Enable Peppermint daemon\nsystemctl daemon-reload\nsystemctl enable peppermint.service\nsystemctl start peppermint.service\n\n# UFW\nufw allow 5001\n\n# Stackscript Cleanup\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[]},{"id":644908,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Percona (PMM) One-Click","description":"Percona One-Click","ordinal":80,"logo_url":"assets/percona.svg","images":["linode/debian10"],"deployments_total":189,"deployments_active":8,"is_public":true,"mine":false,"created":"2020-04-30T14:49:38","updated":"2023-09-23T13:29:51","rev_note":"","script":"#!/bin/bash\n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Docker\napt -y install docker.io\nsystemctl enable docker.service\n\n#PMM \ndocker pull percona/pmm-server:2\ndocker create -v /srv --name pmm2-data percona/pmm-server:2 /bin/true\ndocker run -d -p 80:80 -p 443:443 \\\n --volumes-from pmm2-data \\\n --name pmm2-server \\\n --restart always percona/pmm-server:2\n\necho \"Waiting for PMM to initialize to set password...\"\n\nuntil [ \"`docker inspect -f {{.State.Health.Status}} pmm2-server`\" = \"healthy\" ]; do sleep 1; done\n\ndocker exec -t pmm2-server bash -c \"ln -s /srv/grafana /usr/share/grafana/data; grafana-cli --homepath /usr/share/grafana admin reset-admin-password $PMMPASSWORD\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"pmmpassword","label":"Admin Password","example":"Admin User Password for PMM Server"}]},{"id":609018,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"phpMyAdmin One-Click","description":"phpMyAdmin One-Click","ordinal":81,"logo_url":"assets/phpmyadmin.svg","images":["linode/debian11"],"deployments_total":2055,"deployments_active":112,"is_public":true,"mine":false,"created":"2019-11-05T00:28:33","updated":"2023-09-28T17:56:38","rev_note":"Initial import","script":"#!/bin/bash\n#\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname\nset_hostname\n\n# Update system\napt_setup_update\n\n# Install/configure MySQL, Add Admin User\napt-get install -y mariadb-server\nsystemctl enable mariadb --now\nrun_mysql_secure_installation\nmysql -u root -e \"CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD'\"\nmysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost' WITH GRANT OPTION\"\nmysql -u root -e \"FLUSH PRIVILEGES\"\n\n# Install PHP\necho 'phpmyadmin phpmyadmin/dbconfig-install boolean true' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/mysql/admin-pass password $DBROOT_PASSWORD' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | debconf-set-selections\napt-get install -y phpmyadmin libapache2-mod-php7.4\n\n# Configure ufw\nufw_install\nufw allow http\nufw reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"db_user","label":"phpMyAdmin/MySQL Admin User","example":"admin"},{"name":"dbuser_password","label":"phpMyAdmin/MySQL Admin Password"},{"name":"dbroot_password","label":"MySQL root Password"}]},{"id":970522,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pi-hole One-Click","description":"Pi-hole One-Click","ordinal":82,"logo_url":"assets/pihole.svg","images":["linode/ubuntu20.04"],"deployments_total":3612,"deployments_active":228,"is_public":true,"mine":false,"created":"2022-02-07T16:04:53","updated":"2023-09-28T06:54:19","rev_note":"","script":"#!/usr/bin/env bash\n\n## PIHOLE Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nIPV4=$(ip a | awk '/inet / {print $2}'| sed -n '2 p')\nIPV6=$(ip -6 a | grep inet6 | awk '/global/{print $2}' | cut -d/ -f1)\nGENPIHOLEPASSWD=$(echo -n $PIHOLE_PASSWORD | sha256sum | awk '{printf \"%s\",$1 }' | sha256sum)\nPIHOLE_PASSWD=${GENPIHOLEPASSWD:0:-1}\n\nfunction firewall {\n ufw allow 80\n ufw allow 53\n ufw allow 67\n ufw allow 547\n ufw allow 4711\n}\n\nfunction config_pihole {\n mkdir -p /etc/pihole\n cat < /etc/pihole/setupVars.conf\nPIHOLE_INTERFACE=eth0\nIPV4_ADDRESS=$IPV4\nIPV6_ADDRESS=$IPV6\nPIHOLE_DNS_1=8.8.8.8\nPIHOLE_DNS_2=8.8.4.4\nQUERY_LOGGING=true\nINSTALL_WEB_SERVER=true\nINSTALL_WEB_INTERFACE=true\nLIGHTTPD_ENABLED=true\nCACHE_SIZE=10000\nDNS_FQDN_REQUIRED=true\nDNS_BOGUS_PRIV=true\nDNSMASQ_LISTENING=local\nWEBPASSWORD=$PIHOLE_PASSWD\nBLOCKING_ENABLED=true\nEND\n\ncurl -L https://install.pi-hole.net | bash /dev/stdin --unattended\n}\n\nfunction main {\n config_pihole\n firewall\n}\n\n# Execute script\napt_setup_update\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"pihole_password","label":"PIHOLE USER Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"This is the Email address for the SOA record","default":""}]},{"id":662119,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plex One-Click","description":"Plex One-Click","ordinal":83,"logo_url":"assets/plex.svg","images":["linode/debian10"],"deployments_total":2821,"deployments_active":54,"is_public":true,"mine":false,"created":"2020-08-12T15:54:44","updated":"2023-09-28T18:53:14","rev_note":"","script":"#!/bin/bash\n# INPUT VARIABLES:\n# \n# \n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Limited user setup if username is not \"root\"\nif [ \"$USERNAME\" != \"root\" ]; then\n \n# ensure sudo is installed and configure secure user\n apt -y install sudo\n adduser -uid 1000 $USERNAME --disabled-password --gecos \"\"\n echo \"$USERNAME:$PASSWORD\" | chpasswd\n usermod -aG sudo $USERNAME\n \n# Harden SSH Access\n sed -i -e 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config\n \n# set home directory\n HOME=/home/$USERNAME\n \n# configure ssh key for secure user if provided\n if [ \"$SSHKEY\" != \"\" ]; then\n SSHDIR=$HOME/.ssh\n mkdir $SSHDIR && echo \"$SSHKEY\" >> $SSHDIR/authorized_keys\n chmod -R 700 $SSHDIR && chmod 600 $SSHDIR/authorized_keys\n chown -R $USERNAME:$USERNAME $SSHDIR\n fi\n \n# Enable SSH hardening\n systemctl restart sshd\n \n# Create docker group, add limited user, and enable\n groupadd docker\n usermod -aG docker $USERNAME\nfi\n\n# Install and configure UFW for Plex\nufw_install\nufw allow 32400,3005,8324,32469/tcp\nufw allow 1900,32410,32412,32413,32414/udp\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Install plex as limited user\ndocker pull plexinc/pms-docker\ndocker run \\\n -d \\\n --name plex \\\n --restart always \\\n -p 32400:32400/tcp \\\n -p 3005:3005/tcp \\\n -p 8324:8324/tcp \\\n -p 32469:32469/tcp \\\n -p 1900:1900/udp \\\n -p 32410:32410/udp \\\n -p 32412:32412/udp \\\n -p 32413:32413/udp \\\n -p 32414:32414/udp \\\n -e ADVERTISE_IP=\"http://$IP:32400/\" \\\n -h \"Linode Plex Server\" \\\n -v $HOME/plex/config:/config \\\n -v $HOME/plex/media:/media \\\n -v $HOME/plex/transcode:/transcode \\\n plexinc/pms-docker\n\n# Recursively update ownership of Plex directories after delay\nsleep 1\nchown -R $USERNAME:$USERNAME $HOME/plex\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"USERNAME","label":"Limited User Name (not 'root')"},{"name":"PASSWORD","label":"Limited User Password"},{"name":"SSHKEY","label":"Limited User SSH Key","default":"","example":"Usually found in: ./ssh/id_rsa.pub"}]},{"id":611376,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL One-Click","description":"PostgreSQL One-Click","ordinal":84,"logo_url":"assets/postgresql.svg","images":["linode/debian11"],"deployments_total":2625,"deployments_active":182,"is_public":true,"mine":false,"created":"2019-11-13T06:05:28","updated":"2023-09-28T16:19:14","rev_note":"Initial import","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 22\nufw allow 5432\n\n# Install PostgreSQL\napt install -y postgresql postgresql-contrib\nsystemctl enable postgresql\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1068726,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster One-Click","description":"PostgreSQL Cluster","ordinal":85,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":102,"deployments_active":3,"is_public":true,"mine":false,"created":"2022-10-03T20:11:59","updated":"2023-09-18T16:40:38","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n\n# apt config\nexport DEBIAN_FRONTEND=noninteractive\n\n# git repo\nexport GIT_PAT=\"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\"\nexport GIT_REPO=\"https://linode-solutions:${GIT_PAT}@github.com/linode-solutions/postgresql-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/postgresql-cluster\" ]; then\n rm -rf /tmp/postgresql-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[info] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/postgresql-cluster\n cd /tmp/postgresql-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"cluster_name","label":"Host Name"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"PostgeSQL cluster size","default":"3","oneof":"3"}]},{"id":985364,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus & Grafana One-Click","description":"Prometheus and Grafana","ordinal":86,"logo_url":"assets/prometheusgrafana.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":516,"deployments_active":57,"is_public":true,"mine":false,"created":"2022-03-08T17:03:20","updated":"2023-09-28T07:59:21","rev_note":"","script":"#!/usr/bin/env bash\n## Updated: 01-17-2023\n## Author: n0vabyte, Elvis Segura, esegura@linode.com\n\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\ncreds=\"/root/credentials.txt\"\nprometheus_htpasswd_file=\"/etc/nginx/.prometheus_htpasswd\"\n\nfunction add_firewalls {\n ufw allow http\n ufw allow https\n}\n\nfunction configure_nginx {\n apt-get install nginx apache2-utils -y\n cat << EOF > /etc/nginx/sites-available/$FQDN.conf\nserver {\n listen 80;\n server_name $FQDN;\n location / {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:3000;\n }\n location /prometheus/ {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:9090;\n auth_basic \"Restricted Area\";\n auth_basic_user_file $prometheus_htpasswd_file;\n }\n# allow let's encrypt\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/html/.well-known;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-{available,enabled}/$FQDN.conf\n unlink /etc/nginx/sites-enabled/default\n systemctl reload nginx\n systemctl enable nginx\n}\n\nfunction install_node_exporter {\n groupadd --system prometheus\n useradd -s /sbin/nologin --system -g prometheus prometheus\n curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '\"' -f 4 | wget -qi - \n tar -xvf node_exporter*.tar.gz\n chmod +x node_exporter-*/node_exporter\n chown prometheus:prometheus node_exporter\n mv node_exporter-*/node_exporter /usr/local/bin\n rm -fr node_exporter-*\n cat < /etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start node_exporter\n systemctl enable node_exporter\n}\n\nfunction configure_prometheus {\n latest_version=$(curl -s https://raw.githubusercontent.com/prometheus/prometheus/main/VERSION)\n prom_conf=\"/etc/prometheus/prometheus.yml\"\n file_sd_targets=\"/etc/prometheus/file_sd_targets\"\n prometheus_conf_dir=\"/etc/prometheus\"\n prometheus_data_dir=\"/var/lib/prometheus\"\n mkdir $prometheus_conf_dir $prometheus_conf_dir/file_sd_targets \\\n $prometheus_conf_dir/rules $prometheus_data_dir\n\n wget https://github.com/prometheus/prometheus/releases/download/v$latest_version/prometheus-$latest_version.linux-amd64.tar.gz\n tar xvf prometheus-$latest_version.linux-amd64.tar.gz\n mv prometheus-$latest_version.linux-amd64/* $prometheus_conf_dir\n chown -R prometheus:prometheus $prometheus_conf_dir $prometheus_data_dir\n mv $prometheus_conf_dir/{prometheus,promtool} /usr/local/bin\n ## cleanup\n rm prometheus-$latest_version.linux-amd64.tar.gz\n rmdir prometheus-$latest_version.linux-amd64\n\n ## backup config before updating\n cp $prom_conf{,.bak}\n sed -i -e '/- job_name: \"prometheus\"/ s/^/#/' $prom_conf\n sed -i -e '/- targets:/ s/^/#/' $prom_conf\n sed -i -e '/static_configs/ s/^/#/g' $prom_conf\n ## add our config\n cat << EOF >> $prom_conf\n#########################################\n## Local Prometheus Instance - This Box #\n#########################################\n - job_name: local_prometheus\n scrape_interval: 3s\n file_sd_configs:\n - files:\n - file_sd_targets/local_prometheus.yml\n honor_labels: true\n relabel_configs:\n - regex: (.*)\n replacement: \\${1}:9100\n source_labels:\n - __address__\n target_label: __address__\n - regex: (.+)\n replacement: \\${1}\n source_labels:\n - __instance\n target_label: instance\nEOF\n ## add to file_sd_targets\n cat << EOF >> $file_sd_targets/local_prometheus.yml\n- labels:\n __instance: prometheus\n cluster: local\n targets:\n - 127.0.0.1\nEOF\n cat << EOF > /etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nGroup=prometheus\nType=simple\nExecStart=/usr/local/bin/prometheus \\\n--config.file /etc/prometheus/prometheus.yml \\\n--storage.tsdb.path $prometheus_data_dir/ \\\n--web.console.templates=$prometheus_conf_dir/consoles \\\n--web.console.libraries=$prometheus_conf_dir/console_libraries \\\n--web.listen-address=127.0.0.1:9090 \\\n--web.external-url=https://$FQDN/prometheus \\\n--storage.tsdb.retention=60d\nRestart=always\nExecReload=/usr/bin/kill -HUP \\$MAINPID\nTimeoutStopSec=20s\nOOMScoreAdjust=-900\nSendSIGKILL=no\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start prometheus\n systemctl enable prometheus\n\n ## protect with htpasswd\n prometheus_htpasswd=$(openssl rand -base64 32)\n htpasswd -cb $prometheus_htpasswd_file prometheus $prometheus_htpasswd\n ## log credentials locally\n cat << EOF >> $creds\n#################\n# Prometheus #\n#################\nLocation: https://$FQDN/prometheus\nUsername: prometheus\nPassword: $prometheus_htpasswd\nEOF\n ## sanity check\n function fallback {\n echo \"[FATAL] Creating custom configuration failed. Restoring old configuration\"\n cp $prom_conf{.bak,}\n systemctl restart prometheus\n sleep 2\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[CRITICAL] Encoutered unexpected error while configuring Prometheus. Please reach out to Support.\"\n exit 2\n fi\n }\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[ERROR] Prometheus is not running. Falling back to default config..\"\n fallback\n fi\n\n}\n\nfunction configure_grafana {\n echo \"[info] configuring Grafana - Installing Packages\"\n apt-get install -y apt-transport-https \\\n software-properties-common \\\n wget \\\n gnupg2 \\\n sqlite3\n\n wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\n echo \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\n apt-get -y update\n apt-get -y install grafana\n\n ## reset Grafana admin password\n grafana_password=$(openssl rand -base64 32)\n\n echo \"[info] updating grafana config\"\n sed -i -e 's/;admin_user = admin/admin_user = admin/g' /etc/grafana/grafana.ini\n sed -i \"s|;admin_password = admin|admin_password = $grafana_password|g\" /etc/grafana/grafana.ini\n\n echo \"[info] starting grafana-server\"\n systemctl start grafana-server\n systemctl enable grafana-server\n\n ## log credentials locally\n cat << EOF >> $creds\n##############\n# Grafana #\n##############\nLocation: https://$FQDN/\nUsername: admin\nPassword: $grafana_password\nEOF\n}\n\nfunction ssl_grafana {\n apt install -y certbot python3-certbot-nginx\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n add_firewalls\n configure_nginx\n install_node_exporter\n configure_prometheus\n configure_grafana\n ssl_grafana\n}\n\n## execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This email is for the LetsEncrypt SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":607034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus One-Click","description":"Prometheus One Click App","ordinal":87,"logo_url":"assets/prometheus.svg","images":["linode/debian10"],"deployments_total":348,"deployments_active":12,"is_public":true,"mine":false,"created":"2019-10-29T20:59:30","updated":"2023-09-25T20:29:04","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prometheus\ngroupadd --system prometheus\nuseradd -s /sbin/nologin --system -g prometheus prometheus\nmkdir /var/lib/prometheus\nfor i in rules rules.d files_sd; do mkdir -p /etc/prometheus/${i}; done\napt-get -y install wget\nmkdir -p /tmp/prometheus && cd /tmp/prometheus\ncurl -s https://api.github.com/repos/prometheus/prometheus/releases/latest \\\n | grep browser_download_url \\\n | grep linux-amd64 \\\n | cut -d '\"' -f 4 \\\n | wget -qi -\ntar xvf prometheus*.tar.gz\ncd prometheus*/\nmv prometheus promtool /usr/local/bin/\nmv prometheus.yml /etc/prometheus/prometheus.yml\nmv consoles/ console_libraries/ /etc/prometheus/\ncd ~/\nrm -rf /tmp/prometheus\n\n# Edit Prometheus config\nsudo tee /etc/prometheus/prometheus.yml</etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nType=simple\nUser=prometheus\nGroup=prometheus\nExecReload=/bin/kill -HUP $MAINPID\nExecStart=/usr/local/bin/prometheus \\\n --config.file=/etc/prometheus/prometheus.yml \\\n --storage.tsdb.path=/var/lib/prometheus \\\n --web.console.templates=/etc/prometheus/consoles \\\n --web.console.libraries=/etc/prometheus/console_libraries \\\n --web.listen-address=0.0.0.0:9090 \\\n --web.external-url=\n\nSyslogIdentifier=prometheus\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nfor i in rules rules.d files_sd; do chown -R prometheus:prometheus /etc/prometheus/${i}; done\nfor i in rules rules.d files_sd; do chmod -R 775 /etc/prometheus/${i}; done\nchown -R prometheus:prometheus /var/lib/prometheus/\n\n# Add node_exporter & Enable services\ncurl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest \\\n| grep browser_download_url \\\n| grep linux-amd64 \\\n| cut -d '\"' -f 4 \\\n| wget -qi -\n\ntar -xvf node_exporter*.tar.gz\ncd node_exporter*/\ncp node_exporter /usr/local/bin\nnode_exporter --version\n\ncat </etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n\n[Install]\nWantedBy=default.target\nEND\n\nsystemctl daemon-reload\nsystemctl start prometheus\nsystemctl enable prometheus\nsystemctl start node_exporter\nsystemctl enable node_exporter\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":688890,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"RabbitMQ One-Click","description":"RabbitMQ One-Click","ordinal":88,"logo_url":"assets/rabbitmq.svg","images":["linode/debian10"],"deployments_total":364,"deployments_active":52,"is_public":true,"mine":false,"created":"2020-11-17T20:53:00","updated":"2023-09-22T17:10:00","rev_note":"","script":"#!/bin/bash\n#\n#\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n## Install prerequisites\napt-get install curl gnupg -y\n\n## Get RabbitMQ \n$ curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -\nsudo apt-key adv --keyserver \"hkps://keys.openpgp.org\" --recv-keys \"0x0A9AF2115F4687BD29803A206B73A36E6026DFCA\"\n## Install apt HTTPS transport\napt-get install apt-transport-https\n\n## Add Bintray repositories that provision latest RabbitMQ and Erlang 23.x releases\ntee /etc/apt/sources.list.d/bintray.rabbitmq.list <\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# System Update\nset_hostname\napt_setup_update\n\nfunction install_redis {\n apt install -y redis-server\n systemctl enable redis-server\n}\n\nfunction redis_config {\n sed -ie \"s/supervised no/supervised systemd/g\" /etc/redis/redis.conf\n sed -ie \"s/appendonly no/appendonly yes/g\" /etc/redis/redis.conf\n systemctl restart redis-server\n}\n\nfunction main {\n install_redis\n redis_config\n}\nmain\n\n# cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1132204,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Marketplace App for Redis® Sentinel Cluster One-Click","description":"Redis Sentinel One-Click Cluster","ordinal":90,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":122,"deployments_active":15,"is_public":true,"mine":false,"created":"2023-02-27T20:05:44","updated":"2023-09-27T15:05:52","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_PAT=\"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\"\nexport GIT_REPO=\"https://linode-solutions:${GIT_PAT}@github.com/linode-solutions/redis-occ-beta.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Redis CA"},{"name":"common_name","label":"Common Name","default":"Redis Server"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Redis cluster size","default":"3","oneof":"3,5"}]},{"id":923036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Restyaboard One-Click","description":"Restyaboard One-Click","ordinal":91,"logo_url":"assets/restyaboard.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04"],"deployments_total":197,"deployments_active":2,"is_public":true,"mine":false,"created":"2021-10-18T01:07:09","updated":"2023-09-28T15:11:35","rev_note":"","script":"#!/bin/bash\n#\n# Install script for Restyaboard\n#\n# Usage: ./restyaboard.sh\n#\n# Copyright (c) 2014-2021 Restya.\n# Dual License (OSL 3.0 & Commercial License)\n{\n\tmain() {\n\t\tif [[ $EUID -ne 0 ]];\n\t\tthen\n\t\t\techo \"This script must be run as root\"\n\t\t\texit 1\n\t\tfi\n\t\tset -x\n\t\twhoami\n\t\t#\n\t\t# Checking the OS name and OS version\n\t\t#\n\t\tfind_release ()\n\t\t{\n\t\t\t# Checking the Ubuntu OS\n\t\t\tif [ -f /etc/lsb-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`grep DISTRIB_ID /etc/lsb-release`\"\n\t\t\t\tDISTRIB_ID='DISTRIB_ID='\n\t\t\t\tOS_NAME=$OS_REQUIREMENT$DISTRIB_ID\n\t\t\t\tarray=();\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" != \"$DISTRIB_ID\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_NAME ]]; do\n\t\t\t\t\tarray+=( \"${OS_NAME%%\"$DISTRIB_ID\"*}\" );\n\t\t\t\t\tOS_NAME=${OS_NAME#*\"$DISTRIB_ID\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_REQUIREMENT=${array[1]}\n\t\t\t\tfi\n\t\t\t\tOS_VERSION=\"`grep DISTRIB_RELEASE /etc/lsb-release`\"\n\t\t\t\tDISTRIB_RELEASE='DISTRIB_RELEASE='\n\t\t\t\tOS_Ver=$OS_VERSION$DISTRIB_RELEASE\n\t\t\t\tversion=();\n\t\t\t\tif ([ \"$OS_VERSION\" != \"$DISTRIB_RELEASE\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_Ver ]]; do\n\t\t\t\t\tversion+=( \"${OS_Ver%%\"$DISTRIB_RELEASE\"*}\" );\n\t\t\t\t\tOS_Ver=${OS_Ver#*\"$DISTRIB_RELEASE\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_VERSION=${version[1]}\n\t\t\t\tfi\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Redhat, Fedora, and Centos\n\t\t\tif [ -f /etc/redhat-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/redhat-release | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/redhat-release | cut -d ' ' -f 4 | cut -d '.' -f 1`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Debian OS\n\t\t\tif [ -f /etc/issue ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/issue | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/issue | cut -d ' ' -f 3`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the OpenBSD \n\t\t\tif [ -f /etc/motd ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/motd | head -1 | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/motd | head -1 | cut -d ' ' -f 2`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t}\n\t\tfindbin ()\n {\n ret=0\n newpath=`echo $PATH | tr : ' '`\n for i in ${newpath}; do\n\t\t\t\tif [ -x $i/$1 ]; then\n\t\t\t\t\tret=1\n\t\t\t\t\tbreak\n\t\t\t\tfi\n done\n echo $ret\n return \n }\n checkdeps()\n {\n pkginfo=\"dpkg rpm ipkg pkg_info\"\n for i in $pkginfo; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n\t\t\t\t\tpkginfo=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that for listing packages\"\n\t\t\t\t\tbreak\n fi\n done\n\n if [ ${pkginfo} = \"pkg_info\" ]; then\n # BSD needs PKG_PATH set to load anything over the net.\n if [ x${PKG_PATH} = x ]; then\n\t\t\t\t\techo \"Please set the environment variable PKG_PATH and try again.\"\n\t\t\t\t\texit 1\n fi\n fi\n \n \n pkg_name=\"yum apt-get ipkg pkg_add\"\n for i in ${pkg_name}; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n pkg_name=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that to install packages\"\n\t\t\t\t\tbreak\n fi\n done\n \n\n for i in ${genericdeps} ${gtkdeps} ${kdedeps}; do\n case $pkginfo in\n dpkg)\n deps=\"`dpkg -l \"*$i*\" | grep -- \"^ii\" | cut -d ' ' -f 3`\"\n ;;\n rpm)\n deps=\"`rpm -q $i`\"\n ;;\n pkg_info)\n deps=\"`pkg_info | grep \"$i\" | sed -e 's: .*$::'`\"\n ;;\n ipkg)\n deps=\"todo\"\n ;;\n *)\n echo \"ERROR: No package manager found!\"\n exit 1\n ;;\n esac\n found=`echo ${deps} | grep -v 'not installed' | grep -c \"${i}\" 2>&1`\n if [ $found -gt 0 ]; then\n \techo \"Yes, found $i\"\n else\n\t\t\t\t\techo \"Nope, $i appears to not be installed\"\n\t\t\t\t\tmissing=\"${missing} $i\"\n fi\n done\n\n if [ -n \"${missing}\" ]; then\n echo \"package(s)\\\"${missing}\\\" are missing!\"\n echo \"You will need sudo priviledges to install the packages\"\n if [ x$yes = xno ]; then\n \t$debug sudo ${pkgnet} install ${missing}\n else\n \t$debug sudo ${pkgnet} -y install ${missing}\n fi\n fi\n }\n\t\tinstall_nginx() \n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n apt install -y cron nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"nginx installation failed with error code ${error_code} (nginx installation failed with error code 2)\"\n return 2\n fi\n if [ -f \"/etc/nginx/conf.d/default\" ]; then\n rm -rf /etc/nginx/conf.d/default\n fi\n if [ -f \"/etc/nginx/sites-enabled/default\" ]; then\n rm -rf /etc/nginx/sites-enabled/default\n fi\n if [ -f \"/etc/nginx/sites-available/default\" ]; then\n rm -rf /etc/nginx/sites-available/default\n fi\n service nginx start\n fi\n\t\t\telse\t\t\t\t\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n rpm -Uvh \"http://nginx.org/packages/centos/${OS_VERSION}/noarch/RPMS/nginx-release-centos-${OS_VERSION}-0.el${OS_VERSION}.ngx.noarch.rpm\"\n yum install -y zip cronie nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"cron nginx installation failed with error code ${error_code} cron nginx installation failed with error code 18\"\n return 18\n fi\n if [ -f \"/etc/nginx/conf.d/default.conf\" ]; then\n rm -rf /etc/nginx/conf.d/default.conf\n fi\n if [ -f \"/etc/nginx/sites-enabled/default.conf\" ]; then\n rm -rf /etc/nginx/sites-enabled/default.conf\n fi\n if [ -f \"/etc/nginx/sites-available/default.conf\" ]; then\n rm -rf /etc/nginx/sites-available/default.conf\n fi\n service nginx start\n chkconfig --levels 35 nginx on\n fi\n\t\t\tfi\n\t\t}\n\t\tinstall_php()\n\t\t{\n\t\t\tif ! hash php 2>&-; then\n\t\t\t\techo \"PHP is not installed!\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\t\t\t\t\t\t\t\n echo \"Installing PHP...\"\n apt install -y php7.4 php7.4-common --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"PHP installation failed with error code ${error_code} (PHP installation failed with error code 3)\"\n return 3\n fi\n else \n if ([ \"$pkg_name\" = \"yum\" ])\n then\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n echo \"Note: For the latest version of PHP, we're going to download https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm and https://rpms.remirepo.net/enterprise/remi-release-8.rpm.\"\n echo \"Installing PHP...\"\n dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm\n dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\n dnf module enable php:remi-7.4\n dnf -y install php php-cli php-common\n else\n yum install -y epel-release\n echo \"Note: For the latest version of PHP, we're going to download http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm.\"\n echo \"Installing PHP...\"\n rpm -Uvh \"http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm\"\n yum --enablerepo=remi-php74 install -y php\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"php installation failed with error code ${error_code} (php installation failed with error code 20)\"\n return 20\n fi\n fi\n fi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Installing PHP fpm and cli extension...\"\n\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\tthen\n\t\t\t\tapt install -y php7.4-fpm php7.4-cli --allow-unauthenticated\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"php7.4-cli installation failed with error code ${error_code} (php7.4-cli installation failed with error code 4)\"\n\t\t\t\tfi\n\t\t\t\tservice php7.4-fpm start\n\t\t\telse \n\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\tthen\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n \t\t\tthen\n\t\t\t\t\t\tdnf -y install php-fpm php-devel php-opcache\n\t\t\t\t\t\tdnf -y install php-json\n\t\t\t\t\telse\n\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-fpm php-devel php-cli php-opcache\n\t\t\t\t\tfi\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php-devel installation failed with error code ${error_code} (php-devel installation failed with error code 21)\"\n\t\t\t\t\t\treturn 21\n\t\t\t\t\tfi\t\t\t\t\t\n\t\t\t\t\tservice php-fpm start\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"....\"\n\t\t\telse\n\t\t\t\tchkconfig --levels 35 php-fpm on\t\t\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP curl extension...\"\n\t\t\tphp -m | grep curl\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-curl...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-curl --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-curl installation failed with error code ${error_code} (php7.4-curl installation failed with error code 5)\"\n\t\t\t\t\t\treturn 5\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-curl\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-curl\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-curl installation failed with error code ${error_code} (php-curl installation failed with error code 22)\"\n\t\t\t\t\t\t\treturn 22\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP pgsql extension...\"\n\t\t\tphp -m | grep pgsql\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-pgsql...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install libpq5\n\t\t\t\t\tapt install -y php7.4-pgsql --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-pgsql installation failed with error code ${error_code} (php7.4-pgsql installation failed with error code 6)\"\n\t\t\t\t\t\treturn 6\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pgsql\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pgsql\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-pgsql installation failed with error code ${error_code} (php-pgsql installation failed with error code 23)\"\n\t\t\t\t\t\t\treturn 23\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP mbstring extension...\"\n\t\t\tphp -m | grep mbstring\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-mbstring...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-mbstring --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-mbstring installation failed with error code ${error_code} (php7.4-mbstring installation failed with error code 7)\"\n\t\t\t\t\t\treturn 7\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-mbstring\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-mbstring\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-mbstring installation failed with error code ${error_code} (php-mbstring installation failed with error code 24)\"\n\t\t\t\t\t\t\treturn 24\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP ldap extension...\"\n\t\t\tphp -m | grep ldap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-ldap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-ldap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-ldap installation failed with error code ${error_code} (php7.4-ldap installation failed with error code 8)\"\n\t\t\t\t\t\treturn 8\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-ldap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-ldap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-ldap installation failed with error code ${error_code} (php-ldap installation failed with error code 25)\"\n\t\t\t\t\t\t\treturn 25\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imagick extension...\"\n\t\t\tphp -m | grep imagick\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-imagick...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y gcc\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"gcc installation failed with error code ${error_code} (gcc installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y imagemagick\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"imagemagick installation failed with error code ${error_code} (imagemagick installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y php7.4-imagick --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imagick installation failed with error code ${error_code} (php7.4-imagick installation failed with error code 10)\"\n\t\t\t\t\t\treturn 10\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tyum install -y ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pear\n\t\t\t\t\t\t\tdnf -y install php-gd\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pear\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-gd\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"Installing php-imagick failed with error code ${error_code} (Installing php-imagick failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\n\t\t\t\t\t\tcd /usr/local/src\n\t\t\t\t\t\twget http://pecl.php.net/get/imagick-2.2.2.tgz\n\t\t\t\t\t\ttar zxvf ./imagick-2.2.2.tgz\n\t\t\t\t\t\tcd imagick-2.2.2\n\t\t\t\t\t\tphpize\n\t\t\t\t\t\t./configure\n\t\t\t\t\t\tmake\n\t\t\t\t\t\tmake test\n\t\t\t\t\t\tmake install\n\t\t\t\t\t\techo \"extension=imagick.so\" >> /etc/php.ini\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imap extension...\"\n\t\t\tphp -m | grep imap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php7.4-imap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-imap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imap installation failed with error code ${error_code} (php7.4-imap installation failed with error code 11)\"\n\t\t\t\t\t\treturn 11\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-imap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-imap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-imap installation failed with error code ${error_code} (php-imap installation failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking xml...\"\n\t\t\tphp -m | grep xml\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing xml...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install php7.4-xml --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 56)\"\n\t\t\t\t\t\treturn 56\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-xml\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-xml\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 57)\"\n\t\t\t\t\t\t\treturn 57\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_timezone()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\ttimezone=$(cat /etc/timezone)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php/7.4/fpm/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php/7.4/fpm/php.ini\n\t\t\telse \n\t\t\t\tPHP_VERSION=$(php -v | grep \"PHP 5\" | sed 's/.*PHP \\([^-]*\\).*/\\1/' | cut -c 1-3)\n\t\t\t\techo \"Installed PHP version: '$PHP_VERSION'\"\n\t\t\t\ttimezone=$(cat /etc/sysconfig/clock | grep ZONE | cut -d\"\\\"\" -f2)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php.ini\n\t\t\tfi\n\t\t}\n\t\tinstall_postgresql()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tid -a postgres\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]; then\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n sh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n apt install wget ca-certificates\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n fi\n wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n apt-key add ACCC4CF8.asc\n apt update\n apt install -y postgresql --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n return 13\n fi\n\t\t\t\telse\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ 1 -eq \"$(echo \"${PSQL_VERSION} < 9.3\" | bc)\" ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tsh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n\t\t\t\t\t\tapt install wget ca-certificates\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n\t\t\t\t\t\tfi\n\t\t\t\t\t\twget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n\t\t\t\t\t\tapt-key add ACCC4CF8.asc\n\t\t\t\t\t\tapt update\n\t\t\t\t\t\tapt upgrade\n\t\t\t\t\t\tapt install -y postgresql --allow-unauthenticated\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n\t\t\t\t\t\t\treturn 13\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\tfi\n\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf > /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf.1\n\t\t\t\tcd /etc/postgresql/${PSQL_VERSION}/main || exit\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tservice postgresql restart\n\t\t\telse\n\t\t\t\tif ! which psql > /dev/null 2>&1;\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n if [ $(getconf LONG_BIT) = \"64\" ]; then\n if [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n dnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n else\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n then\n yum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n fi\n fi\n fi\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n dnf module enable postgresql:13\n dnf -y install postgresql-server postgresql-contrib postgresql-libs\n else\n yum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\t\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql13 installation failed with error code ${error_code} (postgresql13 installation failed with error code 29)\"\n return 29\n fi\n\t\t\t\telse \n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tif [[ $PSQL_VERSION < 9.3 ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tif [ $(getconf LONG_BIT) = \"64\" ]; then\n\t\t\t\t\t\t\tif [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n\t\t\t\t\t\t\t\tdnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n\t\t\t\t\t\t\t\tthen\n\t\t\t\t\t\t\t\t\tyum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf module enable postgresql:13\n\t\t\t\t\t\t\tdnf -y install postgresql-server postgresql-contrib postgresql-libs\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 29)\"\n\t\t\t\t\t\t\treturn 29\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^13\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=13\n\t\t\t\tfi\n\t\t\t\tPSQL_FOLDER=$(echo ${PSQL_VERSION} | sed 's/\\.//')\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tpostgresql-setup --initdb\n\t\t\t\telse\n\t\t\t\t\t\"/usr/pgsql-${PSQL_VERSION}/bin/postgresql-${PSQL_VERSION}-setup\" initdb\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl enable postgresql\n\t\t\t\t\tsystemctl start postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl start \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\t\tsystemctl enable \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" start\n\t\t\t\t\t\tchkconfig --levels 35 \"postgresql-${PSQL_VERSION}\" on\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/data/pg_hba.conf\" > \"/var/lib/pgsql/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/data\" || exit\n\t\t\t\telse\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf\" > \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/${PSQL_VERSION}/data\" || exit\n\t\t\t\tfi\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl restart postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl restart \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_geoip()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tif ! hash GeoIP-devel 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-geoip php7.4-dev libgeoip-dev\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code ${error_code} (php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code 50)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\techo \"extension=geoip.so\" >> /etc/php.ini\n\n\t\t\t\tmkdir -v /usr/share/GeoIP\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"GeoIP folder creation failed with error code ${error_code} (GeoIP folder creation failed with error code 52)\"\n\t\t\t\tfi\n\t\t\t\tget_geoip_data\n\t\t\telse\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\t\treturn 47\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tconfigure_restyaboard()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n echo \"Changing server_name in nginx configuration...\"\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\telse\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\tfi\n\t\t}\n\t\tinstall_postfix()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Installing postfix...\"\n\t\t\t\techo \"postfix postfix/mailname string $IPADDR\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\techo \"postfix postfix/main_mailer_type string 'Internet Site'\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\tapt install -y postfix\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"postfix installation failed with error code ${error_code} (postfix installation failed with error code 16)\"\n\t\t\t\tfi\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/fpm/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/fpm/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/cli/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/cli/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php.ini\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tchange_permission()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/media/ $RESTYABOARD_DIR/tmp/cache/ $RESTYABOARD_DIR/client/img/\n\t\t\t\tchcon -Rv --type=httpd_t $RESTYABOARD_DIR/\n\t\t\tfi\n\t\t}\n\t\tpsql_connect()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 34)\"\n\t\t\t\t\treturn 34\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 35)\"\n\t\t\t\t\treturn 35\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 36)\"\n\t\t\t\t\treturn 36\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 37)\"\n\t\t\t\t\treturn 37\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 39)\"\n\t\t\t\t\t\treturn 39\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 40)\"\n\t\t\t\t\treturn 40\n\t\t\t\tfi\t\t\t\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 41)\"\n\t\t\t\t\treturn 41\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 42)\"\n\t\t\t\t\treturn 42\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 43)\"\n\t\t\t\t\treturn 43\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\tif [ \"$?\" = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 45)\"\n\t\t\t\t\t\treturn 45\n\t\t\t\t\tfi\t\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P allow_postfix_local_write_mail_spool 1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tphp_fpm_reset()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \".........\"\n\t\t\telse\n\t\t\t\techo \"Reset php-fpm (use unix socket mode)...\"\n\t\t\t\tif [ -f \"/run/php/php7.4-fpm.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php\\/php7.4-fpm.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\telif [ -f \"/run/php-fpm/www.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php-fpm\\/www.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/unix:\\/run\\/php-fpm\\/www.sock/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\telse\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/127.0.0.1:9000/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_jq()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tapt install -y jq\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 53)\"\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tyum install -y jq\n\t\t\t\terror_code\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 49)\"\n\t\t\t\t\treturn 49\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_db_connection()\n\t\t{\t\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Starting services...\"\n\t\t\t\tservice cron restart\n\t\t\t\tservice php7.4-fpm restart\n\t\t\t\tservice nginx restart\n\t\t\t\tservice postfix restart\n\t\t\t\tapt install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\telse\n\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\telse\n\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\tfi\n\t\t\t\tyum install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P httpd_can_network_connect_db=1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tssl_connectivity()\n\t\t{\n\t\t\tif [[ $IPADDR =~ ^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$ ]]; then\n\t\t\t\techo \"SSL connectivity cannot be set for IP address\"\n\t\t\telse\n\t\t\t\tset +x\n\t\t\t\techo \"Do you want to set up SSL connectivity for your domain and your domain should be publicly accessible Restyaboard instance and your domain should be mappped to this Restyaboard Server, Note: If you're trying to set SSL for Non-publicly accessible instance, then your Restyaboard will not work (y/n)?\"\n\t\t\t\tread -r answer\n\t\t\t\tset -x\n\t\t\t\tcase \"${answer}\" in\n\t\t\t\t\t[Yy])\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tapt install certbot python3-certbot-nginx -y\n\t\t\t\t\t\tservice nginx restart\n\t\t\t\t\t\tservice php7.4-fpm restart\n\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\telse\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install epel-release\n\t\t\t\t\t\t\tdnf -y install certbot python3-certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y epel-release\n\t\t\t\t\t\t\tyum install certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"SSL installation failed with error code ${error_code} (php installation failed with error code 20)\"\n\t\t\t\t\t\t\treturn 20\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tesac\n\t\t\tfi\n\t\t}\n\t\tfind_release\n\t\tcheckdeps\n\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n then\n\t\t\tapt update\n apt install -y net-tools\n\t\t\tapt install -y curl unzip\n\t\telse\n\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n \tthen\n yum install -y net-tools\n\t\t\t\tyum install -y curl unzip\n\t\t\tfi\n\t\tfi\n IFCONFIG_PATH=$(which ifconfig)\n IPADDR=$(${IFCONFIG_PATH} eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n\t\tRESTYABOARD_VERSION=$(curl --silent https://api.github.com/repos/RestyaPlatform/board/releases | grep tag_name -m 1 | awk '{print $2}' | sed -e 's/[^v0-9.]//g')\n\t\tPOSTGRES_DBHOST=localhost\n\t\tPOSTGRES_DBNAME=restyaboard\n\t\tPOSTGRES_DBUSER=restya\n\t\tPOSTGRES_DBPASS=hjVl2!rGd\n\t\tPOSTGRES_DBPORT=5432\n\t\tDOWNLOAD_DIR=/opt/restyaboard\n RESTYABOARD_DIR=/usr/share/nginx/html/restyaboard\n\t\t\n\t\tget_geoip_data () \n\t\t{\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIP.dat.gz\n\t\t\tgunzip GeoIP.dat.gz\n\t\t\tmv GeoIP.dat /usr/share/GeoIP/GeoIP.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz\n\t\t\tgunzip GeoIPv6.dat.gz\n\t\t\tmv GeoIPv6.dat /usr/share/GeoIP/GeoIPv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.xz\n\t\t\tunxz GeoLiteCity.dat.xz\n\t\t\tmv GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCityv6.dat.gz\n\t\t\tgunzip GeoLiteCityv6.dat.gz\n\t\t\tmv GeoLiteCityv6.dat /usr/share/GeoIP/GeoLiteCityv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNum.dat.gz\n\t\t\tgunzip GeoIPASNum.dat.gz\n\t\t\tmv GeoIPASNum.dat /usr/share/GeoIP/GeoIPASNum.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNumv6.dat.gz\n\t\t\tgunzip GeoIPASNumv6.dat.gz\n\t\t\tmv GeoIPASNumv6.dat /usr/share/GeoIP/GeoIPASNumv6.dat\n\t\t}\n\n\t\tupgrade-0.3-0.4()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.4-0.4.1()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.5.2-0.6()\n\t\t{\n\t\t\tsed -i \"s/rewrite ^\\/ical\\/.*/rewrite ^\\/ical\\/([0-9]*)\\/([0-9]*)\\/([a-z0-9]*).ics\\$ \\/server\\/php\\/ical.php?board_id=\\$1\\&user_id=\\$2\\&hash=\\$3 last;/\" /etc/nginx/conf.d/restyaboard.conf\n\t\t}\n\n\t\tupgrade-0.6.3-0.6.4()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_created_date\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_created_date/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.4-0.6.5()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_id\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_id/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.2.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.5-0.6.6()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\t\t\n\t\tupgrade-0.6.6-0.6.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_card_counter-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_card_counter-v0.1.1.zip\n\t\t\tunzip /tmp/r_card_counter-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.2.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_eu_gdpr-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_eu_gdpr-v0.1.2.zip\n\t\t\tunzip /tmp/r_eu_gdpr-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.1.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\t\t\t\n\t\t\t\n\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.3.zip\n\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\t: > /var/spool/cron/crontabs/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n\t\t\telse\n\t\t\t\t: > /var/spool/cron/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.7-0.6.8(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.3.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\n\t\tupgrade-0.6.8-0.6.9(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.4.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.4.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.4.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\t\tupgrade-0.6.9-1.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_togetherjs\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_togetherjs/\n\t\t\tfi\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.5.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.5.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.5.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.2.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\n\t\t\techo \"Applying permission...\"\n\t\t\tuseradd restyaboard\n\t\t\tusermod --password 'hjVl2!rGd' restyaboard\n\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tuser www-data;\n\t\t\t\tusermod -a -G restyaboard www-data\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\telse\n\t\t\t\tuser nginx;\n\t\t\t\tusermod -a -G restyaboard nginx\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\tfi\n\t\t\tchown -R restyaboard:restyaboard $RESTYABOARD_DIR\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n\t\t\tchmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tfi\n\t\t}\n\n\t\tupdate_version()\n\t\t{\n\t\t\tset +x\n\t\t\techo -e \"A newer version ${RESTYABOARD_VERSION} of Restyaboard is available.\\n\\nImportant: Please note that upgrading will remove any commercial apps that were free in previous version.\\nFor more details about commercial apps, please visit https://restya.com/board/pricing\\n\\nDo you want to get it now y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tset +x\n\t\t\t\tset -x\n\t\t\t\t\n\t\t\t\techo \"Downloading files...\"\n\t\t\t\tcurl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n\t\t\t\tunzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n\t\t\t\t\n\t\t\t\techo \"Updating files...\"\n\t\t\t\tcp -r ${DOWNLOAD_DIR}/. \"$RESTYABOARD_DIR\"\n\t\t\t\t\n\t\t\t\techo \"Connecting database to run SQL changes...\"\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$? \n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database connection failed with error code ${error_code} (PostgreSQL database connection failed with error code 32)\"\n\t\t\t\t\treturn 32\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\t\n\t\t\t\techo \"Changing PostgreSQL database name, user and password...\"\n\t\t\t\tsed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\t\tdeclare -a upgrade;\n\t\t\t\tif [[ $version < \"v0.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.3-0.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.4.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4-0.4.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4.2-0.5\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.1-0.5.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.2-0.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6-0.6.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.1-0.6.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.3\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.2-0.6.3\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.3-0.6.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.4-0.6.5\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v0.6.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.5-0.6.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tset +x\n\t\t\t\t\techo \"Before updating make sure to remove duplicate username's and emails used by more than one user, otherwise unique indexing for users will be thrown an error But all other queries will be executed without any issue.\"\n\t\t\t\t\tread -r -s -p $'Press [Enter] key to continue...'\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.6-0.6.7\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.8\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.7-0.6.8\")\n\t\t\t\tfi\t\t \n\t\t\t\tif [[ $version < \"v0.6.9\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.8-0.6.9\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v1.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.9-1.7\")\n\t\t\t\tfi\n\t\t\t\t# use for loop to read all values and indexes\n\t\t\t\tfor i in \"${upgrade[@]}\"\n\t\t\t\tdo\n\t\t\t\t\tif [ \"$(type -t ${i})\" = function ];\n\t\t\t\t\tthen\n\t\t\t\t\t\teval ${i}\n\t\t\t\t\tfi\n\t\t\t\t\tif [ -f \"$RESTYABOARD_DIR/sql/${i}.sql\" ];\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"Updating SQL...\"\n\t\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/${i}.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"PostgreSQL updation of SQL failed with error code ${error_code} (PostgreSQL updation of SQL failed with error code 33)\"\n\t\t\t\t\t\t\treturn 33\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tdone\n\t\t\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\tthen\t\t\t\t \n service nginx restart\n\t\t\t\t\tservice php${PHP_VERSION}-fpm restart\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\telse\n\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\tesac\n\t\t}\n\n\t\tif [ -f \"$DOWNLOAD_DIR/release\" ];\n\t\tthen\n\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\tif [[ $version < $RESTYABOARD_VERSION ]];\n\t\t\tthen\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\telse\n\t\t\t\techo \"No new version available\"\n\t\t\t\texit;\n\t\t\tfi\n\t\telse\n\t\t\tset +x\n\t\t\techo \"Is Restyaboard already installed and configured/working y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\tesac\n\t\tfi\n\n if ([ \"$OS_REQUIREMENT\" = \"Debian\" ])\n then\n sed -i -e 's/deb cdrom/#deb cdrom/g' /etc/apt/sources.list\n sh -c 'echo \"deb http://ftp.de.debian.org/debian jessie main\" > /etc/apt/sources.list.d/debjessie.list'\n apt install apt-transport-https lsb-release ca-certificates -y\n wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg\n echo \"deb https://packages.sury.org/php/ $(lsb_release -sc) main\" | tee /etc/apt/sources.list.d/php.list\n fi\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n apt install debian-keyring debian-archive-keyring -y\n apt update -y\n apt upgrade -y\n apt install python-software-properties -y\n apt install software-properties-common -y\n if ! hash php 2>&-; then\n add-apt-repository -y ppa:ondrej/php\n apt update -y\n apt install libjpeg8 -y --allow-unauthenticated\n fi\n fi\n install_nginx\n \n echo \"Checking PHP...\"\n install_php\n\n echo \"Setting up timezone...\"\n set_timezone\n \n echo \"Checking PostgreSQL...\"\n install_postgresql\n\n install_geoip\n \n echo \"Downloading Restyaboard script...\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\n apt install -y curl\n fi\n mkdir ${DOWNLOAD_DIR}\n curl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n unzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n rm /tmp/restyaboard.zip\n\n configure_restyaboard\n \n \n echo \"Copying Restyaboard script to root directory...\"\n cp -r ${DOWNLOAD_DIR}/* \"$RESTYABOARD_DIR\"\n \n install_postfix\n \n echo \"Changing permission...\"\n useradd restyaboard\n usermod --password 'hjVl2!rGd' restyaboard\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n user www-data;\n usermod -a -G restyaboard www-data\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n else\n user nginx;\n usermod -a -G restyaboard nginx\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n fi\n chown -R restyaboard:restyaboard $RESTYABOARD_DIR\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n chmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n change_permission\n\n psql_connect\n \n echo \"Changing PostgreSQL database name, user and password...\"\n sed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n \n echo \"Setting up cron for every 5 minutes..\"\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n else\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n fi\n php_fpm_reset\n \n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n service nginx restart\n service php7.4-fpm restart\n else\n if [ -f \"/bin/systemctl\" ]; then\n echo \"Starting services with systemd...\"\n systemctl restart nginx\n systemctl restart php-fpm\n else\n echo \"Starting services...\"\n /etc/init.d/php-fpm restart\n /etc/init.d/nginx restart\n fi\n fi\n set_db_connection\n\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\tthen\n\t\t\tssl_connectivity\n\t\telse\n\t\t\tssl_connectivity\n\t\tfi\n\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n\t\t\tsemanage permissive -a httpd_t\n\t\tfi\n\t\tset +x\n\t\techo \"Checking Hosting...\"\n\t\tresponse=$(curl -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2017-04-02 --write-out %{http_code} --connect-timeout 10 --max-time 10 --silent --output /dev/null)\n\t\t\n\t\tif [ -f /etc/ImageMagick-6/policy.xml ]; then\n \t\tsed -i -e 's///g' /etc/ImageMagick-6/policy.xml\n\t\tfi\n\n\t\tif [ -f /etc/ImageMagick/policy.xml ]; then\n\t\t\tsed -i -e 's///g' /etc/ImageMagick/policy.xml\n\t\tfi\n\n\t\tif [ ${response} -eq 200 ];then\n\t\t\techo \"Note: PHP Mailer will not work in Azure. Kindly use external SMTP mail server.\"\n\t\tfi\n\t\tset +x\n\t\tcurl -v -L -G -d \"app=board&os=${os}&version=${version}\" -k \"https://restya.com/success_installation.php\"\n\t\techo \"Restyaboard URL : $IPADDR\"\n\n\t\techo \"Login with username admin and password restya\"\n\t\texit 1\n\t}\n\tmain\n\terror=$?\n\tos=$(lsb_release -i -s)\n\tcurl -v -L -G -d \"app=board&os=${os}&error=${error}\" -k \"https://restya.com/error_installation.php\"\n\techo \"If you're finding it difficult to install Restyaboard from your end, we do also offer installation support that you may consider https://restya.com/contact\"\n\texit 1\n} 2>&1 | tee -a /tmp/restyaboard_install.log","user_defined_fields":[]},{"id":912264,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rocket.Chat One-Click","description":"Rocket.Chat One-Click","ordinal":92,"logo_url":"assets/rocketchat.svg","images":["linode/ubuntu20.04"],"deployments_total":1682,"deployments_active":85,"is_public":true,"mine":false,"created":"2021-09-29T17:16:16","updated":"2023-09-28T05:58:15","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nufw allow 3000\nfail2ban_install\n\n# Snapd & rocketchat install\napt install snapd -y\nsnap install rocketchat-server\nsnap info rocketchat-server\n\n# Check DNS\ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n# SSL\nsnap set rocketchat-server siteurl=https://$FQDN\nsystemctl enable --now snap.rocketchat-server.rocketchat-caddy \nsnap restart rocketchat-server\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA","default":""}]},{"id":609048,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ruby on Rails One-Click","description":"Ruby on Rails One-Click","ordinal":93,"logo_url":"assets/rubyonrails.svg","images":["linode/ubuntu20.04"],"deployments_total":447,"deployments_active":23,"is_public":true,"mine":false,"created":"2019-11-05T07:22:54","updated":"2023-09-23T13:55:54","rev_note":"Initial import","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Ruby on Rails\napt install -y ruby rails\n\n# Configure rails Directory\nmkdir /home/railsapp\ncd /home/railsapp\nrails new $RAILSAPP\ncd $RAILSAPP\nrails s -b 0.0.0.0 &\n\n# Start rails app on reboot\ncrontab -l | { cat; echo \"@reboot cd /home/railsapp/app1/ && rails s -b 0.0.0.0 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"railsapp","label":"Rails Application name","example":"railsapp"}]},{"id":401703,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rust One-Click","description":"Rust - Latest One-Click","ordinal":94,"logo_url":"assets/Rust.svg","images":["linode/ubuntu20.04"],"deployments_total":2395,"deployments_active":11,"is_public":true,"mine":false,"created":"2019-03-08T21:09:34","updated":"2023-09-27T02:44:40","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \nsource \n\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"rustserver\"\n\nset_hostname\napt_setup_update\n\n\nif [[ \"$RUSTHOSTNAME\" = \"\" ]]; then\n RUSTHOSTNAME=\"Linode Rust Server\"\nfi\n\nif [[ \"$LEVEL\" = \"Procedural Map\" ]]; then\n LEVEL=\"\"\nfi\n\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix curl \\\nwget file bzip2 gzip unzip bsdmainutils python \\\nutil-linux ca-certificates binutils bc jq tmux \\\nlib32gcc1 libstdc++6 libstdc++6:i386 lib32z1\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Rust\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\ncp /home/rustserver/lgsm/config-lgsm/rustserver/_default.cfg /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nchown -R rustserver:rustserver /home/rustserver/\n\necho \"server.globalchat $GLOBALCHAT/\" > /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.pve $PVE\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.description \\\"$DESCRIPTION\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.maxplayers $MAXPLAYERS\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.seed \\\"$SEED\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.level $LEVEL\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.hostname \\\"$RUSTHOSTNAME\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.ip $IP\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\nsed -i \"s/rconpassword=\\\"CHANGE_ME\\\"/rconpassword=\\\"$RCONPASSWORD\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/worldsize=\\\"3000\\\"/worldsize=\\\"$WORLDSIZE\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/maxplayers=\\\"50\\\"/maxplayers=\\\"$MAXPLAYERS\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\n\n\n# Start the service and setup firewall\nufw allow 28015\nufw allow 28016\n\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rusthostname","label":"Server Hostname","default":"Linode Rust Server"},{"name":"description","label":"Server Description","default":"Powered by Linode!"},{"name":"rconpassword","label":"RCON Password"},{"name":"maxplayers","label":"Maximum Players","oneof":"10,25,50,75,100","default":"50"},{"name":"level","label":"World","oneof":"Procedural Map,Barren,HapisIsland,SavasIsland_koth","default":"Procedural Map"},{"name":"worldsize","label":"World Size","oneof":"1000,3000,6000","default":"3000"},{"name":"seed","label":"Seed","default":"50000"},{"name":"globalchat","label":"Global Chat Enabled","oneof":"true,false","default":"true"},{"name":"pve","label":"PvE Enabled","oneof":"true,false","default":"false"}]},{"id":971042,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Saltcorn One-Click","description":"Saltcorn One-Click","ordinal":95,"logo_url":"assets/saltcorn.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":263,"deployments_active":15,"is_public":true,"mine":false,"created":"2022-02-08T16:21:05","updated":"2023-09-22T16:47:48","rev_note":"","script":"#!/bin/bash\n## Saltcorn Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction saltcorninstall {\n wget -qO - https://deb.nodesource.com/setup_14.x | sudo bash -\n apt-get install -qqy nodejs\n npx saltcorn-install -y\n systemctl enable saltcorn\n systemctl stop saltcorn\n cat < /lib/systemd/system/saltcorn.service\n[Unit]\nDescription=saltcorn\nDocumentation=https://saltcorn.com\nAfter=network.target\n\n[Service]\nType=notify\nWatchdogSec=5\nUser=saltcorn\nWorkingDirectory=/home/saltcorn\nExecStart=/home/saltcorn/.local/bin/saltcorn serve -p 8080\nRestart=always\nEnvironment=\"NODE_ENV=production\"\n\n[Install]\nWantedBy=multi-user.target\nEND\n systemctl daemon-reload\n systemctl start saltcorn\n}\n\nfunction firewallsaltcorn {\n ufw allow 22\n ufw allow 80\n ufw allow 443\n}\n\nfunction nginxreversesaltcorn {\n apt-get install nginx -y\n cat < /etc/nginx/conf.d/saltcorn.conf\nserver {\n listen 80;\n server_name $FQDN $IP;\n\n location / {\n proxy_set_header X-Forwarded-For \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:8080;\n }\n}\nEND\n nginx -t\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\n\nfunction ssl_saltcorn {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n saltcorninstall\n nginxreversesaltcorn\n firewallsaltcorn\n ssl_saltcorn\n\n}\n# Execute\nmain \nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for Letsencrypt SSL","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":774829,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ServerWand One-Click","description":"ServerWand One-Click","ordinal":96,"logo_url":"assets/serverwand.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":1034,"deployments_active":12,"is_public":true,"mine":false,"created":"2021-02-19T17:28:16","updated":"2023-09-28T19:11:10","rev_note":"","script":"#!/bin/bash\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# serverwand ssh key\nmkdir -p /root/.ssh/\nchmod 700 /root/.ssh/\ncurl https://serverwand.com/api/servers/connect > ~/.ssh/authorized_keys\nchmod 600 /root/.ssh/authorized_keys","user_defined_fields":[]},{"id":1177225,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Seatable One-Click","description":"Seatable One-Click App","ordinal":97,"logo_url":"assets/seatable.svg","images":["linode/debian11"],"deployments_total":42,"deployments_active":2,"is_public":true,"mine":false,"created":"2023-05-16T19:56:00","updated":"2023-09-27T23:58:51","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\nsource \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION \n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Update and basic installs\nsystem_update\ndebian_upgrade\nenable_fail2ban\nsystem_install_package ufw ca-certificates curl gnupg lsb-release curl pwgen\n\n# Install docker\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \\\n \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get -y update\napt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose\n\n# Pull current seatable container\ndocker pull seatable/seatable-enterprise:latest\nmkdir /opt/seatable\nwget -O \"/opt/seatable/docker-compose.yml\" \"https://manual.seatable.io/docker/Enterprise-Edition/docker-compose.yml\"\n\n# Prepare SeaTable\nMYSQL_PASSWORD=`pwgen -s 30 1`\nsed -i \"s|DB_ROOT_PASSWD=.*|DB_ROOT_PASSWD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|MYSQL_ROOT_PASSWORD=.*|MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_LETSENCRYPT=.*|SEATABLE_SERVER_LETSENCRYPT=${LE}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_HOSTNAME=.*|SEATABLE_SERVER_HOSTNAME=${URL}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|TIME_ZONE=.*|TIME_ZONE=${TIMEZONE}|\" /opt/seatable/docker-compose.yml\n\n# Add a license\nmkdir -p /opt/seatable/seatable-data/seatable\ntouch /opt/seatable/seatable-data/seatable/seatable-license.txt\ncat << EOF > /opt/seatable/seatable-data/seatable/seatable-license.txt\n#SeaTable server licence\nName = \"Cloud Trial\"\nLicencetype = \"User\"\nLicenceKEY = \"1672935702\"\nProductID = \"SeaTable server\"\nExpiration = \"2024-01-31\"\nMaxUsers = \"3\"\nMode = \"subscription\"\nHash = \"045af708265d7d549cad51fc2b678272a1d15ab8cbfbf05734e371504bb72b388f4441493c7bfeccce7c19ac9c6877cb8f3aecc3beebe685db007832e1c0231728a92772d45dc1c08facbc225d90776f86d34cb4154bafe7c983b6767ffb31a74b133de61edf15c170564fcefb6e457012f63b95ed4aaf6fd2e1e1cfc2ad93a682cfab2fe86f427f7d93ae9b69cbaf02a7565074a95a8c1176402f250d2e815ab206a6b65009c65d94259772ab31a00c11e5c6b57fda0fbb1b22a69734c10214594a5d7b4c88a995eaeb3a65f9aa5d163d9e5c09f73105a4ef760a8421fb66d1982da739c42808fded9a95e456090747e494b0a1aee2a40f388d9f1146051754\"\nEOF\n\n# firewall\nufw limit ssh\nufw allow 80\nufw allow 443\nufw --force enable\n\n# Message of the day\ncat << EOF > /etc/motd\n#############################\n#############################\nSeaTable Enterprise Server\n\nTo finish the installation, change to the directory /opt/seatable and follow our deployment instructions at https://manual.seatable.io/docker/Enterprise-Edition/Deploy%20SeaTable-EE%20with%20Docker/.\nYou can skip the beginning and start directly with the adjustment of the docker-compose.yml file.\n\nPlease visit https://forum.seatable.io for SeaTable community support.\n#############################\n#############################\n\nEOF\n\necho \"Installation complete\"\nall_set\nstackscript_cleanup","user_defined_fields":[{"name":"url","label":"The domain/subdomain for SeaTable Server","example":"https://seatable.example.org"},{"name":"le","label":"Get a Let's Encrypt certificate","default":"True","oneof":"True,False"},{"name":"timezone","label":"Choose your timezone (e.g Europe/Berlin)","example":"Choices can be found here: http://en.wikipedia.org/wiki/List_of_tz_zones_by_name","default":"Etc/UTC"}]},{"id":604068,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Shadowsocks One-Click","description":"Shadowsocks One-Click","ordinal":98,"logo_url":"assets/shadowsocks.svg","images":["linode/ubuntu20.04"],"deployments_total":8354,"deployments_active":154,"is_public":true,"mine":false,"created":"2019-10-22T16:11:39","updated":"2023-09-28T17:28:00","rev_note":"final edit","script":"#!/usr/bin/env bash\n\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Install & configure shadowsocks\nfunction install_shadowsocks {\n apt-get install shadowsocks-libev -y\n cat </etc/shadowsocks-libev/config.json\n{\n\"server\":\"$IP\",\n\"server_port\":8000,\n\"local_port\":1080,\n\"password\":\"$SHADOWPASSWORD\",\n\"timeout\":60,\n\"method\":\"aes-256-gcm\"\n}\nEND\n systemctl start shadowsocks-libev\n systemctl enable shadowsocks-libev\n systemctl restart shadowsocks-libev\n}\n\nfunction shadowsocks_firewall {\n ufw allow 8000\n}\n\nfunction main {\n install_shadowsocks\n shadowsocks_firewall\n stackscript_cleanup\n}\n\n# Execute function\nmain","user_defined_fields":[{"name":"shadowpassword","label":"Shadowsocks Password","example":"Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":869153,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Splunk One-Click","description":"Splunk One-Click","ordinal":99,"logo_url":"assets/splunk.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":864,"deployments_active":89,"is_public":true,"mine":false,"created":"2021-07-20T19:04:43","updated":"2023-09-28T18:59:51","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Splunk settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# Configure Splunk\nwget https://download.splunk.com/products/splunk/releases/8.2.0/linux/splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz\nwget \ntar zxvf splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz -C /opt/\nuseradd splunk --system --shell=/usr/sbin/nologin\nchown -R splunk:splunk /opt/splunk\n\napt install -y expect\n SPLUNK_INSTALL=$(expect -c \"\n set timeout 10\n spawn /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 1 --accept-license\n expect \\\"Please enter an administrator username:\\\"\n send \\\"$SPLUNK_USER\\r\\\"\n expect \\\"Please enter a new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect \\\"Please confirm new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect eof\n \")\n\n# Start daemon\nsystemctl start Splunkd\nsystemctl status Splunkd\n\n# Firewall\nufw allow 22 \nufw allow 8000\nufw allow 8089\nufw allow 9997\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"splunk_user","label":"Splunk Admin User"},{"name":"splunk_password","label":"Splunk Admin password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1","default":""},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd","default":""},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1102904,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Superinsight One-Click","description":"Superinsight One-Click app","ordinal":100,"logo_url":"assets/superinsight.svg","images":["linode/ubuntu22.04"],"deployments_total":22,"deployments_active":0,"is_public":true,"mine":false,"created":"2022-12-20T17:43:01","updated":"2023-08-28T19:43:49","rev_note":"","script":"#!/usr/bin/bash\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Install docker\ncurl -fsSL get.docker.com | sudo sh\n\n# Creating Password\necho \"Superinsight setting up password....\"\nADMIN_PASSWORD=$(openssl rand -hex 12)\nNODE_IP=$(hostname -I | cut -f1 -d' ')\necho \"Downloading and Installing Superinsight instance......\"\n\n# Install Superinsight\ndocker run \\\n--detach \\\n--name superinsight-db-standalone \\\n--restart always \\\n-p 5432:5432 \\\n-v vol-superinsight:/db \\\n-e SUPERINSIGHT_USER=admin \\\n-e SUPERINSIGHT_PASSWORD=\"${ADMIN_PASSWORD}\" \\\nsuperinsight/superinsight-db-standalone:latest\n\n\n# Print instructions\ncat << EOF > /etc/motd\n\n################################################################################################################################################\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSUPERINSIGHT\n################################################################################################################################################\n\nSuperinsight created the user admin with password: ${ADMIN_PASSWORD}\nYou can can connect using a database client with the following connection string postgres://admin:${ADMIN_PASSWORD}@${NODE_IP}:5432/superinsight\nFor complete source code and information, visit: https://github.com/superinsight/superinsight-db\n\n################################################################################################################################################\nEOF","user_defined_fields":[]},{"id":401705,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Terraria One-Click","description":"Terraria One-Click","ordinal":101,"logo_url":"assets/Terraria.svg","images":["linode/ubuntu20.04"],"deployments_total":690,"deployments_active":9,"is_public":true,"mine":false,"created":"2019-03-08T21:10:49","updated":"2023-09-17T05:06:59","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n\n#Game config options\n\n#\n#\n#\n#\n#\n#\n#\n\n\n#Non-MVP config options\n#name=\"autocreate\" label=\"autocreate\" default=\"1\"/>\n#name=\"worldpath\" label=\"worldpath\" default=\"~/.local/share/Terraria/Worlds/\"/>\n#name=\"banlist\" label=\"banlist\" default=\"banlist.txt\"/>\n#name=\"priority\" label=\"priority\" default=\"1\"/>\n#name=\"upnp\" label=\"upnp\" default=\"1\"/>\n#name=\"npcstream\" label=\"npcstream\" default=\"60\"/>\n#name=\"secure\" label=\"secure\" default=\"1\"/>\n#name=\"language\" label=\"language\" default=\"en-US\"/>\n\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\nGAMESERVER=\"terrariaserver\"\n\n### UDF to config\n\nif [[ \"$DIFFICULTY\" = \"Normal\" ]]; then\n DIFFICULTY=\"0\"\nelif [[ \"$DIFFICULTY\" = \"Expert\" ]]; then\n DIFFICULTY=\"1\"\nfi\n\nset_hostname\napt_setup_update\n\n\n# Terraria specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\necho Requires Steam username and password to install\nsu - $GAMESERVER -c \"mkdir -p /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER\"\nsu - $GAMESERVER -c \"touch /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steamuser=\\\"$STEAMUSER\\\" >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steampass=\\''$STEAMPASSWORD'\\' >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\n\n# Install Terraria\ngame_install\n\nsed -i s/#seed=AwesomeSeed/seed=\"$SEED\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/worldname=world1/worldname=\"$WORLDNAME\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/difficulty=0/difficulty=\"$DIFFICULTY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/maxplayers=20/maxplayers=\"$MAXPLAYERS\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/port=7777/port=\"$PORT\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/password=/password=\"$PASSWORD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/motd=.*/motd=\"$MOTD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n#Non-MVP config options\n# sed -i s/autocreate=1/autocreate=\"$AUTOCREATE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/worldpath=\\~\\/\\.local\\/share\\/Terraria\\/Worlds\\//worldpath=\"$WORLDPATH\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/banlist=banlist.txt/banlist=\"$BANLIST\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/\\#priority=1/priority=\"$PRIORITY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#npcstream=60/npcstream=\"$NPCSTREAM\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#upnp=1/upnp=\"$UPNP\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/secure=1/secure=\"$SECURE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/language=en\\-US/language=\"$LANGUAGE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n# Setup crons and create systemd service file\nservice_config\n\n# Start the service and setup firewall\nufw_install\nufw allow \"$PORT\"/tcp\nufw allow \"$PORT\"/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"steamuser","label":"Steam Username","example":"username"},{"name":"steampassword","label":"Steam Password, must have Steam Guard turned off for deployment","example":"YourSteamPassword"},{"name":"worldname","label":"World Name","default":"world1"},{"name":"password","label":"Server Password","default":""},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"difficulty","label":"Difficulty Level","oneof":"Normal,Expert","default":"Normal"},{"name":"maxplayers","label":"Maximum Players","oneof":"1,10,20,50,100,200,255,","default":"20"},{"name":"port","label":"Port","default":"7777"},{"name":"seed","label":"Seed","default":"AwesomeSeed"}]},{"id":401704,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"TF2 One-Click","description":"TF2 One-Click","ordinal":102,"logo_url":"assets/TF2.svg","images":["linode/debian11"],"deployments_total":342,"deployments_active":7,"is_public":true,"mine":false,"created":"2019-03-08T21:10:23","updated":"2023-09-28T15:35:11","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nGAMESERVER=\"tf2server\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\nif [[ \"$SERVERNAME\" = \"\" ]]; then\n SERVERNAME=\"Linode TF2 Server\"\nfi\n\n\n# Server config\nset_hostname\napt_setup_update\n\n\n# Teamfortress2 specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\napt -q -y install mailutils postfix curl wget file \\\nbzip2 gzip unzip bsdmainutils python util-linux \\\nca-certificates binutils bc jq tmux lib32gcc-s1 libstdc++6 \\\nlibstdc++6:i386 libcurl4-gnutls-dev:i386 libtcmalloc-minimal4:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Teamfortress2\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\ncp /home/tf2server/lgsm/config-lgsm/tf2server/_default.cfg /home/tf2server/lgsm/config-lgsm/tf2server/common.cfg\n\n# Custom game configs\n> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\ncat <> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile\nEND\n\necho \"hostname $SERVERNAME\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_maxrounds $MAXROUNDS\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_timelimit $TIMELIMIT\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"\\\"$MOTD\\\"\" > /home/tf2server/serverfiles/tf/cfg/motd_default.txt\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27014:27050/tcp\nufw allow 3478:4380/udp\nufw allow 27000:27030/udp\nufw allow 26901\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode TF2 Server"},{"name":"svpassword","label":"Server Password","default":""},{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,3,5,10,15,20","default":"5"},{"name":"timelimit","label":"Round Time Limit","oneof":"10,15,35,45,60","default":"35"},{"name":"rconpassword","label":"RCON password"}]},{"id":1051711,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UniFi Network Application One-Click","description":"UniFi Network Application One-Click","ordinal":103,"logo_url":"assets/unifi.svg","images":["linode/debian10"],"deployments_total":493,"deployments_active":27,"is_public":true,"mine":false,"created":"2022-09-01T15:41:39","updated":"2023-08-28T19:43:49","rev_note":"","script":"#!/bin/bash\n#\n# Script to install UniFi Controller on Linode\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n## install depends \nexport DEBIAN_FRONTEND=noninteractive\napt-get install apt-transport-https ca-certificates wget dirmngr gpg software-properties-common multiarch-support libcommons-daemon-java jsvc openjdk-11-jre-headless -y \n\n# install mongodb req libssl1\nwget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\ndpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\n\n# install mongodb-3.4\nwget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | apt-key add -\necho \"deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main\" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list\napt update && apt upgrade -y\napt install mongodb-org -y \n \n# install latest UniFi Controller \necho 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list\nsudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg \napt update && apt install unifi -yq \n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n location /wss/ {\n proxy_pass https://localhost:8443;\n proxy_http_version 1.1;\n proxy_buffering off;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"Upgrade\";\n proxy_read_timeout 86400;\n }\n location / {\n proxy_pass https://localhost:8443;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http\nufw allow https\nufw allow 53\nufw allow 3479/udp\nufw allow 5514/udp\nufw allow 8080/tcp\nufw allow 8443/tcp\nufw allow 8880/tcp\nufw allow 8843/tcp\nufw allow 27117/tcp\nufw allow 5656:5699/udp\nufw allow 10001/udp \nufw allow 1900/udp\nufw allow 123/udp\nufw enable \n\nsleep 60 \n\n## install SSL certs. required \napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n \n## add some details \ncat << EOF > /etc/motd\n###################\n\n The installation is now complete, and you can access the UniFi Network Controller GUI from https://${ABS_DOMAIN}\n We recommend using the GUI to complete your configurations of the service\n\n################### \nEOF\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970523,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Uptime Kuma One-Click","description":"Uptime Kuma One-Click","ordinal":104,"logo_url":"assets/uptimekuma.svg","images":["linode/ubuntu20.04"],"deployments_total":2097,"deployments_active":410,"is_public":true,"mine":false,"created":"2022-02-07T16:06:08","updated":"2023-09-28T18:25:58","rev_note":"","script":"#!/bin/bash\n## KUMA Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n## Linode Docker OCA\nsource \n\nfunction kumainstall {\ndocker volume create uptime-kuma\ndocker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1\n}\n\nfunction nginxreverse {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n server_name $FQDN;\n error_log /var/log/nginx/$FQDN.error;\n access_log /var/log/nginx/$FQDN.access;\n location / {\n proxy_pass http://localhost:3001;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n proxy_set_header Host \\$host;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n \n}\n\nfunction ssl_lemp {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n kumainstall\n firewall\n nginxreverse\n ssl_lemp\n}\n\n# Execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":925530,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UTunnel VPN One-Click","description":"UTunnel VPN One-Click","ordinal":105,"logo_url":"assets/utunnel.svg","images":["linode/ubuntu20.04"],"deployments_total":1102,"deployments_active":15,"is_public":true,"mine":false,"created":"2021-10-25T18:55:37","updated":"2023-09-27T14:49:08","rev_note":"","script":"#!/bin/bash\n# Update the packages on the system from the distribution repositories.\t\napt-get update\nDEBIAN_FRONTEND=noninteractive apt-get upgrade -y\n\n# Install pre-requisites for docker-ce\n\nDEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common\n\n#Add Docker official GPG key\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\n#Add repository\n\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n\n# Download and install utnservice\n\nmkdir /utunnel\n\ncd /utunnel \n\nwget https://files.utunnel.io/production/deploy/install_bundle_20.tar\n\ntar -xf install_bundle_20.tar\n\nrm -f install_bundle_20.tar","user_defined_fields":[]},{"id":781317,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Valheim One-Click","description":"Valheim One-Click","ordinal":106,"logo_url":"assets/valheim.svg","images":["linode/debian10"],"deployments_total":2375,"deployments_active":60,"is_public":true,"mine":false,"created":"2021-03-01T13:26:36","updated":"2023-09-27T22:38:06","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Valheim Server Settings - Required\n#\n#\n\n## Linode/SSH Security Settings - Required\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n\n# Download and install dependencies\ndpkg --add-architecture i386\nsystem_update\nsystem_install_package curl wget file tar expect bzip2 gzip unzip \\\n bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 \\\n libc6-dev libsdl2-2.0-0:i386\n\n\n# Open the needed firewall ports\nufw allow 2456:2458/udp\nufw allow 4380/udp\nufw allow 27000:27030/udp\n\n# Install linuxGSM\nGAMESERVER='vhserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Set the Valheim dedicated server's name and password\ncat /home/$USERNAME/lgsm/config-lgsm/vhserver/_default.cfg >> /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/servername=\\\"Valheim Server\\\"/servername=\\\"$SERVER_NAME\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/serverpassword=\\\"\\\"/serverpassword=\\\"$SERVER_PASSWORD\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\n\n# Start and enable the Valheim services\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"server_name","label":"The name of the Valheim dedicated server"},{"name":"server_password","label":"The password for the Valheim dedicated server","example":"S3cuReP@s$w0rd"},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":954759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VictoriaMetrics Single One-Click","description":"VictoriaMetrics Single","ordinal":107,"logo_url":"assets/victoriametricssingle.svg","images":["linode/ubuntu20.04"],"deployments_total":39,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-01-06T18:53:56","updated":"2023-09-06T10:14:27","rev_note":"","script":"#!/bin/bash\n# \nsource \nsystem_set_hostname \"$HOSTNAME\"\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=noninteractive\napt update && apt upgrade -y && apt install -y curl wget net-tools traceroute jq\n# Generate files\nmkdir -p /etc/victoriametrics/single\nmkdir -p /var/lib/victoria-metrics-data\nmkdir -p /var/lib/cloud/scripts/per-instance\n# Create victoriametrics user\ngroupadd -r victoriametrics\nuseradd -g victoriametrics -d /var/lib/victoria-metrics-data -s /sbin/nologin --system victoriametrics\nchown -R victoriametrics:victoriametrics /var/lib/victoria-metrics-data\n# Install VictoriaMetrics Single\nVM_VERSION=`curl -sg \"https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/tags\" | jq -r '.[0].name'`\nwget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/${VM_VERSION}/victoria-metrics-linux-amd64-${VM_VERSION}.tar.gz -O /tmp/victoria-metrics.tar.gz\ntar xvf /tmp/victoria-metrics.tar.gz -C /usr/bin\nchmod +x /usr/bin/victoria-metrics-prod\nchown root:root /usr/bin/victoria-metrics-prod\ntouch /etc/victoriametrics/single/scrape.yml\nchown root:root /etc/victoriametrics/single/scrape.yml\ncat </etc/systemd/system/vmsingle.service\n[Unit]\nDescription=VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database.\n# https://docs.victoriametrics.com\nAfter=network.target\n[Service]\nType=simple\nUser=victoriametrics\nGroup=victoriametrics\nWorkingDirectory=/var/lib/victoria-metrics-data\nStartLimitBurst=5\nStartLimitInterval=0\nRestart=on-failure\nRestartSec=5\nEnvironmentFile=-/etc/victoriametrics/single/victoriametrics.conf\nExecStart=/usr/bin/victoria-metrics-prod \\$ARGS\nExecStop=/bin/kill -s SIGTERM \\$MAINPID\nExecReload=/bin/kill -HUP \\$MAINPID\n# See docs https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#tuning\nProtectSystem=full\nLimitNOFILE=1048576\nLimitNPROC=1048576\nLimitCORE=infinity\nStandardOutput=syslog\nStandardError=syslog\nSyslogIdentifier=vmsingle\n[Install]\nWantedBy=multi-user.target\nEND\ncat </etc/victoriametrics/single/victoriametrics.conf\n# See https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#list-of-command-line-flags to get more information about supported command-line flags\n# \n# If you use IPv6 pleas add \"-enableTCP6\" to args line\nARGS=\"-promscrape.config=/etc/victoriametrics/single/scrape.yml -storageDataPath=/var/lib/victoria-metrics-data -retentionPeriod=12 -httpListenAddr=:8428 -graphiteListenAddr=:2003 -opentsdbListenAddr=:4242 -influxListenAddr=:8089 -enableTCP6\"\nEND\ncat < /etc/profile.d/victoriametrics_welcome.sh\n#!/bin/sh\n#\nmyip=$(hostname -I | awk '{print$1}')\n******************************************************************************** \nWelcome to VictoriaMetrics Single.\nTo keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH), 80 (HTTP), and 443 (HTTPS), 8428 (VictoriaMetrics HTTP), 8089 (VictoriaMetrics Influx),\n4242 (VictoriaMetrics OpenTSDB), 2003 (VictoriaMetrics Graphite)\nIn a web browser, you can view:\n * The VictoriaMetrics Quickstart guide: https://kutt.it/1click-quickstart\nOn the server:\n * The default VictoriaMetrics root is located at /var/lib/victoria-metrics-data\n * VictoriaMetrics is running on ports: 8428, 8089, 4242, 2003 and they are bound to the local interface.\n********************************************************************************\n # This image includes version v1.74.0 of VictoriaMetrics. \n # See Release notes https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.70.0\n # Welcome to VictoriaMetrics droplet!\n # Website: https://victoriametrics.com\n # Documentation: https://docs.victoriametrics.com\n # VictoriaMetrics Github : https://github.com/VictoriaMetrics/VictoriaMetrics\n # VictoriaMetrics Slack Community: https://slack.victoriametrics.com\n # VictoriaMetrics Telegram Community: https://t.me/VictoriaMetrics_en\n # VictoriaMetrics config: /etc/victoriametrics/single/victoriametrics.conf\n # VictoriaMetrics scrape config: /etc/victoriametrics/single/scrape.yml\n # VictoriaMetrics UI accessable on: http://your_droplet_public_ipv4:8428/vmui/\nEND\n# Enable UFW and add some rules to it\nsed -e 's|DEFAULT_FORWARD_POLICY=.*|DEFAULT_FORWARD_POLICY=\"ACCEPT\"|g' \\\n -i /etc/default/ufw\nufw allow ssh comment \"SSH port\"\nufw allow http comment \"HTTP port\"\nufw allow https comment \"HTTPS port\"\nufw allow 8428 comment \"VictoriaMetrics Single HTTP port\"\nufw allow 8089/tcp comment \"TCP Influx Listen port for VictoriaMetrics\"\nufw allow 8089/udp comment \"UDP Influx Listen port for VictoriaMetrics\"\nufw allow 2003/tcp comment \"TCP Graphite Listen port for VictoriaMetrics\"\nufw allow 2003/udp comment \"UDP Graphite Listen port for VictoriaMetrics\"\nufw allow 4242 comment \"OpenTSDB Listen port for VictoriaMetrics\"\nufw --force enable\n# Cleaning up\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n# Start VictoriaMetrics\nsystemctl enable vmsingle.service\nsystemctl start vmsingle.service\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]},{"id":662117,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Virtualmin One-Click","description":"Virtualmin One-Click","ordinal":108,"logo_url":"assets/virtualmin.svg","images":["linode/debian10","linode/ubuntu22.04"],"deployments_total":2131,"deployments_active":140,"is_public":true,"mine":false,"created":"2020-08-12T15:46:13","updated":"2023-09-27T21:48:03","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nIFS=$'\\n\\t'\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n# Import the OCA Helper Functions\nsource \n\nfunction install_virtualmin {\n if [ $(cat /etc/os-release | grep -i 'ubuntu' )]; then\n if [ ! $(cat /etc/os-release | grep -i 'lts') ]; then\n printf \"Virtualmin only works with LTS versions of Ubuntu\\n\"\n exit 1;\n fi\n else\n wget http://software.virtualmin.com/gpl/scripts/virtualmin-install.sh -O /root/virtualmin-install.sh && {\n chmod +x /root/virtualmin-install.sh\n /bin/sh /root/virtualmin-install.sh -f -v\n }\n fi\n}\n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Configure firewall and install Fail2Ban\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\nfail2ban_install\n\n# Install Webmin and Virtualmin\nsource \ninstall_virtualmin\n\n# Disable SSL so that everything works\nsed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n# Restart Webmin\nsystemctl restart webmin\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated intrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688903,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VS Code Server One-Click","description":"Visual Studio Code One-Click","ordinal":109,"logo_url":"assets/vscodeserver.svg","images":["linode/debian10"],"deployments_total":5033,"deployments_active":143,"is_public":true,"mine":false,"created":"2020-11-17T21:10:25","updated":"2023-09-28T18:32:36","rev_note":"","script":"#!/usr/bin/env bash\n\n## VS Code Server OCA Script\n\n### UDF Variables\n\n## VS Code Web Password\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n\nfunction get_code_server {\n local -r username=\"$1\" vs_code_ver=\"$2\"\n\n cd \"/home/$username\"\n\n wget \"https://github.com/cdr/code-server/releases/download/v${vs_code_ver}/code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n tar -xf \"code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n mv code-server-*/ bin/\n\n chown -R \"${username}:${username}\" bin/\n chmod +x bin/code-server\n mkdir data/\n chown -R \"${username}:${username}\" data/\n\n cd /root/\n}\n\nfunction enable_code_service {\n local -r vs_code_password=\"$1\" username=\"$2\"\n\n # Set the password in /etc/systemd/system/code-server.service\n cat << EOF > /etc/systemd/system/code-server.service\n[Unit]\nDescription=code-server\nAfter=nginx.service\n[Service]\nUser=$username\nWorkingDirectory=/home/$username\nEnvironment=PASSWORD=$vs_code_password\nExecStart=/home/${username}/bin/code-server --host 127.0.0.1 --user-data-dir /home/${username}/data --auth password\nRestart=always\n[Install]\nWantedBy=multi-user.target\nEOF\n\n # Enable code-server as a service\n systemctl daemon-reload\n systemctl start code-server\n systemctl enable code-server\n}\n\nfunction certbot_standalone {\n local -r email_address=\"$1\" ssl_domain=\"$2\"\n\n # Get an SSL certificate from CertBot\n system_install_package \"certbot\"\n certbot -n certonly --standalone --agree-tos -m \"$email_address\" -d \"$ssl_domain\"\n}\n\nfunction nginx_reverse_proxy {\n local -r ssl_domain=\"$1\"\n\n ## Setup a reverse proxy with Nginx\n system_install_package \"nginx\"\n\n cat << EOF > /etc/nginx/sites-available/code-server\nserver {\n listen 80;\n server_name $ssl_domain;\n # enforce https\n return 301 https://\\$server_name:443\\$request_uri;\n}\nserver {\n listen 443 ssl http2;\n server_name $ssl_domain;\n ssl_certificate /etc/letsencrypt/live/${ssl_domain}/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/${ssl_domain}/privkey.pem;\n location / {\n proxy_pass http://127.0.0.1:8080/;\n proxy_set_header Host \\$host;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection upgrade;\n proxy_set_header Accept-Encoding gzip;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-available/code-server /etc/nginx/sites-enabled\n nginx -t\n systemctl restart nginx\n}\n\n### Install UFW and open the needed firewall ports\nufw allow 80,443/tcp\n\n### Install and configure VS Code Server\nget_code_server \"$USERNAME\" \"$VS_CODE_VER\"\nenable_code_service \"$VS_CODE_PASSWORD\" \"$USERNAME\"\ncheck_dns_propagation \"$FQDN\" \"$IP\"\ncertbot_standalone \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\nnginx_reverse_proxy \"$FQDN\"\n\n### Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"vs_code_password","label":"The password to login to the VS Code Web UI"},{"name":"vs_code_ver","label":"The version of VS Code Server you'd like installed","default":"3.10.2"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"disable_root","label":"Would you like to disable root login over SSH? (Recommended)","oneof":"Yes,No","default":"Yes"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address for your VirtualHost configuration, DNS records (If Required), and SSL certificates (If Required)."},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above","oneof":"Yes,No","default":"No"}]},{"id":923037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WarpSpeed One-Click","description":"WarpSpeed One-Click","ordinal":110,"logo_url":"assets/warpspeed.svg","images":["linode/ubuntu20.04"],"deployments_total":831,"deployments_active":18,"is_public":true,"mine":false,"created":"2021-10-18T01:12:49","updated":"2023-09-28T06:11:39","rev_note":"","script":"#!/bin/bash\nset -o errexit\nset -o nounset\nset -o pipefail\nset -o xtrace\n\n# \n# \n# \n# \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=\"noninteractive\"\napt-get \\\n -o 'Acquire::ForceIPv4=true' \\\n --yes \\\n update\n\napt-get \\\n -o 'DPkg::options::=--force-confdef' \\\n -o 'DPkg::options::=--force-confold' \\\n --yes \\\n install grub-pc\n\napt-get \\\n -o Acquire::ForceIPv4=true \\\n --yes \\\n update\n# # END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Handle the arguments.\nWIRESPEED_ADMIN_EMAIL=\"$(echo -e \"${WIRESPEED_ADMIN_EMAIL}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"$(echo -e \"${WIRESPEED_HTTP_HOST}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//\\//}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//https:/}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//http:/}\"\n\nif [[ -z \"${WIRESPEED_ADMIN_EMAIL}\" ]]; then\n echo \"Missing required parameter: admin email\"\n exit 101\nfi\n\nif [[ -z \"${WIRESPEED_HTTP_HOST}\" ]]; then\n echo \"Missing required parameter: http host\"\n exit 102\nfi\n\nif [[ -z \"${WIRESPEED_DATA_DIR}\" ]]; then\n WIRESPEED_DATA_DIR=\"/wirespeed\"\nfi\n\n# Set hostname\nIP=\"$(hostname --all-ip-addresses | awk '{ print $1 }')\"\nhostnamectl set-hostname \"${WIRESPEED_HTTP_HOST}\"\necho \"${IP} ${WIRESPEED_HTTP_HOST}\" >>/etc/hosts\n\nwget https://bunker.services/wirespeed-installer.sh\nchmod +x wirespeed-installer.sh\n./wirespeed-installer.sh \\\n \"${WIRESPEED_HTTP_HOST}\" \\\n \"${WIRESPEED_DATA_DIR}\" \\\n \"${WIRESPEED_ADMIN_EMAIL}\" \\\n \"${WIRESPEED_ADMIN_PASSWORD}\" \\\n --non-interactive\n\n# Force IPv4 and noninteractive upgrade after script runs to prevent breaking nf_conntrack for UFW\necho 'Acquire::ForceIPv4 \"true\";' >/etc/apt/apt.conf.d/99force-ipv4\napt-get upgrade --yes\n\nfor file in /root/StackScript /root/ssinclude* /root/wirespeed-installer.sh; do\n rm \"${file}\"\ndone\n\necho 'WireSpeed Installation complete!'","user_defined_fields":[{"name":"wirespeed_admin_email","label":"Admin Email","default":"","example":"it@example.com"},{"name":"wirespeed_admin_password","label":"Admin Password","default":"","example":"Password"},{"name":"wirespeed_http_host","label":"DNS Name","default":"","example":"vpn.example.com"},{"name":"wirespeed_data_dir","label":"Data Directory","default":"/wirespeed","example":"/wirespeed"}]},{"id":913276,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Wazuh One-Click","description":"Wazuh One-Click","ordinal":111,"logo_url":"assets/wazuh.svg","images":["linode/ubuntu22.04"],"deployments_total":4001,"deployments_active":834,"is_public":true,"mine":false,"created":"2021-09-30T18:27:36","updated":"2023-09-28T18:03:46","rev_note":"","script":"#!/bin/bash\n\n# #\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings \n#\n#\n#\n\n## Enable logging\n# set -o pipefail\nset -x\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# UFW https://documentation.wazuh.com/current/getting-started/architecture.html\nufw allow 1514\nufw allow 1515\nufw allow 1516\nufw allow 514\nufw allow 55000\nufw allow 443\nufw allow 80\nufw allow 9200\nufw allow 9300\n\n# NGINX\napt install git nginx certbot python3-certbot-nginx -y\n\nmkdir -p /var/www/certs/.well-known\nchown -R www-data:www-data /var/www/certs/\ncat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\nln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\nunlink /etc/nginx/sites-enabled/default\nsystemctl restart nginx\n\n# SSL Certbot\n#certbot certonly --agree-tos --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n\nfunction get_cert {\n if [ \"$1\" == \"dry_run\" ]; then\n certbot certonly --dry-run --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n elif [ \"$1\" == \"run\" ]; then\n certbot certonly --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n fi\n}\n\nfunction propagate {\n while [[ $count -le $retries ]]; do\n echo \"[Info] Let's Encrypt validation failed. Retrying...\"\n sleep 5\n count=$(( $count + 1 ))\n get_cert dry_run\n\n if [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful..\"\n get_cert run\n return 0\n \n fi\n\n # no more retries left. Exit\n if [[ $count -eq $retries ]]; then\n echo \"[Error] Unable to get Let's Encrypt certificate for $FQDN\"\n return 1\n fi\n done\n}\n\ncount=1\nretries=24\nget_cert dry_run\nif [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful. Getting certificate\"\n get_cert run\nelse\n propagate\nfi\n\n# reorder Wazuh script\ncurl -sO https://packages.wazuh.com/4.4/wazuh-install.sh && sudo bash ./wazuh-install.sh -a \ntar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt >> .deployment-secrets.txt\n\n# Set Variables\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\n\n# Place certificates in /etc/wazuh-dashboard/certs/\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\n\n# Restart Kibana\nservice wazuh-dashboard restart\n\n# Create Cert renewal cron script\ncat </root/certbot-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & Kibana\n# Debug\n# set -xo pipefail\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\nservice wazuh-dashboard restart\nEND\n\nchmod +x /root/certbot-renewal.sh\n\n# Setup Cron\ncrontab -l > cron\necho \"* 1 * * 1 bash /root/certbot-renewal.sh\" >> cron\ncrontab cron\nrm cron\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":662116,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webmin One-Click","description":"Webmin One-Click","ordinal":112,"logo_url":"assets/webmin.svg","images":["linode/debian10"],"deployments_total":1153,"deployments_active":40,"is_public":true,"mine":false,"created":"2020-08-12T15:41:21","updated":"2023-09-28T14:43:08","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n#Check if the script is being sourced by another script\n[[ $_ != $0 ]] && readonly SOURCED=1\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction webmin_install {\n # Install webmin\n echo \"deb http://download.webmin.com/download/repository sarge contrib\" >> /etc/apt/sources.list\n wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add\n system_update\n system_install_package \"webmin\"\n}\n\nfunction webmin_configure {\n local -r email_address=\"$1\"\n local -r fqdn=\"$2\"\n\n # Configure the Virtual Host\n cat < /etc/apache2/sites-available/\"${fqdn}.conf\"\n\n ServerAdmin ${email_address}\n ServerName ${fqdn}\n ProxyPass / http://localhost:10000/\n ProxyPassReverse / http://localhost:10000/\n\nEOF\n # Disable SSL in Webmin so Apache can handle it instead\n sed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n # Add FQDN to the list of allowed domains\n echo \"referers=${fqdn}\" >> /etc/webmin/config\n\n # Restart Webmin\n systemctl restart webmin\n\n # Enable proxy_http module\n a2enmod proxy_http\n systemctl restart apache2\n\n # Enable the Virtual Host\n a2ensite \"${fqdn}\"\n systemctl reload apache2\n}\n\n\n# Open the needed firewall ports\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\n\n# Make sure unzip is installed, or else the webmin install will fail\n[ ! -x /usr/bin/unzip ] && system_install_package \"unzip\"\n\n# \"${package_list[@]}\" contains a list of packages to be installed on the system\npackage_list=(\n \"gnupg1\" \\\n \"python\" \\\n \"apt-show-versions\" \\\n \"libapt-pkg-perl\" \\\n \"libauthen-pam-perl\" \\\n \"libio-pty-perl\" \\\n \"libnet-ssleay-perl\"\n)\n\n# Install all of the packages specified in ${package_list[@]}\nsystem_install_package \"${package_list[@]}\"\n\n# Intall Webmin\nwebmin_install\napache_install\nwebmin_configure \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\n\n# Install SSL Certificate - NOT READY YET\n#certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n## Cleanup before exiting\nif [ \"$SOURCED\" -ne 1 ]; then\n stackscript_cleanup\nfi","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webuzo One-Click","description":"Webuzo One-Click","ordinal":113,"logo_url":"assets/webuzo.svg","images":["linode/ubuntu20.04"],"deployments_total":862,"deployments_active":21,"is_public":true,"mine":false,"created":"2020-11-17T21:04:21","updated":"2023-09-28T12:25:43","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library & Helpers\nsource \nsource \nsource \nsource \n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n# Install Prereq's & Services\napt install -y wget\nwget -N http://files.webuzo.com/install.sh\nchmod +x install.sh\n./install.sh\nsleep 2\nsystemctl start webuzo.service\n\n# firewall\nufw allow 25\nufw allow 53\nufw allow 587\nufw allow 2002\nufw allow 2003\nufw allow 2004\nufw allow 2005\n\n# Cleanup \nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":401706,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WireGuard® One-Click","description":"WireGuard One-Click","ordinal":114,"logo_url":"assets/Wireguard.svg","images":["linode/ubuntu22.04"],"deployments_total":8941,"deployments_active":282,"is_public":true,"mine":false,"created":"2019-03-08T21:11:36","updated":"2023-09-28T11:24:58","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n# \n\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### Set hostname, Apt configuration and update/upgrade\n\nset_hostname\napt_setup_update\n\napt install wireguard wireguard-tools linux-headers-$(uname -r) -y\n\nif [[ \"$PORT\" != \"51820\" ]]; then\n PORT=\"$PORT\"\nfi\n\n# Wireguard\n\nwg genkey | tee ~/wg-private.key | wg pubkey > ~/wg-public.key\n\nPRIVATEKEY=`cat ~/wg-private.key`\n\ncat </etc/wireguard/wg0.conf\n[Interface]\nPrivateKey = $PRIVATEKEY\nAddress = $PRIVATEIP\nListenPort = $PORT\nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -A FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -D FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\nSaveConfig = true\n[Peer]\nPublicKey = $PEERPUBKEY\nAllowedIPs = $PRIVATEIP_CLIENT\nEndpoint = $ENDPOINT:$PORT\nEND\n\n### Enable Port Forwarding\nsed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf\nsysctl -p /etc/sysctl.conf\nsysctl --system\n\n### Services\n\n# wg-quick up wg0. #### Removed to let systemctl manage the service\nsystemctl enable wg-quick@wg0\nsystemctl start wg-quick@wg0\nwg show\nufw_install\nufw allow \"$PORT\"/udp\nufw enable\n\nsystemctl restart wg-quick@wg0\n\nstackscript_cleanup","user_defined_fields":[{"name":"port","label":"Port","example":"51820","default":"51820"},{"name":"privateip","label":"Tunnel IP","example":"10.0.0.1/24, 172.16.0.1/24, 192.168.1.1/24, etc","default":"10.0.1.1/24"},{"name":"peerpubkey","label":"WireGuard Public Key (Client)","default":""},{"name":"privateip_client","label":"Tunnel IP (Client)","example":"10.0.0.2/24, 172.16.0.2/24, 192.168.1.2/24 etc","default":"10.0.1.2/24"},{"name":"endpoint","label":"Endpoint IP (Client)","default":""}]},{"id":401708,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WooCommerce One-Click","description":"WooCommerce One-Click","ordinal":115,"logo_url":"assets/WooCommerce.svg","images":["linode/ubuntu22.04"],"deployments_total":4186,"deployments_active":227,"is_public":true,"mine":false,"created":"2019-03-08T21:12:57","updated":"2023-09-25T21:09:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-woocommerce\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":741207,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Yacht One-Click","description":"Yacht One-Click","ordinal":116,"logo_url":"assets/yacht.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":930,"deployments_active":16,"is_public":true,"mine":false,"created":"2021-01-26T21:52:26","updated":"2023-09-27T18:53:10","rev_note":"","script":"#!/bin/bash\n#\n#\n#\n#\n\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n## Linode Docker OCA\nsource \n\nif [ \"$COMPOSE_SUPPORT\" == \"Yes\" ]; then\n mkdir -p /opt/Yacht/compose/example\n docker volume create yacht_data\n docker run -d \\\n --name=yacht \\\n -p 8000:8000 \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -v yacht_data:/config \\\n -v /opt/Yacht/compose:/compose \\\n -e COMPOSE_DIR=/compose/ \\\n -e THEME=$YACHT_THEME \\\n -e ADMIN_EMAIL=$YEMAIL \\\n -e ADMIN_PASSWORD=$YPASSWORD \\\n selfhostedpro/yacht:latest\n printf \"\\nThe default compose directory is /opt/Yacht/compose.\\nAn example project has been added there.\" > /etc/update-motd.d/99-yacht\n curl -L https://raw.githubusercontent.com/SelfhostedPro/selfhosted_templates/yacht/Template/Compose/example/docker-compose.yml -o /opt/Yacht/compose/example/docker-compose.yml\nelif [ \"$COMPOSE_SUPPORT\" == \"No\" ]; then\n docker volume create yacht\n docker run -d \\\n --name=yacht \\\n -p 8000:8000 \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -v yacht_data:/config \\\n -e THEME=$YACHT_THEME \\\n -e ADMIN_EMAIL=$YEMAIL \\\n -e ADMIN_PASSWORD=$YPASSWORD \\\n selfhostedpro/yacht:latest\n \nfi\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"YEMAIL","label":"Yacht Email","example":"admin@yacht.local","default":"admin@yacht.local"},{"name":"YPASSWORD","label":"Yacht Password","example":"Password"},{"name":"COMPOSE_SUPPORT","label":"Yacht Compose Support","example":"Yes","default":"Yes","oneof":"Yes,No"},{"name":"YACHT_THEME","label":"Yacht Theme","example":"Default","default":"Default","oneof":"Default,RED,OMV"}]},{"id":741208,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Zabbix One-Click","description":"Zabbix One-Click","ordinal":117,"logo_url":"assets/zabbix.svg","images":["linode/centos-stream8"],"deployments_total":1675,"deployments_active":79,"is_public":true,"mine":false,"created":"2021-01-26T21:56:54","updated":"2023-09-28T08:32:43","rev_note":"","script":"#!/bin/bash\n\n# \n\nsource \n\nsystem_set_hostname \"$HOSTNAME\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Generate files\nmkdir -p /etc/my.cnf.d/\nmkdir -p /etc/nginx/conf.d/\nmkdir -p /etc/php-fpm.d/\nmkdir -p /etc/php.d/\n# mkdir -p /etc/profile.d/\nmkdir -p /etc/motd.d/\nmkdir -p /etc/zabbix/web/\nmkdir -p /var/lib/cloud/scripts/per-instance\n\ncat </etc/my.cnf.d/zabbix.cnf\n[mysqld]\nuser = mysql\nlocal_infile = 0\n\ndatadir = /var/lib/mysql/\n\ndefault-storage-engine = InnoDB\nskip-name-resolve\nkey_buffer_size = 32M\nmax_allowed_packet = 128M\ntable_open_cache = 1024\ntable_definition_cache = 1024\nmax_connections = 2000\njoin_buffer_size = 1M\nsort_buffer_size = 2M\nread_buffer_size = 256K\nread_rnd_buffer_size = 256K\nmyisam_sort_buffer_size = 1M\nthread_cache_size = 512\nopen_files_limit = 10000\nwait_timeout = 86400\n\noptimizer_switch=index_condition_pushdown=off\n\ntmp_table_size = 32M\nmax_heap_table_size = 32M\n\nbinlog_format=mixed\nbinlog_cache_size = 32M\nmax_binlog_size = 256M\nbinlog_expire_logs_seconds = 259200\n\n# innodb_page_size = 32K\ninnodb_buffer_pool_size = 512M\ninnodb_log_file_size = 256M\ninnodb_log_buffer_size = 64M\ninnodb_file_per_table = 1\ninnodb_flush_method = O_DIRECT\ninnodb_buffer_pool_instances = 4\ninnodb_write_io_threads = 4\ninnodb_read_io_threads = 4\ninnodb_adaptive_flushing = 1\ninnodb_lock_wait_timeout = 50\n\ninnodb_flush_log_at_trx_commit = 1\n\ninnodb_io_capacity = 300\ninnodb_io_capacity_max = 400\ninnodb_flush_neighbors = 0\n\ninnodb_doublewrite = 1\ninnodb_thread_concurrency = 0\n\ninnodb_purge_threads = 1\n\nserver_id = 1\nbinlog_checksum = crc32\n\ninnodb_lru_scan_depth = 512\n\ninnodb_stats_on_metadata = 0\n\nEND\n\ncat </etc/nginx/conf.d/zabbix_ssl.conf\nserver {\n listen 0.0.0.0:443 ssl http2;\n # server_name ;\n index index.php;\n\n root \\$webroot;\n charset utf8;\n set \\$webroot '/usr/share/zabbix';\n\n access_log /var/log/nginx/zabbix_access_ssl.log main;\n error_log /var/log/nginx/zabbix_error_ssl.log error;\n\n ssl_stapling on;\n ssl_stapling_verify on;\n\n #resolver 192.168.13.160 192.168.10.24;\n\n ssl_certificate /etc/ssl/certs/zabbix_example.crt;\n ssl_certificate_key /etc/ssl/private/zabbix_example.key;\n\n ssl_dhparam /etc/ssl/private/zabbix_dhparam.pem;\n\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_verify_depth 3;\n #ssl_ciphers HIGH:!aNULL:!MD5;\n ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;\n #ssl_session_cache shared:SSL:10m;\n ssl_session_cache shared:MozSSL:10m;\n ssl_session_timeout 1d;\n ssl_prefer_server_ciphers off;\n ssl_session_tickets off;\n\n add_header Strict-Transport-Security \"max-age=63072000\" always;\n add_header Content-Security-Policy-Report-Only \"default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report\";\n\n location = /favicon.ico {\n log_not_found off;\n }\n\n location / {\n index index.php;\n try_files \\$uri \\$uri/ =404;\n }\n\n location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {\n access_log off;\n expires 10d;\n }\n\n location ~ /\\.ht {\n deny all;\n }\n\n location ~ /(api\\/|conf[^\\.]|include|locale) {\n deny all;\n return 404;\n }\n\n location ~ [^/]\\.php(/|$) {\n fastcgi_pass unix:/run/php-fpm/zabbix.sock;\n fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n fastcgi_index index.php;\n\n fastcgi_param DOCUMENT_ROOT /usr/share/zabbix;\n fastcgi_param SCRIPT_FILENAME /usr/share/zabbix\\$fastcgi_script_name;\n fastcgi_param PATH_TRANSLATED /usr/share/zabbix\\$fastcgi_script_name;\n\n include fastcgi_params;\n fastcgi_param QUERY_STRING \\$query_string;\n fastcgi_param REQUEST_METHOD \\$request_method;\n fastcgi_param CONTENT_TYPE \\$content_type;\n fastcgi_param CONTENT_LENGTH \\$content_length;\n\n fastcgi_intercept_errors on;\n fastcgi_ignore_client_abort off;\n fastcgi_connect_timeout 60;\n fastcgi_send_timeout 180;\n fastcgi_read_timeout 180;\n fastcgi_buffer_size 128k;\n fastcgi_buffers 4 256k;\n fastcgi_busy_buffers_size 256k;\n fastcgi_temp_file_write_size 256k;\n }\n}\n\nEND\n\ncat </etc/nginx/conf.d/zabbix.conf\nserver {\n listen 0.0.0.0:80;\n # server_name zabbix;\n\n return 301 https://\\$host\\$request_uri;\n}\n\nEND\n\ncat </etc/nginx/nginx.conf\n# For more information on configuration, see:\n# * Official English Documentation: http://nginx.org/en/docs/\n# * Official Russian Documentation: http://nginx.org/ru/docs/\n\nuser nginx;\nworker_processes auto;\nworker_priority -5;\nworker_rlimit_nofile 256000;\n\nerror_log /var/log/nginx/error.log;\n\npid /run/nginx.pid;\n\n# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.\ninclude /usr/share/nginx/modules/*.conf;\n\nevents {\n worker_connections 5120;\n use epoll;\n multi_accept on;\n}\n\n\nhttp {\n include /etc/nginx/mime.types;\n default_type application/octet-stream;\n\n log_format main\n '\\$http_x_forwarded_for - \\$remote_user [\\$time_local] '\n '\"\\$request\" \\$status \\$bytes_sent '\n '\"\\$http_referer\" \"\\$http_user_agent\" '\n '\"\\$gzip_ratio\"';\n\n access_log /var/log/nginx/access.log main;\n\n open_file_cache max=200000 inactive=20s;\n open_file_cache_valid 30s;\n open_file_cache_min_uses 2;\n open_file_cache_errors on;\n\n limit_conn_zone \\$binary_remote_addr zone=perip:10m;\n limit_conn_zone \\$server_name zone=perserver:10m;\n\n client_header_timeout 5m;\n client_body_timeout 5m;\n send_timeout 5m;\n\n connection_pool_size 4096;\n client_header_buffer_size 4k;\n large_client_header_buffers 4 4k;\n request_pool_size 4k;\n\n reset_timedout_connection on;\n\n\n gzip on;\n gzip_min_length 100;\n gzip_buffers 4 8k;\n gzip_comp_level 5;\n gzip_types text/plain text/css text/xml application/x-javascript application/xml application/xhtml+xml;\n\n types_hash_max_size 2048;\n\n output_buffers 128 512k;\n postpone_output 1460;\n aio on;\n directio 512;\n\n sendfile on;\n client_max_body_size 8m;\n fastcgi_intercept_errors on;\n\n tcp_nopush on;\n tcp_nodelay on;\n\n keepalive_timeout 75 20;\n\n ignore_invalid_headers on;\n\n index index.php;\n server_tokens off;\n\n # Load modular configuration files from the /etc/nginx/conf.d directory.\n # See http://nginx.org/en/docs/ngx_core_module.html#include\n # for more information.\n include /etc/nginx/conf.d/*.conf;\n}\n\nEND\n\ncat </etc/php-fpm.d/zabbix.conf\n[zabbix]\nuser = apache\ngroup = apache\n\nlisten = /run/php-fpm/zabbix.sock\nlisten.acl_users = apache,nginx\nlisten.allowed_clients = 127.0.0.1\n\npm = dynamic\npm.max_children = 50\npm.start_servers = 5\npm.min_spare_servers = 5\npm.max_spare_servers = 35\n\nphp_value[session.save_handler] = files\nphp_value[session.save_path] = /var/lib/php/session\n\nphp_value[max_execution_time] = 300\nphp_value[memory_limit] = 128M\nphp_value[post_max_size] = 16M\nphp_value[upload_max_filesize] = 2M\nphp_value[max_input_time] = 300\nphp_value[max_input_vars] = 10000\n; php_value[date.timezone] = Europe/Riga\nEND\n\n# cat </etc/php.d/99-zabbix.ini\n# max_execution_time=300\n# memory_limit=128M\n# post_max_size=16M\n# upload_max_filesize=2M\n# max_input_time=300\n# always_populate_raw_post_data=-1\n# max_input_vars=10000\n# date.timezone=UTC\n# session.save_path=/var/lib/php/\n# END\n\n# cat </etc/profile.d/zabbix_welcome.sh\n# #!/bin/sh\n# #\n# myip=\\$(hostname -I | awk '{print\\$1}')\n# cat </etc/motd.d/zabbix\n********************************************************************************\n\nZabbix frontend credentials:\n\nUsername: Admin\n\nPassword: replace_password\n\n\nTo learn about available professional services, including technical suppport and training, please visit https://www.zabbix.com/services\n\nOfficial Zabbix documentation available at https://www.zabbix.com/documentation/current/\n\n\n********************************************************************************\nEND\n\n# cat </etc/systemd/system/zabbix-instance-init.service\n# [Unit]\n# After=mariadb.service\n\n# [Service]\n# ExecStart=/var/lib/cloud/scripts/per-instance/001-zabbix\n\n# [Install]\n# WantedBy=multi-user.target\n# END\n\n# cat </etc/yum.repos.d/MariaDB.repo\n# # MariaDB 10.3 CentOS repository list - created 2019-03-28 10:57 UTC\n# # http://downloads.mariadb.org/mariadb/repositories/\n# [mariadb]\n# name = MariaDB\n# baseurl = http://yum.mariadb.org/10.2/centos7-amd64\n# gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB\n# gpgcheck=1\n# END\n\ncat </etc/yum.repos.d/Nginx.repo\n[nginx-stable]\nname=nginx stable repo\nbaseurl=http://nginx.org/packages/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=1\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\n\n[nginx-mainline]\nname=nginx mainline repo\nbaseurl=http://nginx.org/packages/mainline/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=0\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\nEND\n\ncat </etc/zabbix/web/zabbix.conf.php\n 'http://localhost:9200',\n//\t'text' => 'http://localhost:9200'\n//];\n// Value types stored in Elasticsearch.\n//\\$HISTORY['types'] = ['uint', 'text'];\n\n// Used for SAML authentication.\n// Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings.\n//\\$SSO['SP_KEY']\t\t\t= 'conf/certs/sp.key';\n//\\$SSO['SP_CERT']\t\t\t= 'conf/certs/sp.crt';\n//\\$SSO['IDP_CERT']\t\t= 'conf/certs/idp.crt';\n//\\$SSO['SETTINGS']\t\t= [];\nEND\n\ncat </tmp/zabbix_server_custom.te\nmodule zabbix_server_custom 1.2;\nrequire {\n type zabbix_var_run_t;\n type tmp_t;\n type zabbix_t;\n class sock_file { create unlink write };\n class unix_stream_socket connectto;\n class process setrlimit;\n class capability dac_override;\n}\n#============= zabbix_t ==============\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:process setrlimit;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:unix_stream_socket connectto;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t tmp_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t zabbix_var_run_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:capability dac_override;\nEND\n\n# Installing RPM packages\nyum makecache\nyum -y upgrade\nyum -y install wget\nwget https://dev.mysql.com/get/mysql80-community-release-el8-3.noarch.rpm\ndnf -y install mysql80-community-release-el8-3.noarch.rpm\ndnf -y module disable mysql\ndnf -y install https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm\ndnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\ndnf -y install epel-release\ndnf -y module enable php:remi-8.1\nyum -y install cloud-init cloud-utils-growpart firewalld nginx php-fpm mysql-community-client mysql-community-server java-1.8.0-openjdk-headless zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent zabbix-get zabbix-sender zabbix-java-gateway zabbix-js\n\n\n# Configure firewalld\nsystemctl enable firewalld\nsystemctl start firewalld\nfirewall-cmd --permanent --add-service=ssh --zone=public\nfirewall-cmd --permanent --add-service=http --zone=public\nfirewall-cmd --permanent --add-service=https --zone=public\nfirewall-cmd --permanent --add-port=10051/tcp --zone=public\nfirewall-cmd --reload\n\n# Configure SELinux\nrm -rf /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.pp\ncheckmodule -M -m -o /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.te\nsemodule_package -o /tmp/zabbix_server_custom.pp -m /tmp/zabbix_server_custom.mod\nsemodule -i /tmp/zabbix_server_custom.pp\n\nsetsebool -P httpd_can_connect_zabbix=1\nsetsebool -P zabbix_can_network=1\n\n# Generate SSL certificate\nmkdir -p /etc/ssl/private\nopenssl dhparam -out /etc/ssl/private/zabbix_dhparam.pem 2048\n\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/zabbix_example.key \\\n -out /etc/ssl/certs/zabbix_example.crt -subj \"/C=LV/ST=Riga/L=Riga/O=Global Security/OU=IT Department/CN=example.zabbix.com\"\n\n# Configure Zabbix instance\nsystemctl enable mysqld\nsystemctl disable nginx\nsystemctl disable php-fpm\nsystemctl disable zabbix-server\nsystemctl enable zabbix-agent\nsystemctl enable zabbix-java-gateway\n\nsystemctl stop nginx php-fpm\n\necho \"Requires=multi-user.target\" >> /usr/lib/systemd/system/cloud-init.target\n\nsystemctl set-default cloud-init.target\n\nchown -R apache:apache /var/lib/php/\n\nchmod g+r /etc/zabbix/zabbix_server.conf\nchmod o+w /run/zabbix/\n\nchmod 755 /etc/my.cnf\nchmod -R 755 /etc/my.cnf.d/\n\nsed -i 's/^#PrintMotd yes/&\\nPrintMotd no/g' /etc/ssh/sshd_config\n\nsed -i '/^; php_value\\[date.timezone\\] /s/^; //' /etc/php-fpm.d/zabbix.conf\n\nsed -i 's/^# JavaGateway=.*/&\\nJavaGateway=127.0.0.1/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# StartJavaPollers=.*/&\\nStartJavaPollers=5/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# LISTEN_IP=.*/&\\nLISTEN_IP=\"127.0.0.1\"/g' /etc/zabbix/zabbix_java_gateway.conf\n\nescape_spec_char() {\n local var_value=$1\n\n var_value=\"${var_value//\\\\/\\\\\\\\}\"\n var_value=\"${var_value//[$'\\n']/}\"\n var_value=\"${var_value//\\//\\\\/}\"\n var_value=\"${var_value//./\\\\.}\"\n var_value=\"${var_value//\\*/\\\\*}\"\n var_value=\"${var_value//^/\\\\^}\"\n var_value=\"${var_value//\\$/\\\\$}\"\n var_value=\"${var_value//\\&/\\\\&}\"\n var_value=\"${var_value//\\[/\\\\[}\"\n var_value=\"${var_value//\\]/\\\\]}\"\n\n echo \"$var_value\"\n}\n\nsystemctl start mysqld\nsystemctl enable mysqld\nsystemctl enable nginx\nsystemctl enable php-fpm\nsystemctl enable zabbix-server\n\nDB_ROOT_TMP_PASS=$(grep 'temporary password' /var/log/mysqld.log | awk '{print $13}' | tail -1)\nWEB_PASS=$(openssl rand -base64 14)\nWEB_PASS=${WEB_PASS%?}\nINST_NAME=$(hostname)\n\nrm -f /root/.my.cnf\n\nDB_ROOT_PASS=$(MYSQL_PWD=\"$DB_ROOT_TMP_PASS\" mysql --connect-expired-password -s -N -e \"SET PASSWORD FOR root@localhost TO RANDOM;\" | awk '{print $3}')\nDB_ZBX_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_srv'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\nDB_ZBXWEB_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_web'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"CREATE DATABASE zabbix CHARACTER SET 'utf8' COLLATE 'utf8_bin'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP, ALTER, INDEX, REFERENCES ON zabbix.* TO 'zabbix_srv'@'localhost'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP ON zabbix.* TO 'zabbix_web'@'localhost'\"\n\ncat > /root/.my.cnf << EOF\n[client]\npassword=\"$DB_ROOT_PASS\"\nEOF\n\nzcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -uroot zabbix\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"UPDATE users SET passwd = MD5('$WEB_PASS') WHERE username = 'Admin'\" zabbix\n\nWEB_PASS=$(escape_spec_char \"$WEB_PASS\")\nsed -i \"s/replace_password/$WEB_PASS/g\" /etc/motd.d/zabbix\n\nsed -i \"s/replace_name/$INST_NAME/g\" /etc/zabbix/web/zabbix.conf.php\n\nDB_ZBX_PASS=$(escape_spec_char \"$DB_ZBX_PASS\")\nDB_ZBXWEB_PASS=$(escape_spec_char \"$DB_ZBXWEB_PASS\")\n\nsed -i \"s/^DBUser=.*/DBUser=zabbix_srv/g\" /etc/zabbix/zabbix_server.conf\nsed -i -e \"/^[#;] DBPassword=/s/.*/&\\nDBPassword=$DB_ZBX_PASS/\" /etc/zabbix/zabbix_server.conf\nsed -i \"s/replace_password/$DB_ZBXWEB_PASS/g\" /etc/zabbix/web/zabbix.conf.php\nsed -i \"s/replace_user/zabbix_web/g\" /etc/zabbix/web/zabbix.conf.php\n\n# Cleaning up remote machine\nrm -rf /etc/nginx/conf.d/default.conf\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n\n\n\nsystemctl start zabbix-server zabbix-agent zabbix-java-gateway\nsystemctl start nginx php-fpm\n\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]}],"page":1,"pages":1,"results":123} \ No newline at end of file +{"data":[{"id":1146319,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster Null One-Click","description":"MongoDB Cluster Null One-Click\r\nNull stackscript for 1067004","ordinal":0,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":38,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-03-23T14:00:01","updated":"2023-10-18T12:38:31","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1146324,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster Null One-Click","description":"Galera Cluster Null One-Click\r\nNull Stackscript for 1088136","ordinal":0,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":125,"deployments_active":11,"is_public":true,"mine":false,"created":"2023-03-23T14:19:14","updated":"2023-11-14T15:36:53","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1146322,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster Null One-Click","description":"PostgreSQL Cluster Null One-Click\r\nNull Stackscript for 1068726","ordinal":0,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":139,"deployments_active":8,"is_public":true,"mine":false,"created":"2023-03-23T14:17:07","updated":"2023-11-15T07:10:17","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1142293,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Redis Sentinel Cluster Null One-Click","description":"Redis Sentinel Cluster Null One-Click\r\nNull stackscript for 1132204","ordinal":0,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":169,"deployments_active":10,"is_public":true,"mine":false,"created":"2023-03-16T14:20:59","updated":"2023-11-15T00:27:58","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1226546,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Null One-Click","description":"Nomad Cluster Null One-Click","ordinal":0,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":370,"deployments_active":12,"is_public":true,"mine":false,"created":"2023-08-25T19:08:21","updated":"2023-11-14T16:04:24","rev_note":"","script":"#!/bin/bash/","user_defined_fields":[]},{"id":1226547,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Clients Null One-Click","description":"Nomad Cluster Clients One-Click","ordinal":0,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":401,"deployments_active":23,"is_public":true,"mine":false,"created":"2023-08-25T19:08:57","updated":"2023-11-14T16:07:04","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":401697,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WordPress One-Click","description":"Wordpress One Click App","ordinal":1,"logo_url":"assets/WordPress.svg","images":["linode/ubuntu22.04"],"deployments_total":63490,"deployments_active":4892,"is_public":true,"mine":false,"created":"2019-03-08T21:04:07","updated":"2023-11-15T16:59:24","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-wordpress\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":632758,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Nextcloud One-Click","description":"One Click App - Nextcloud","ordinal":2,"logo_url":"assets/nextcloud.svg","images":["linode/ubuntu22.04"],"deployments_total":18851,"deployments_active":886,"is_public":true,"mine":false,"created":"2020-02-18T16:40:45","updated":"2023-11-15T15:39:42","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n\n# Install docker\ncurl -fsSL https://get.docker.com | sudo sh\n\n# Adjust permissions\nsudo mkdir -p /mnt/ncdata\nsudo chown -R 33:0 /mnt/ncdata\n\n# Install Nextcloud\nsudo docker run -d \\\n--init \\\n--name nextcloud-aio-mastercontainer \\\n--restart always \\\n-p 80:80 \\\n-p 8080:8080 \\\n-p 8443:8443 \\\n-e NEXTCLOUD_MOUNT=/mnt/ \\\n-e NEXTCLOUD_DATADIR=/mnt/ncdata \\\n--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \\\n--volume /var/run/docker.sock:/var/run/docker.sock:ro \\\nnextcloud/all-in-one:latest\n\n# Some Info\ncat << EOF > /etc/motd\n # # ###### # # ##### #### # #### # # #####\n ## # # # # # # # # # # # # # #\n # # # ##### ## # # # # # # # # #\n # # # # ## # # # # # # # # #\n # ## # # # # # # # # # # # # #\n # # ###### # # # #### ###### #### #### #####\nIf you point a domain to this server ($(hostname -I | cut -f1 -d' ')), you can open the admin interface at https://yourdomain.com:8443\nOtherwise you can open the admin interface at https://$(hostname -I | cut -f1 -d' '):8080\n \nFurther documentation is available here: https://github.com/nextcloud/all-in-one\nEOF\n\n# Install unattended upgrades\nsudo apt-get install unattended-upgrades -y\n\n# firewall\nufw allow 80\nufw allow 443\nufw allow 8080\nufw allow 8443\nufw allow 3478\n\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA email address","default":""}]},{"id":1017300,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kali Linux One-Click","description":"Kali Linux One-Click","ordinal":3,"logo_url":"assets/kalilinux.svg","images":["linode/kali"],"deployments_total":16461,"deployments_active":516,"is_public":true,"mine":false,"created":"2022-06-21T14:38:37","updated":"2023-11-15T15:08:45","rev_note":"","script":"#!/bin/bash\n## Kali\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction headlessoreverything {\n if [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"Yes\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $EVERYTHING == \"Yes\" ] && [ $HEADLESS == \"No\" ]; then\n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"No\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-headless -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"No\" ] && [ $EVERYTHING == \"No\" ]; then \n echo \"No Package Selected\"\n fi\n}\n\nfunction vncsetup {\n if [ $VNC == \"Yes\" ]; then \n ## XFCE & VNC Config\n apt-get install xfce4 xfce4-goodies dbus-x11 tigervnc-standalone-server expect -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n\n readonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\n sleep 2\n killvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\n kill $killvncprocess\n touch /etc/systemd/system/vncserver@.service\n cat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start vncserver@1.service\n systemctl enable vncserver@1.service\n\n cat < /etc/motd\n###################################\n# VNC SSH Tunnel Instructions #\n###################################\n\n* Ensure you have a VNC Client installed on your local machine\n* Run the command below to start the SSH tunnel for VNC \n\n ssh -L 61000:localhost:5901 -N -l $USERNAME $FQDN\n\n* For more Detailed documentation please visit the offical Documentation below\n\n https://www.linode.com/docs/products/tools/marketplace/guides/kalilinux\n\n### To remove this message, you can edit the /etc/motd file ###\nEOF\n fi\n}\n\nfunction main {\n headlessoreverything\n vncsetup\n stackscript_cleanup\n}\n\nmain","user_defined_fields":[{"name":"everything","label":"Would you like to Install the Kali Everything Package?","oneof":"Yes,No","default":"Yes"},{"name":"headless","label":"Would you like to Install the Kali Headless Package?","oneof":"Yes,No","default":"No"},{"name":"vnc","label":"Would you like to setup VNC to access Kali XFCE Desktop","oneof":"Yes,No","default":"Yes"},{"name":"username","label":"The VNC user to be created for the Linode. The username accepts only lowercase letters, numbers, dashes (-) and underscores (_)"},{"name":"password","label":"The password for the limited VNC user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA records (Requires API token)","default":""}]},{"id":593835,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plesk One-Click","description":"Plesk is the leading secure WordPress and website management platform. This Stackscript installs the latest publicly available Plesk, activates a trial license, installs essential extensions, and sets up and configures the firewall. Please allow the script around 15 minutes to finish.","ordinal":4,"logo_url":"assets/plesk.svg","images":["linode/centos7","linode/ubuntu20.04"],"deployments_total":10398,"deployments_active":475,"is_public":true,"mine":false,"created":"2019-09-26T17:34:17","updated":"2023-11-15T16:50:38","rev_note":"updated wording","script":"#!/bin/bash\n# This block defines the variables the user of the script needs to input\n# when deploying using this script.\n#\n## Enable logging\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction pleskautoinstall {\n echo \"Downloading Plesk Auto-Installer\"\n sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)\n echo \"turning on http2\"\n /usr/sbin/plesk bin http2_pref --enable\n}\n\nfunction firewall {\n echo \"Setting Firewall to allow proper ports.\"\n if [ \"${detected_distro[distro]}\" = 'centos' ]; then \n iptables -I INPUT -p tcp --dport 21 -j ACCEPT\n iptables -I INPUT -p tcp --dport 22 -j ACCEPT\n iptables -I INPUT -p tcp --dport 25 -j ACCEPT\n iptables -I INPUT -p tcp --dport 80 -j ACCEPT\n iptables -I INPUT -p tcp --dport 110 -j ACCEPT\n iptables -I INPUT -p tcp --dport 143 -j ACCEPT\n iptables -I INPUT -p tcp --dport 443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 465 -j ACCEPT\n iptables -I INPUT -p tcp --dport 993 -j ACCEPT\n iptables -I INPUT -p tcp --dport 995 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8447 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8880 -j ACCEPT\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n ufw allow 21\n ufw allow 22\n ufw allow 25\n ufw allow 80\n ufw allow 110\n ufw allow 143\n ufw allow 443\n ufw allow 465\n ufw allow 993\n ufw allow 995\n ufw allow 8443\n ufw allow 8447\n ufw allow 8880\nelse \necho \"Distro Not supported\"\nfi\n}\n\nfunction main {\n pleskautoinstall\n firewall\n}\n\n# Execute script\nsystem_update\nmain\nstackscript_cleanup","user_defined_fields":[]},{"id":595742,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"cPanel One-Click","description":"cPanel One-Click","ordinal":5,"logo_url":"assets/cpanel.svg","images":["linode/ubuntu20.04","linode/almalinux8","linode/rocky8"],"deployments_total":27794,"deployments_active":999,"is_public":true,"mine":false,"created":"2019-09-30T20:17:52","updated":"2023-11-15T15:51:58","rev_note":"","script":"#!/bin/bash\nset -e\n\n# Commit: fde6587e08ea95321ce010e52a9c1b8d02455a97\n# Commit date: 2023-02-13 17:00:46 -0600\n# Generated: 2023-02-17 11:00:28 -0600\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\necho $(date +%Y%m%d%H%M%S) >> /tmp/cpdebug.log\n\n# Linode's Weblish console will truncate lines unless you do this tput smam. This\n# instructs the terminal to wrap your lines, which is especially important so that\n# the WHM login URL that gets printed at the end can be copied.\ntput smam\n\nsource /etc/os-release\n\nis_os_and_version_id_prefix() {\n [[ $ID == $1 ]] && [[ $VERSION_ID =~ ^$2 ]]\n}\n\nis_almalinux8() {\n is_os_and_version_id_prefix almalinux 8\n}\n\nis_centos7() {\n is_os_and_version_id_prefix centos 7\n}\n\nis_cloudlinux7() {\n is_os_and_version_id_prefix cloudlinux 7\n}\n\nis_cloudlinux8() {\n is_os_and_version_id_prefix cloudlinux 8\n}\n\nis_rocky8() {\n is_os_and_version_id_prefix rocky 8\n}\n\nis_ubuntu20() {\n is_os_and_version_id_prefix ubuntu 20.04\n}\n\nis_supported_os() {\n is_almalinux8 || \\\n is_centos7 || \\\n is_cloudlinux7 || \\\n is_cloudlinux8 || \\\n is_rocky8 || \\\n is_ubuntu20\n}\n\nhas_yum() {\n which yum >/dev/null 2>&1\n}\n\nhas_dnf() {\n which dnf >/dev/null 2>&1\n}\n\nhas_apt() {\n which apt >/dev/null 2>&1\n}\n\nis_networkmanager_enabled() {\n systemctl is-enabled NetworkManager.service > /dev/null 2>&1\n}\n\n# cPanel & WHM is incompatible with NetworkManager\nif is_networkmanager_enabled; then\n systemctl stop NetworkManager.service\n systemctl disable NetworkManager.service\n if has_dnf; then\n dnf -y remove NetworkManager\n elif has_yum; then\n yum -y remove NetworkManager\n fi\nfi\n\nhostnamectl set-hostname server.hostname.tld\n\ncd /home && curl -so installer -L https://securedownloads.cpanel.net/latest\n\nif is_supported_os; then\n if is_ubuntu20; then\n apt-get -o Acquire::ForceIPv4=true update -y\n DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\n sh installer --skiplicensecheck --skip-cloudlinux\n else\n sh installer --skiplicensecheck\n fi\nelse\n echo \"Your distribution is not supported by this StackScript.\"\n install -d -v -m 711 /var/cpanel\n touch /var/cpanel/cpinit.failed\nfi\n\nrm -f /etc/cpupdate.conf\ncat > /root/.bash_profile <<'END_OF_BASH_PROFILE'\n# .bash_profile\n# Get the aliases and functions\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n# User specific environment and startup programs\nPATH=$PATH:$HOME/bin\nexport PATH\nbash /etc/motd.sh\nif [ -t 0 ]; then\n URL=`whmlogin --nowait 2> /dev/null`\n WHMLOGIN_RETURN=$?\n if [ $WHMLOGIN_RETURN == 1 ]; then\n # whmlogin doesn't support --nowait. Output a URL and hope it's accurate.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n whmlogin\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n if [ $WHMLOGIN_RETURN == 2 ]; then\n # whmlogin indicates that cpinit hasn't updated the IP/hostname yet.\n echo \"To log in to WHM as the root user, run the command 'whmlogin' to get a web address for your browser.\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n # whmlogin returned a valid URL to use.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n echo \"$URL\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n fi\n fi\nfi\nEND_OF_BASH_PROFILE\n\ncat > /etc/motd.sh <<'END_OF_MOTD'\n#!/bin/bash\nsource /etc/os-release\necho \"\n ____ _ ___ __ ___ _ __ __\n ___| _ \\ __ _ _ __ ___| | ( _ ) \\ \\ / / | | | \\/ |\n / __| |_) / _. | ._ \\ / _ \\ | / _ \\/\\ \\ \\ /\\ / /| |_| | |\\/| |\n| (__| __/ (_| | | | | __/ | | (_> < \\ V V / | _ | | | |\n \\___|_| \\__._|_| |_|\\___|_| \\___/\\/ \\_/\\_/ |_| |_|_| |_|\n\"\necho \"Welcome to cPanel & WHM `/usr/local/cpanel/cpanel -V`\"\necho \"\"\necho \"Running $PRETTY_NAME\"\necho \"\"\necho \"For our full cPanel & WHM documentation: https://go.cpanel.net/docs\"\necho \"\"\necho \"For information on how to quickly set up a website in cPanel & WHM: https://go.cpanel.net/buildasite\"\necho \"\" # This new line makes output from bash_profiles easier to read\nEND_OF_MOTD\ntouch /var/cpanel/cpinit.done","user_defined_fields":[]},{"id":691621,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Cloudron One-Click","description":"Cloudron One-Click","ordinal":6,"logo_url":"assets/cloudron.svg","images":["linode/ubuntu20.04"],"deployments_total":13614,"deployments_active":650,"is_public":true,"mine":false,"created":"2020-11-30T21:21:45","updated":"2023-11-15T16:00:29","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\nwget https://cloudron.io/cloudron-setup\nchmod +x cloudron-setup\n./cloudron-setup --provider linode-mp\n\necho All finished! Rebooting...\n(sleep 5; reboot) &","user_defined_fields":[]},{"id":692092,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Secure Your Server One-Click","description":"Secure Your Server One-Click","ordinal":7,"logo_url":"assets/secureyourserver.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":4486,"deployments_active":670,"is_public":true,"mine":false,"created":"2020-12-03T10:01:28","updated":"2023-11-15T16:35:34","rev_note":"","script":"#!/usr/bin/env bash\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n#\n\n## Block Storage\n#\n#\n\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source Linode Helpers\nsource \nsource \nsource \nsource \n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode. (lower case only)"},{"name":"password","label":"The password for the limited sudo user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode"},{"name":"disable_root","label":"Would you like to disable root login over SSH?","oneof":"Yes,No"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address. This is used for creating DNS records and website VirtualHost configuration.","default":""},{"name":"send_email","label":"Would you like to be able to send email from this domain? (Requires domain)","oneof":"Yes,No","default":"No"},{"name":"volume","label":"To use a Block Storage volume, enter its name here.","default":""},{"name":"volume_size","label":"If creating a new Block Storage volume, enter its size in GB (NOTE: This creates a billable resource at $0.10/month per GB).","default":""}]},{"id":925722,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pritunl One-Click","description":"Pritunl One-Click","ordinal":8,"logo_url":"assets/pritunl.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":1118,"deployments_active":91,"is_public":true,"mine":false,"created":"2021-10-26T15:23:37","updated":"2023-11-15T00:19:10","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nfail2ban_install\n\n# Mongo Install\napt-get install -y wget gnupg dirmngr \nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Pritunl\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv E162F504A20CDF15827F718D4B7C549A058F8B6B\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.pritunl.com/stable/apt buster main\" | tee /etc/apt/sources.list.d/pritunl.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb http://repo.pritunl.com/stable/apt focal main\" | tee /etc/apt/sources.list.d/pritunl.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\n\napt update -y\napt install -y pritunl\n\nsystemctl enable pritunl.service\nsystemctl start pritunl.service\n\n# Performance tune\necho \"* hard nofile 64000\" >> /etc/security/limits.conf\necho \"* soft nofile 64000\" >> /etc/security/limits.conf\necho \"root hard nofile 64000\" >> /etc/security/limits.conf\necho \"root soft nofile 64000\" >> /etc/security/limits.conf\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA record","default":""}]},{"id":741206,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CyberPanel One-Click","description":"CyberPanel One-Click","ordinal":9,"logo_url":"assets/cyberpanel.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":10875,"deployments_active":599,"is_public":true,"mine":false,"created":"2021-01-27T02:46:19","updated":"2023-11-15T16:58:47","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### Install cyberpanel\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/cybersetup.sh )\n\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401709,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Minecraft: Java Edition One-Click","description":"Minecraft OCA","ordinal":10,"logo_url":"assets/Minecraft.svg","images":["linode/ubuntu20.04"],"deployments_total":19879,"deployments_active":378,"is_public":true,"mine":false,"created":"2019-03-08T21:13:32","updated":"2023-11-15T17:06:16","rev_note":"remove maxplayers hard coded options [oca-707]","script":"#!/usr/bin/env bash\n# Game config options:\n# https://minecraft.gamepedia.com/Server.properties\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n## Linode/SSH Security Settings - Required\n#\n#\n## Linode/SSH Settings - Optional\n#\n#\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n# Difficulty\n[[ \"$DIFFICULTY\" = \"Peaceful\" ]] && DIFFICULTY=0\n[[ \"$DIFFICULTY\" = \"Easy\" ]] && DIFFICULTY=1\n[[ \"$DIFFICULTY\" = \"Normal\" ]] && DIFFICULTY=2\n[[ \"$DIFFICULTY\" = \"Hard\" ]] && DIFFICULTY=3\n\n# Gamemode\n[[ \"$GAMEMODE\" = \"Survival\" ]] && GAMEMODE=0\n[[ \"$GAMEMODE\" = \"Creative\" ]] && GAMEMODE=1\n[[ \"$GAMEMODE\" = \"Adventure\" ]] && GAMEMODE=2\n[[ \"$GAMEMODE\" = \"Spectator\" ]] && GAMEMODE=3\n\n# Player Idle Timeout\n[[ \"$PLAYERIDLETIMEOUT\" = \"Disabled\" ]] && PLAYERIDLETIMEOUT=0\n\n# Minecraft-specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\nsystem_install_package mailutils postfix curl netcat wget file bzip2 \\\n gzip unzip bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux openjdk-17-jre dirmngr software-properties-common\n\n# Install LinuxGSM and Minecraft and enable the 'mcserver' service\nreadonly GAMESERVER='mcserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Minecraft configurations\nsed -i s/server-ip=/server-ip=\"$IP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Customer config\nsed -i s/allow-flight=false/allow-flight=\"$ALLOWFLIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/allow-nether=true/allow-nether=\"$ALLOWNETHER\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/announce-player-achievements=true/announce-player-achievements=\"$ANNOUNCEPLAYERACHIEVEMENTS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/difficulty=1/difficulty=\"$DIFFICULTY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-command-block=false/enable-command-block=\"$ENABLECOMMANDBLOCK\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-query=true/enable-query=\"$ENABLEQUERY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/force-gamemode=false/force-gamemode=\"$FORCEGAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/gamemode=0/gamemode=\"$GAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/generate-structures=true/generate-structures=\"$GENERATESTRUCTURES\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/hardcore=false/hardcore=\"$HARDCORE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-name=world/level-name=\"$LEVELNAME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-seed=/level-seed=\"$LEVELSEED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-type=DEFAULT/level-type=\"$LEVELTYPE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-build-height=256/max-build-height=\"$MAXBUILDHEIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-players=20/max-players=\"$MAXPLAYERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-tick-time=60000/max-tick-time=\"$MAXTICKTIME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-world-size=29999984/max-world-size=\"$MAXWORLDSIZE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/motd=.*/motd=\"$MOTD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/network-compression-threshold=256/network-compression-threshold=\"$NETWORKCOMPRESSIONTHRESHOLD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/op-permission-level=4/op-permission-level=\"$OPPERMISSIONLEVEL\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/player-idle-timeout=0/player-idle-timeout=\"$PLAYERIDLETIMEOUT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/pvp=true/pvp=\"$PVP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/resource-pack-sha1=/resource-pack-sha1=\"$RESOURCEPACKSHA1\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/server-port=25565/server-port=\"$PORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/snooper-enabled=true/snooper-enabled=\"$SNOOPERENABLED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-animals=true/spawn-animals=\"$SPAWNANIMALS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-monsters=true/spawn-monsters=\"$SPAWNMONSTERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-npcs=true/spawn-npcs=\"$SPAWNNPCS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/use-native-transport=true/use-native-transport=\"$USENATIVETRANSPORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/view-distance=10/view-distance=\"$VIEWDISTANCE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/rcon.password=*/rcon.password=\"\\\"$RCONPASSWORD\\\"\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-rcon=false/enable-rcon=true/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Start the service and setup firewall\nufw allow \"$PORT\"\nufw allow \"25575\"\n\n# Start and enable the Minecraft service\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"levelname","label":"World Name","default":"world"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"allowflight","label":"Flight Enabled","oneof":"true,false","default":"false"},{"name":"allownether","label":"Nether World Enabled","oneof":"true,false","default":"true"},{"name":"announceplayerachievements","label":"Player Achievements Enabled","oneof":"true,false","default":"true"},{"name":"maxplayers","label":"Maximum Players","default":"25"},{"name":"playeridletimeout","label":"Player Idle Timeout Limit","oneof":"Disabled,15,30,45,60","default":"Disabled"},{"name":"difficulty","label":"Difficulty Level","oneof":"Peaceful,Easy,Normal,Hard","default":"Easy"},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"true,false","default":"false"},{"name":"pvp","label":"PvP Enabled","oneof":"true,false","default":"true"},{"name":"forcegamemode","label":"Force Game Mode Enabled","oneof":"true,false","default":"false"},{"name":"leveltype","label":"World Type","oneof":"DEFAULT,AMPLIFIED,FLAT,LEGACY","default":"DEFAULT"},{"name":"levelseed","label":"World Seed","default":""},{"name":"spawnanimals","label":"Spawn Animals Enabled","oneof":"true,false","default":"true"},{"name":"spawnmonsters","label":"Spawn Monsters Enabled","oneof":"true,false","default":"true"},{"name":"spawnnpcs","label":"Spawn NPCs Enabled","oneof":"true,false","default":"true"},{"name":"gamemode","label":"Game Mode","oneof":"Survival,Creative,Adventure,Spectator","default":"Survival"},{"name":"generatestructures","label":"Structure Generation Enabled","oneof":"true,false","default":"true"},{"name":"maxbuildheight","label":"Maximum Build Height","oneof":"50,100,200,256","default":"256"},{"name":"maxworldsize","label":"Maximum World Size","oneof":"100,1000,10000,100000,1000000,10000000,29999984","default":"29999984"},{"name":"viewdistance","label":"View Distance","oneof":"2,5,10,15,25,32","default":"10"},{"name":"enablecommandblock","label":"Command Block Enabled","oneof":"true,false","default":"false"},{"name":"enablequery","label":"Querying Enabled","oneof":"true,false","default":"true"},{"name":"enablercon","label":"Enable RCON","oneof":"true,false","default":"false"},{"name":"rconpassword","label":"RCON Password","default":""},{"name":"rconport","label":"RCON Port","default":"25575"},{"name":"maxticktime","label":"Maximum Tick Time","default":"60000"},{"name":"networkcompressionthreshold","label":"Network Compression Threshold","default":"256"},{"name":"oppermissionlevel","label":"Op-permission Level","oneof":"1,2,3,4","default":"4"},{"name":"port","label":"Port Number","default":"25565"},{"name":"snooperenabled","label":"Snooper Enabled","oneof":"true,false","default":"true"},{"name":"usenativetransport","label":"Use Native Transport Enabled","oneof":"true,false","default":"true"},{"name":"username","label":"The username for the Linode's non-root admin/SSH user(must be lowercase)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's non-root admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":869129,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"aaPanel One-Click","description":"aaPanel One-Click","ordinal":11,"logo_url":"assets/aapanel.svg","images":["linode/centos7"],"deployments_total":5188,"deployments_active":333,"is_public":true,"mine":false,"created":"2021-07-20T18:50:46","updated":"2023-11-15T17:00:19","rev_note":"","script":"#!/bin/bash\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Yum Update\nyum update -y\n\n# Install aapanel\nyum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && echo y|bash install.sh aapanel\n\n# Log aaPanel login information\nbt default > /root/.aapanel_info\n\n# Stackscript Cleanup\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[]},{"id":923033,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Akaunting One-Click","description":"Akaunting One-Click","ordinal":12,"logo_url":"assets/akaunting.svg","images":["linode/ubuntu22.04"],"deployments_total":614,"deployments_active":25,"is_public":true,"mine":false,"created":"2021-10-18T01:01:19","updated":"2023-11-15T15:48:30","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# \n# \n# \n# \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nDEBIAN_FRONTEND=noninteractive apt-get update -qq >/dev/null\n\n###########################################################\n# Install NGINX\n###########################################################\napt-get install -y nginx\n\ncat <<'END' >/var/www/html/index.html\n\n \n \n \n \n \n\n Installing Akaunting\n\n \n \n\n \n \n\n \n
\n
\n \n
\n\n
\n \n
\n
\n

Installing...

Get back after 3 minutes!

\n
\n
\n \n\nEND\n\nchown www-data:www-data /var/www/html/index.html\nchmod 644 /var/www/html/index.html\n\n###########################################################\n# MySQL\n###########################################################\napt install -y mariadb-server expect\n\nfunction mysql_secure_install {\n # $1 - required - Root password for the MySQL database\n [ ! -n \"$1\" ] && {\n printf \"mysql_secure_install() requires the MySQL database root password as its only argument\\n\"\n return 1;\n }\n local -r db_root_password=\"$1\"\n local -r secure_mysql=$(\nexpect -c \"\nset timeout 10\nspawn mysql_secure_installation\nexpect \\\"Enter current password for root (enter for none):\\\"\nsend \\\"$db_root_password\\r\\\"\nexpect \\\"Change the root password?\\\"\nsend \\\"n\\r\\\"\nexpect \\\"Remove anonymous users?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Disallow root login remotely?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Remove test database and access to it?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Reload privilege tables now?\\\"\nsend \\\"y\\r\\\"\nexpect eof\n\")\n printf \"$secure_mysql\\n\"\n}\n\n# Set DB root password\necho \"mysql-server mysql-server/root_password password ${DB_PASSWORD}\" | debconf-set-selections\necho \"mysql-server mysql-server/root_password_again password ${DB_PASSWORD}\" | debconf-set-selections\n\nmysql_secure_install \"$DB_PASSWORD\"\n\n# Create DB\necho \"CREATE DATABASE ${DB_NAME};\" | mysql -u root -p\"$DB_PASSWORD\"\n\n# create DB user with password\necho \"CREATE USER '$DBUSER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\" | mysql -u root -p\"$DB_PASSWORD\"\n\necho \"GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DBUSER'@'localhost';\" | mysql -u root -p\"$DB_PASSWORD\"\necho \"FLUSH PRIVILEGES;\" | mysql -u root -p\"$DB_PASSWORD\"\n\n\n###########################################################\n# Install PHP \n###########################################################\napt-get install -y zip unzip php-mbstring php-zip php-gd php-cli php-curl php-intl php-imap php-xml php-xsl php-tokenizer php-sqlite3 php-pgsql php-opcache php-simplexml php-fpm php-bcmath php-ctype php-json php-pdo php-mysql\n\n###########################################################\n# Akaunting\n###########################################################\nmkdir -p /var/www/akaunting \\\n && curl -Lo /tmp/akaunting.zip 'https://akaunting.com/download.php?version=latest&utm_source=linode&utm_campaign=developers' \\\n && unzip /tmp/akaunting.zip -d /var/www/html \\\n && rm -f /tmp/akaunting.zip\n\ncat </var/www/html/.env\nAPP_NAME=Akaunting\nAPP_ENV=production\nAPP_LOCALE=en-GB\nAPP_INSTALLED=false\nAPP_KEY=\nAPP_DEBUG=false\nAPP_SCHEDULE_TIME=\"09:00\"\nAPP_URL=\n\nDB_CONNECTION=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_DATABASE=${DB_NAME}\nDB_USERNAME=${DBUSER}\nDB_PASSWORD=${DBUSER_PASSWORD}\nDB_PREFIX=\n\nBROADCAST_DRIVER=log\nCACHE_DRIVER=file\nSESSION_DRIVER=file\nQUEUE_CONNECTION=sync\nLOG_CHANNEL=stack\n\nMAIL_MAILER=mail\nMAIL_HOST=localhost\nMAIL_PORT=2525\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_NAME=null\nMAIL_FROM_ADDRESS=null\n\nFIREWALL_ENABLED=false\nEND\n\ncd /var/www/html && php artisan key:generate\n\n# Install Akaunting\nphp /var/www/html/artisan install --db-host=\"localhost\" --db-name=\"$DB_NAME\" --db-username=\"$DBUSER\" --db-password=\"$DBUSER_PASSWORD\" --company-name=\"$COMPANY_NAME\" --company-email=\"$COMPANY_EMAIL\" --admin-email=\"$ADMIN_EMAIL\" --admin-password=\"$ADMIN_PASSWORD\"\n\n# Fix permissions\nchown -Rf www-data:www-data /var/www/html\nfind /var/www/html/ -type d -exec chmod 755 {} \\;\nfind /var/www/html/ -type f -exec chmod 644 {} \\;\n\n###########################################################\n# Configure NGINX\n###########################################################\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat << END > /etc/nginx/nginx.conf\n# Generic startup file.\nuser www-data;\n\n#usually equal to number of CPUs you have. run command \"grep processor /proc/cpuinfo | wc -l\" to find it\nworker_processes auto;\nworker_cpu_affinity auto;\n\nerror_log /var/log/nginx/error.log;\npid /var/run/nginx.pid;\n\n# Keeps the logs free of messages about not being able to bind().\n#daemon off;\n\nevents {\nworker_connections 1024;\n}\n\nhttp {\n# rewrite_log on;\n\ninclude mime.types;\ndefault_type application/octet-stream;\naccess_log /var/log/nginx/access.log;\nsendfile on;\n# tcp_nopush on;\nkeepalive_timeout 64;\n# tcp_nodelay on;\n# gzip on;\n #php max upload limit cannot be larger than this \nclient_max_body_size 13m;\nindex index.php index.html index.htm;\n\n# Upstream to abstract backend connection(s) for PHP.\nupstream php {\n #this should match value of \"listen\" directive in php-fpm pool\n server unix:/run/php/php$PHP_VERSION-fpm.sock;\n server 127.0.0.1:9000;\n}\n\nserver {\n listen 80 default_server;\n\n server_name _;\n\n root /var/www/html;\n\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Content-Type-Options \"nosniff\";\n\n index index.html index.htm index.php;\n\n charset utf-8;\n\n location / {\n try_files \\$uri \\$uri/ /index.php?\\$query_string;\n }\n\n # Prevent Direct Access To Protected Files\n location ~ \\.(env|log) {\n deny all;\n }\n\n # Prevent Direct Access To Protected Folders\n location ~ ^/(^app$|bootstrap|config|database|overrides|resources|routes|storage|tests|artisan) {\n deny all;\n }\n\n # Prevent Direct Access To modules/vendor Folders Except Assets\n location ~ ^/(modules|vendor)\\/(.*)\\.((?!ico|gif|jpg|jpeg|png|js\\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ {\n deny all;\n }\n\n error_page 404 /index.php;\n\n # Pass PHP Scripts To FastCGI Server\n location ~ \\.php$ {\n fastcgi_split_path_info ^(.+\\.php)(/.+)\\$;\n fastcgi_pass php;\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n include fastcgi_params;\n }\n\n location ~ /\\.(?!well-known).* {\n deny all;\n }\n}\n}\nEND\n\n# Remove installation screen\nrm -f /var/www/html/index.html\n\nservice nginx reload\n\n###########################################################\n# Firewall\n###########################################################\napt-get install ufw -y\nufw limit ssh\nufw allow http\nufw allow https\n\nufw --force enable\n\n###########################################################\n# Stackscript cleanup\n###########################################################\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"company_name","label":"Company Name","example":"My Company"},{"name":"company_email","label":"Company Email","example":"my@company.com"},{"name":"admin_email","label":"Admin Email","example":"my@company.com"},{"name":"admin_password","label":"Admin Password","example":"s3cur39a55w0r0"},{"name":"db_name","label":"MySQL Database Name","example":"akaunting"},{"name":"db_password","label":"MySQL root Password","example":"s3cur39a55w0r0"},{"name":"dbuser","label":"MySQL Username","example":"akaunting"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur39a55w0r0"}]},{"id":985374,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Enterprise Edition One-Click","description":"Ant Media Enterprise Edition One-Click","ordinal":13,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":1339,"deployments_active":66,"is_public":true,"mine":false,"created":"2022-03-08T17:39:39","updated":"2023-11-15T16:35:25","rev_note":"","script":"#!/usr/bin/env bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\nZIP_FILE=\"https://antmedia.io/linode/antmedia_2.5.3.zip\"\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":804144,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Community Edition One-Click","description":"Ant Media Server One-Click","ordinal":14,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":5493,"deployments_active":468,"is_public":true,"mine":false,"created":"2021-04-01T12:50:57","updated":"2023-11-15T01:26:23","rev_note":"","script":"#!/usr/bin/env bash \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nZIP_FILE=\"https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.5.3/ant-media-server-community-2.5.3.zip\"\n\n\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":1102900,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Apache Airflow One-Click","description":"Apache Airflow One-Click App","ordinal":15,"logo_url":"assets/apacheairflow.svg","images":["linode/ubuntu20.04"],"deployments_total":122,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-12-20T17:32:08","updated":"2023-11-14T13:59:17","rev_note":"","script":"#!/bin/bash\n#\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n# install depends\nexport DEBIAN_FRONTEND=noninteractive\nsudo apt update\n#sudo apt -y upgrade\nsudo apt install -y python3-pip\nsudo apt install -y build-essential libssl-dev libffi-dev python3-dev\nsudo apt install -y python3-venv # One of the Airflow examples requires virtual environments\n\nexport AIRFLOW_HOME=~/airflow\n\n# Install Airflow using the constraints file\nAIRFLOW_VERSION=2.4.1\nPYTHON_VERSION=\"$(python3 --version | cut -d \" \" -f 2 | cut -d \".\" -f 1-2)\"\n# For example: 3.7\nCONSTRAINT_URL=\"https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt\"\n# For example: https://raw.githubusercontent.com/apache/airflow/constraints-2.4.1/constraints-3.7.txt\npip install \"apache-airflow==${AIRFLOW_VERSION}\" --constraint \"${CONSTRAINT_URL}\"\n\n# The Standalone command will initialise the database, make a user,\n# and start all components for you.\nairflow standalone &\n\n###\n# \n# systemd unit file and per component settings go here\n# \n### \n\n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${DEFAULT_RDNS};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http \nufw allow https \nsystemctl enable ufw\n\nsleep 60 \n\n## install SSL certs. required \npip install pyOpenSSL --upgrade\napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n\n## write some login details\nexport ADMIN_PASS=$(cat /root/airflow/standalone_admin_password.txt)\ncat < /etc/motd \nThe installation of Apache Airflow is now complete, and the application is running in standalone mode.\n#\nYou can log into the Airflow GUI at ${ABS_DOMAIN}\nWith the credentials: \nUsername: admin\nPassword: ${ADMIN_PASS}\n#\nStandalone mode is not recommended for production.\nEND\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1160820,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Appwrite One-Click","description":"Appwrite One-Click ","ordinal":16,"logo_url":"assets/appwrite.svg","images":["linode/ubuntu22.04"],"deployments_total":163,"deployments_active":10,"is_public":true,"mine":false,"created":"2023-04-21T13:09:13","updated":"2023-11-13T02:19:43","rev_note":"","script":"#!/bin/bash\n### linode \n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nbash ./get-docker.sh\n\n# install haveged\nsudo apt-get install -y haveged\n\n# Install Appwrite\n# Grab latest version\nappversion=$(curl -s https://api.github.com/repos/appwrite/appwrite/releases/latest | grep -oP '\"tag_name\": \"\\K.*?(?=\")')\n\ndocker run --rm \\\n --volume /var/run/docker.sock:/var/run/docker.sock \\\n --volume \"$(pwd)\"/appwrite:/usr/src/code/appwrite:rw \\\n appwrite/appwrite:$appversion sh -c \"install --httpPort=80 --httpsPort=443 --interactive=N\"\n\necho \"Installation complete!\"","user_defined_fields":[]},{"id":401699,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ark One-Click","description":"Ark - Latest One-Click","ordinal":17,"logo_url":"assets/Ark@1x.svg","images":["linode/debian11"],"deployments_total":1136,"deployments_active":3,"is_public":true,"mine":false,"created":"2019-03-08T21:05:54","updated":"2023-11-04T22:04:25","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"arkserver\"\n\nset_hostname\napt_setup_update\n\n\n# ARK specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc-s1 libstdc++6 libstdc++6:i386 \n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install ARK\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\nsed -i s/XPMultiplier=.*/XPMultiplier=\"$XPMULTIPLIER\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPassword=.*/ServerPassword=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerHardcore=.*/ServerHardcore=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPVE=.*/ServerPVE=\"$SERVERPVE\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/Message=.*/Message=\"$MOTD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/SessionName=.*/SessionName=\"$SESSIONNAME\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerAdminPassword=.*/ServerAdminPassword=\"\\\"$RCONPASSWORD\\\"\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015/udp\nufw allow 7777:7778/udp\nufw allow 27020/tcp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rconpassword","label":"RCON password"},{"name":"sessionname","label":"Server Name","default":"Ark Server"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"serverpassword","label":"Server Password","default":""},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"True,False","default":"False"},{"name":"xpmultiplier","label":"XP Multiplier","oneof":"1,1.5,2,5,10,20","default":"2"},{"name":"serverpve","label":"Server PvE","oneof":"True,False","default":"False"}]},{"id":662118,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Azuracast One-Click","description":"AzuraCast One-Click","ordinal":18,"logo_url":"assets/azuracast.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":2652,"deployments_active":194,"is_public":true,"mine":false,"created":"2020-08-12T15:50:09","updated":"2023-11-15T07:42:13","rev_note":"","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, apt configuration and update/upgrade\nset_hostname\napt_setup_update\n\n# Install GIT\napt-get update && apt-get install -q -y git\n# Cloning AzuraCast and install\nmkdir -p /var/azuracast\ncd /var/azuracast\ncurl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh > docker.sh\nchmod a+x docker.sh\nyes 'Y' | ./docker.sh setup-release\nyes '' | ./docker.sh install\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":913277,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BeEF One-Click","description":"BeEF One-Click","ordinal":19,"logo_url":"assets/beef.svg","images":["linode/ubuntu22.04"],"deployments_total":30122,"deployments_active":1276,"is_public":true,"mine":false,"created":"2021-09-30T18:28:58","updated":"2023-11-15T16:32:47","rev_note":"","script":"#!/bin/bash\n#\n# Script to install BEEF on Linode\n# \n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \nbeef_config=\"/home/beef/config.yaml\"\nkey=\"privkey.pem\"\ncert=\"fullchain.pem\"\n# System Update\napt_setup_update\n# UFW\nufw allow 80\nufw allow 443\nufw allow 3000\nfunction configure_nginx {\n apt install git nginx ruby-dev -y\n # NGINX\n mkdir -p /var/www/certs/.well-known\n chown -R www-data:www-data /var/www/certs/\n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\nfunction configure_ssl {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\nfunction create_beef_user {\n function create_beef {\n groupadd --system beef\n useradd -s /sbin/nologin --system -g beef beef\n }\n grep beef /etc/passwd\n if [ $? -eq 1 ];then\n create_beef\n else\n echo \"[INFO] beef already on the system. Deleting user\"\n deluser --remove-home beef\n create_beef\n fi\n}\nfunction configure_beef {\n git clone https://github.com/beefproject/beef.git /home/beef\n chown -R beef: /home/beef\n cd /home/beef\n cp /etc/letsencrypt/live/$FQDN/$key .\n cp /etc/letsencrypt/live/$FQDN/$cert .\n # get line number to replace\n get_https_enable=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"enable:\" | awk -F \"-\" {'print $1'})\n get_https_public_enabled=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"public_enabled:\" | awk -F \"-\" {'print $1'})\n # replacing line numebr\n sed -i \"\"$get_https_enable\"s/enable: false/enable: true/\" $beef_config\n sed -i \"\"$get_https_public_enabled\"s/public_enabled: false/public_enabled: true/\" $beef_config\n sed -i \"/key:/c\\ key: \\\"$key\\\"\" $beef_config\n sed -i \"/cert:/c\\ cert: \\\"$cert\\\"\" $beef_config\n # creds\n #sed -i \"/user:/c\\ user: \\\"beef\\\"\" $beef_config\n sed -i \"/passwd:/c\\ passwd: \\\"$BEEFPASSWORD\\\"\" $beef_config\n # install local copy of beef\n # install deps\n apt install curl git build-essential openssl libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison nodejs libcurl4-openssl-dev ruby-dev -y\n su - -s /bin/bash beef\n bundle3.0 config set --local path /home/beef/.gem\n bundle3.0 install\n gem install --user-install xmlrpc\n \n}\nfunction beef_startup {\n cat < /home/beef/start_beef\n#!/bin/bash\nfunction start_beef {\n cd /home/beef\n echo no | ./beef\n}\nstart_beef\nEOF\n chown -R beef:beef /home/beef\n chmod +x /home/beef/start_beef\n}\n \nfunction beef_job {\n cat < /etc/systemd/system/beef.service\n[Unit]\nDescription=Browser Exploitation Framework\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=beef\nGroup=beef\nExecStart=/home/beef/start_beef\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start beef\n systemctl enable beef\n}\nfunction ssl_renew_cron {\n cat </root/certbot-beef-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & BeEf\n# Debug\n# set -xo pipefail\nexport BEEF_FULL=/home/beef/fullchain.pem\nexport BEEF_PRIVKEY=/home/beef/privkey.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat \\$FULLCHAIN > \\$BEEF_FULL\ncat \\$PRIVKEY > \\$BEEF_PRIVKEY\nservice beef reload\nEND\n chmod +x /root/certbot-beef-renewal.sh\n# Setup Cron\n crontab -l > cron\n echo \"* 1 * * 1 bash /root/certbot-beef-renewal.sh\" >> cron\n crontab cron\n rm cron\n}\nfunction install_complete {\n cat < /root/beef.info\n##############################\n# BEEF INSTALLATION COMPLETE #\n##############################\nEndpoint: https://$FQDN:3000/ui/panel\nCredentials can be found here:\n/home/beef/config.yaml\nHappy hunting!\nEOF\n}\nfunction main {\n create_beef_user\n configure_nginx\n configure_ssl\n configure_beef\n beef_startup\n beef_job\n ssl_renew_cron\n install_complete\n}\nmain\n# Clean up\nstackscript_cleanup\ncat /root/beef.info","user_defined_fields":[{"name":"beefpassword","label":"BEEF Password"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode. The username cannot contain any spaces or capitol letters. For this application the username 'beef' is reserved for the application, so please choose an alternative username for this deployment.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BitNinja One-Click","description":"BitNinja One-Click","ordinal":20,"logo_url":"assets/bitninja.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":34,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T01:03:02","updated":"2023-10-18T12:38:32","rev_note":"","script":"#!bin/bash\n\n# \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nwget -qO- https://get.bitninja.io/install.sh | /bin/bash -s - --license_key=\"$license_key\" -y","user_defined_fields":[{"name":"license_key","label":"License Key"}]},{"id":1037036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Budibase One-Click","description":"Budibase One Click App","ordinal":21,"logo_url":"assets/budibase.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":429,"deployments_active":25,"is_public":true,"mine":false,"created":"2022-08-02T18:42:41","updated":"2023-11-15T15:50:43","rev_note":"","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker.io\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Install Docker Compose\ncurl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\ndocker-compose --version\n\necho \"Creating passwords for /opt/budibase/.env\"\nVAR_JWT_SECRET=$(pwgen 16)\nVAR_MINIO_ACCESS_KEY=$(pwgen 16)\nVAR_MINIO_SECRET_KEY=$(pwgen 16)\nVAR_COUCH_DB_PASSWORD=$(pwgen 16)\nVAR_REDIS_PASSWORD=$(pwgen 16)\nVAR_INTERNAL_API_KEY=$(pwgen 16)\nIP=`hostname -I | awk '{print$1}'`\n\nmkdir -p /opt/budibase\ncd /opt/budibase\necho \"Fetch budibase docker compose file\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/docker-compose.yaml -o /opt/budibase/docker-compose.yml\necho \"Fetch budibase .env template\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/.env -o /opt/budibase/.env\necho \"Set passwords in /opt/budibase/.env\"\nsed -i \"s/JWT_SECRET=testsecret/JWT_SECRET=$VAR_JWT_SECRET/\" /opt/budibase/.env\nsed -i \"s/MINIO_ACCESS_KEY=budibase/MINIO_ACCESS_KEY=$VAR_MINIO_ACCESS_KEY/\" /opt/budibase/.env\nsed -i \"s/MINIO_SECRET_KEY=budibase/MINIO_SECRET_KEY=$VAR_MINIO_SECRET_KEY/\" /opt/budibase/.env\nsed -i \"s/COUCH_DB_PASSWORD=budibase/COUCH_DB_PASSWORD=$VAR_COUCH_DB_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/REDIS_PASSWORD=budibase/REDIS_PASSWORD=$VAR_REDIS_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/INTERNAL_API_KEY=budibase/INTERNAL_API_KEY=$VAR_INTERNAL_API_KEY/\" /opt/budibase/.env\nsed -i \"s/MAIN_PORT=10000/MAIN_PORT=$BBPORT/\" /opt/budibase/.env\ndocker-compose up -d\n\ncat </etc/profile.d/budibase_welcome.sh\n#!/bin/sh\n#\nIP=$(hostname -I | awk '{print$1}')\necho \"\n********************************************************************************\nWelcome to Budibase!\nTo help keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH) and the Web UI port $BBPORT.\n********************************************************************************\n # Budibase UI: http://$IP:$BBPORT/\n # Website: https://budibase.com\n # Documentation: https://docs.budibase.com\n # Github: https://github.com/Budibase/budibase\n # Community Support: https://github.com/Budibase/budibase/discussions\n # Restart Budibase: cd /opt/budibase; docker-compose down; docker-compose up -d\n # Budibase config: /etc/budibase/.env\n\"\nEND\nchmod +x /etc/profile.d/budibase_welcome.sh\n# Enable UFW and add some rules to it\nufw enable\nufw limit ssh/tcp comment 'Rate limit the SSH port'\nufw allow $BBPORT/tcp comment \"TCP Listen port for Budibase\"\nufw --force enable\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"BBPORT","label":"Budibase Port","example":"Default: 80","default":"80"}]},{"id":869155,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Chevereto One-Click","description":"Chevereto One-Click","ordinal":22,"logo_url":"assets/chevereto.svg","images":["linode/ubuntu20.04"],"deployments_total":236,"deployments_active":7,"is_public":true,"mine":false,"created":"2021-07-20T19:07:56","updated":"2023-10-30T19:52:12","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/chevereto/linode-marketplace\n\nset -e\n\nCHEVERETO_INSTALLER_TAG=\"3.1.0\"\nWORKING_DIR=\"/var/www/html\"\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php\napt install -y mysql-server\napt install -y php\napt install -y php-{common,cli,curl,fileinfo,gd,imagick,intl,json,mbstring,mysql,opcache,pdo,pdo-mysql,xml,xmlrpc,zip}\napt install -y python3-certbot-apache software-properties-common unzip\n\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\n\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Chevereto at http://\\$myip/installer.php\n * Secure your database by running:\n > mysql_secure_installation\n * Setup email delivery at http://\\$myip/dashboard/settings/email\nFor help and more information visit https://chevereto.com\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\n\ncat >/etc/cron.d/chevereto </etc/php/7.4/apache2/conf.d/chevereto.ini <>/var/log/per-instance.log\n\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\n\nCHEVERETO_DB_HOST=localhost\nCHEVERETO_DB_PORT=3306\nCHEVERETO_DB_NAME=chevereto\nCHEVERETO_DB_USER=chevereto\nCHEVERETO_DB_PASS=$(openssl rand -hex 16)\n\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\n\necho \"[OK] Chevereto Installer $CHEVERETO_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":869158,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ClusterControl One-Click","description":"ClusterControl One-Click","ordinal":23,"logo_url":"assets/clustercontrol.svg","images":["linode/ubuntu20.04"],"deployments_total":167,"deployments_active":4,"is_public":true,"mine":false,"created":"2021-07-20T19:13:44","updated":"2023-11-07T23:41:37","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Severalnines settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\nworkdir=/tmp\nIP=`hostname -I | awk '{print$1}'`\n# if command -v dig &>/dev/null; then\n# echo -e \"\\nDetermining network interfaces.\" \n# ext_ip=$(dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null)\n# [[ ! -z $ext_ip ]] && IP=${ext_ip}\n# fi\nlog_progress() {\n\n echo \"$1\" >> /root/cc_install.log\n}\n\ninstall_cc() {\n export HOME=/root\n export USER=root\n wget --no-check-certificate https://severalnines.com/downloads/cmon/install-cc\n chmod +x install-cc\n echo \"mysql cmon password = $CMONUSER_PASSWORD\" >> /root/.cc_passwords\n echo \"mysql root password = $DBROOT_PASSWORD\" >> /root/.cc_passwords\n SEND_DIAGNOSTICS=0 S9S_CMON_PASSWORD=$CMONUSER_PASSWORD S9S_ROOT_PASSWORD=$DBROOT_PASSWORD INNODB_BUFFER_POOL_SIZE=256 ./install-cc\n}\n\nfirstboot() {\n hostnamectl set-hostname clustercontrol\n\n ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N \"\"\n ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub\n SSH_KEY=$(cat /root/.ssh/id_rsa.pub)\n\n cat < /etc/update-motd.d/99-cc-motd \n#!/bin/sh\necho \"###\"\necho \"\"\necho \"Welcome to Severalnines Database Monitoring and Management Application - ClusterControl\"\necho \"Open your web browser to http://${IP}/clustercontrol to access ClusterControl's web application\"\necho \"\"\necho \"The public SSH key (root) is:\"\necho \"$SSH_KEY\"\necho \"\"\necho \"###\"\nEND\n\n chmod +x /etc/update-motd.d/99-cc-motd\n}\n\nenable_fw() {\n ufw default deny incoming\n ufw default allow outgoing\n ufw allow ssh\n ufw allow http\n ufw allow https\n ufw allow 9999\n ufw allow 9501\n}\n\ncleanup() {\n rm -rf /tmp/* /var/tmp/* /root/scripts\n history -c\n cat /dev/null > /root/.bash_history\n unset HISTFILE\n\n apt-get -y autoremove\n apt-get -y autoclean\n\n cat /dev/null > /var/log/lastlog; cat /dev/null > /var/log/wtmp; cat /dev/null > /var/log/auth.log\n\n ufw enable\n ufw status\n\n touch /.cc-provisioned\n}\n\nlog_progress \"** Installing ClusterControl, this could take several minutes. Please wait ...\"\ninstall_cc\nlog_progress \"** Setting motd ...\"\nfirstboot\nlog_progress \"** Enabling firewall ...\"\nenable_fw\nif [[ \"$SSL\" == \"Yes\" ]]; then\n log_progress \"** Enabling Let's Encrypt SSL ...\"\n python --version | grep -q 3.\n [[ $? -eq 0 ]] && PYTHON3=1\n if [[ -n $PYTHON3 ]]; then\n apt install -y certbot python3-certbot-apache\n else\n apt install -y certbot python-certbot-apache\n fi\n\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\ncleanup\n\n# Clean up\nlog_progress \"** Stackscript cleanup please wait ...\"\nstackscript_cleanup\n\nlog_progress \"** Installation successful...\"\n/etc/update-motd.d/99-cc-motd | tee -a /root/cc_install.log\n\nsystemctl restart sshd","user_defined_fields":[{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"cmonuser_password","label":"CMON user password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above)","oneof":"Yes,No","default":"Yes"}]},{"id":401700,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CS:GO One-Click","description":"CS:GO - Latest One-Click","ordinal":24,"logo_url":"assets/CSGO2.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":2142,"deployments_active":9,"is_public":true,"mine":false,"created":"2019-03-08T21:06:26","updated":"2023-11-02T20:39:58","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"csgoserver\"\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\n#Buyanywhere\nif [[ \"$BUYANYWHERE\" = \"Enabled\" ]]; then\n BUYANYWHERE=1\nelif [[ \"$BUYANYWHERE\" = \"Disabled\" ]]; then\n BUYANYWHERE=0\nelif [[ \"$BUYANYWHERE\" = \"Terrorists Only\" ]]; then\n BUYANYWHERE=2\nelif [[ \"$BUYANYWHERE\" = \"Counter-Terrorists Only\" ]]; then\n BUYANYWHERE=3\nfi\n\n#friendlyfire\n\nif [[ \"$FRIENDLYFIRE\" = \"Enabled\" ]]; then\n FRIENDLYFIRE=1\nelif [[ \"$FRIENDLYFIRE\" = \"Disabled\" ]]; then\n FRIENDLYFIRE=0\nfi\n\nset_hostname\napt_setup_update\n\n\n# CSGO specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install CSGO\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\n> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\n\ncat <> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsv_contact \"\"\nsv_lan 0\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile 0\nsv_hibernate_when_empty 1\nsv_hibernate_ms 5\nhost_name_store 1\nhost_info_show 1\nhost_players_show 2\nexec banned_user.cfg\nexec banned_ip.cfg\nwriteid\nwriteip\nEND\n\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"hostname $SERVERNAME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_roundtime $ROUNDTIME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsed -i s/mp_buy_anywhere.*/mp_buy_anywhere\\ \"$BUYANYWHERE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_maxrounds.*/mp_maxrounds\\ \"$MAXROUNDS\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_friendlyfire.*/mp_friendlyfire\\ \"$FRIENDLYFIRE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"$MOTD\" > /home/csgoserver/serverfiles/csgo/motd.txt\n\n\nif [[ \"$FRIENDLYFIRE\" = \"1\" ]]; then\nsed -i s/ff_damage_reduction_bullets.*/ff_damage_reduction_bullets\\ 0\\.85/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade.*/ff_damage_reduction_gernade\\ 0\\.33/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade_self.*/ff_damage_reduction_gernade_self\\ 0\\.4/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_other.*/ff_damage_reduction_other\\ 1/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"sv_kick_ban_duration 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_disable_autokick 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nfi\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015\nufw allow 27020/udp\nufw allow 27005/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server."},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode CS:GO Server"},{"name":"rconpassword","label":"RCON password"},{"name":"svpassword","label":"CSGO server password","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"roundtime","label":"Round Time Limit","oneof":"5,10,15,20,60","default":"5"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,5,10,15,20","default":"10"},{"name":"buyanywhere","label":"Buy Anywhere ","oneof":"Disabled,Enabled,Counter-Terrorists Only, Terrorists Only","default":"Disabled"},{"name":"friendlyfire","label":"Friendly Fire Enabled","oneof":"Enabled,Disabled","default":"Disabled"}]},{"id":688891,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Discourse One-Click","description":"Discourse One-Click","ordinal":25,"logo_url":"assets/discourse.svg","images":["linode/ubuntu20.04"],"deployments_total":1201,"deployments_active":63,"is_public":true,"mine":false,"created":"2020-11-17T20:55:26","updated":"2023-11-09T09:20:03","rev_note":"","script":"#!/bin/bash\n\n## Discourse Settings\n\n#\n#\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n#Install dependencies needed for Discourse\napt install git apt-transport-https ca-certificates curl software-properties-common net-tools -y\n\n#Clone Discourse Docker repo for install and management\ngit clone https://github.com/discourse/discourse_docker.git /var/discourse\n#UFW Firewall Rules\nufw allow http\nufw allow https\nufw allow 25\nufw allow 465\nufw allow 587\nufw enable <\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Python & Django\napt-get install -y python3 python3-pip\npip3 install Django\n\n# Create & Setup Django APP\nmkdir /var/www/\ncd /var/www/\ndjango-admin startproject DjangoApp\ncd DjangoApp\npython3 manage.py migrate\necho \"from django.contrib.auth.models import User; User.objects.create_superuser('$DJANGOUSER', '$DJANGOUSEREMAIL', '$DJANGOUSERPASSWORD')\" | python3 manage.py shell\nsed -i \"s/ALLOWED_HOSTS = \\[\\]/ALLOWED_HOSTS = \\['$IP'\\]/g\" DjangoApp/settings.py\npython3 manage.py runserver 0.0.0.0:8000 &\n\n# Start Django app on reboot\ncrontab -l | { cat; echo \"@reboot cd /var/www/DjangoApp && python3 manage.py runserver 0.0.0.0:8000 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"djangouser","label":"Django USER","example":"user1"},{"name":"djangouserpassword","label":"Django Password","example":"s3cure_p4ssw0rd"},{"name":"djangouseremail","label":"Django USER email","example":"user@email.tld"}]},{"id":607433,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Docker One-Click","description":"Docker One Click App","ordinal":27,"logo_url":"assets/docker.svg","images":["linode/ubuntu22.04"],"deployments_total":35398,"deployments_active":1859,"is_public":true,"mine":false,"created":"2019-10-31T20:14:04","updated":"2023-11-15T15:53:47","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Docker Settings\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-docker\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":401698,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Drupal One-Click","description":"Drupal One-Click","ordinal":28,"logo_url":"assets/Drupal.svg","images":["linode/ubuntu22.04"],"deployments_total":1833,"deployments_active":79,"is_public":true,"mine":false,"created":"2019-03-08T21:04:47","updated":"2023-11-11T15:56:18","rev_note":"","script":"#!/usr/bin/env bash\n## Drupal Settings\n# \n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, apt configuration and update/upgrade\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Install/configure UFW\nufw allow http\nufw allow https\n\n# Install/configure MySQL\napt-get install mariadb-server -y\nsystemctl start mariadb\nsystemctl enable mariadb\nmysql_root_preinstall\nrun_mysql_secure_installation\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE drupaldb\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT ALL ON drupaldb.* TO 'drupal'@'localhost' IDENTIFIED BY '$DB_PASSWORD'\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\n# Install & Configure Apache\napt-get install -y apache2\ntouch /var/log/apache2/drupal-error_log /var/log/apache2/drupal-access_log\ncp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/drupal.conf\ncat < /etc/apache2/sites-available/drupal.conf\n\n DocumentRoot /var/www/drupal\n ServerName $FQDN\n ServerAlias www.$FQDN\n \n Options FollowSymLinks\n AllowOverride All\n Order allow,deny\n allow from all\n RewriteEngine on\n RewriteBase /\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteCond %{REQUEST_URI} !=/favicon.ico\n RewriteRule ^ index.php [L]\n\n ErrorLog /var/log/apache2/drupal-error_log\n CustomLog /var/log/apache2/drupal-access_log common\n\nEND\na2enmod rewrite\na2dissite 000-default.conf\na2ensite drupal.conf\nsed -ie \"s/KeepAlive Off/KeepAlive On/g\" /etc/apache2/apache2.conf\nsystemctl restart apache2\nsystemctl enable apache2\n\n# Install PHP 8.1\napt-get install php libapache2-mod-php php-mysql php-curl php-cgi php-gd php-mbstring php-xml php-xmlrpc -y\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat < /etc/php/$PHP_VERSION/apache2/php.ini\nerror_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR\nerror_log = /var/log/php/error.log\nmax_input_time = 30\nEND\nmkdir /var/log/php\nchown www-data /var/log/php\n\n# Install Drupal\nrm -r /var/www/html\ncd ~; wget -4 https://www.drupal.org/download-latest/tar.gz\ntar -xf tar.gz -C /var/www/ && mv /var/www/drupal* /var/www/drupal\nrm tar.gz\nmkdir /var/www/drupal/sites/default/files\nchmod a+w /var/www/drupal/sites/default/files\ncp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php\nchmod a+w /var/www/drupal/sites/default/settings.php\ncat <> /var/www/drupal/sites/default/settings.php\n\\$settings['trusted_host_patterns'] = [\n '^$FQDN\\$',\n];\nEND\n\n# Cleanup\nsystemctl restart apache2\nsystemctl restart mysql\n\n# SSL\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"dbroot_password","label":"MySQL root Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"db_password","label":"Database Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Drupal server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1008125,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Easypanel One-Click","description":"Easypanel One-Click","ordinal":29,"logo_url":"assets/easypanel.svg","images":["linode/ubuntu22.04"],"deployments_total":1372,"deployments_active":75,"is_public":true,"mine":false,"created":"2022-05-18T16:43:00","updated":"2023-11-14T17:59:50","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nsh get-docker.sh\n\n# setup easypanel\ndocker run --rm \\\n -v /etc/easypanel:/etc/easypanel \\\n -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n easypanel/easypanel setup","user_defined_fields":[]},{"id":691620,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"FileCloud One-Click","description":"FileCloud One-Click","ordinal":30,"logo_url":"assets/filecloud.svg","images":["linode/ubuntu20.04"],"deployments_total":753,"deployments_active":11,"is_public":true,"mine":false,"created":"2020-11-30T21:16:19","updated":"2023-11-13T21:36:04","rev_note":"","script":"#!/bin/bash \n\n## Domain Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source and run the New Linode Setup script for DNS configuration\n# This also sets some useful variables, like $IP and $FQDN\n\nsource \n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nset pipefail -o\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Allow traffic on ports 80 and 443\nufw allow 80\nufw allow 443\n\n# Installing Filecloud and Prequisites\nwget -qO - https://repo.filecloudlabs.com/static/pgp/filecloud.asc | sudo apt-key add -\nwget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\necho \"deb [ arch=amd64 ] https://repo.filecloudlabs.com/apt/ubuntu focal/filecloud/22.1 main\" | sudo tee /etc/apt/sources.list.d/filecloud.list\napt-get update -y\napt-get install apache2 mongodb-org -y\napt install -y --no-install-recommends php8.1*\nACCEPT_EULA=Y apt-get install filecloud -y\n\nif [[ \"$SSL\" == \"Yes\" ]]; then\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"ssl","label":"Would you like to use a free CertBot SSL certificate?","oneof":"Yes,No","default":"No"},{"name":"soa_email_address","label":"Email Address for Lets' Encrypt Certificate","default":""},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":609392,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Flask One-Click","description":"Flask One-Click","ordinal":31,"logo_url":"assets/flask.svg","images":["linode/debian10"],"deployments_total":2134,"deployments_active":149,"is_public":true,"mine":false,"created":"2019-11-07T06:24:17","updated":"2023-11-15T12:35:38","rev_note":"Initial import","script":"#!/bin/bash\n\n## Enable logging\nexec > /var/log/stackscript.log 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\nufw_install\nufw allow http\n\n# Install Prereq's & Flask APP\napt install -y git\ncd /home\ngit clone https://github.com/abalarin/Flask-on-Linode.git flask_app_project\n\n# Install & configure Nginx\napt install -y nginx\ncat < /etc/nginx/sites-enabled/flask_app\nserver {\n listen 80;\n server_name $IP;\n location / {\n proxy_pass http://127.0.0.1:8000;\n proxy_set_header Host \\$host;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\n\nunlink /etc/nginx/sites-enabled/default\nnginx -s reload\n\n# Install python & Packages\napt install -y python3 python3-pip\ncd /home/flask_app_project\npip3 install -r flask_app/requirements.txt\n\n# Configure Flask\ncat < /etc/config.json\n{\n \"SECRET_KEY\": \"$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)\",\n \"SQLALCHEMY_DATABASE_URI\": \"sqlite:///site.db\"\n}\nEND\n\ncat < /home/flask_app_project/flask_app/__init__.py\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_login import LoginManager\nimport json\nimport urllib3\napp = Flask(__name__)\nwith open('/etc/config.json') as config_file:\n config = json.load(config_file)\napp.config['SECRET_KEY'] = config.get('SECRET_KEY')\napp.config['SQLALCHEMY_DATABASE_URI'] = config.get('SQLALCHEMY_DATABASE_URI')\ndb = SQLAlchemy(app)\nlogin_manager = LoginManager()\nlogin_manager.init_app(app)\nfrom flask_app import routes\nEND\n\n# Install and Configure Gunicorn\napt install -y gunicorn3\ngunicorn3 --workers=3 flask_app:app &\n\n# Install and Configure Supervisor\napt install -y supervisor\ncat < /etc/supervisor/conf.d/flask_app.conf\n[program:flask_app]\ndirectory=/home/flask_app_project\ncommand=gunicorn3 --workers=3 flask_app:app\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/flask_app/flask_app.err.log\nstdout_logfile=/var/log/flask_app/flask_app.out.log\nEND\n\nmkdir /var/log/flask_app\ntouch /var/log/flask_app/flask_app.out.log\ntouch /var/log/flask_app/flask_app.err.log\nsupervisorctl reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":971045,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Focalboard One-Click","description":"Focalboard One-Click","ordinal":32,"logo_url":"assets/focalboard.svg","images":["linode/ubuntu22.04"],"deployments_total":468,"deployments_active":21,"is_public":true,"mine":false,"created":"2022-02-08T16:23:08","updated":"2023-11-11T10:10:59","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Focalboard Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-focalboard\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n #Focalboard vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -vvvv $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1088136,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster One-Click","description":"Galera Cluster One-Click","ordinal":33,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":117,"deployments_active":7,"is_public":true,"mine":false,"created":"2022-11-15T20:41:27","updated":"2023-11-14T15:31:59","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/galera-occ\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/galera-occ\" ]; then\n rm -rf /tmp/galera-occ\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n export DEBIAN_FRONTEND=non-interactive\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # add private IP address\n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/galera-occ\n cd /tmp/galera-occ/\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip3 install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"cluster_name","label":"Cluster Name"},{"name":"token_password","label":"Your Linode API token"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Galera CA"},{"name":"common_name","label":"Common Name","default":"Galera Server"},{"name":"cluster_size","label":"Galera cluster size","default":"3","oneof":"3"}]},{"id":688911,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gitea One-Click","description":"Gitea One-Click","ordinal":34,"logo_url":"assets/gitea.svg","images":["linode/debian10"],"deployments_total":994,"deployments_active":68,"is_public":true,"mine":false,"created":"2020-11-17T21:16:09","updated":"2023-11-15T10:42:38","rev_note":"","script":"#! /bin/bash\n\n## Database Settings\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n#assigns var for IP address\nreadonly ip=$(hostname -I | awk '{print$1}')\n\n#intall git\napt install -y git\n\n#install nginx\napt install -y nginx\n\n#install mysql and secure\nmysql_root_preinstall\napt-get install -y mariadb-server\nsystemctl start mariadb\nsystemctl enable mariadb\nrun_mysql_secure_installation\n\n#create mysql db and user\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE gitea;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE USER 'gitea'@'localhost' IDENTIFIED BY '$(printf '%q' \"$DB_PASSWORD\")';\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' WITH GRANT OPTION;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES;\"\n\n#create user for gitea\nadduser --system --disabled-password --group --shell /bin/bash --gecos 'Git Version Control' --home /home/git git\n\n#create directories for gitea\nmkdir -p /var/lib/gitea/{custom,data,log}\nchown -R git:git /var/lib/gitea/\nchmod -R 750 /var/lib/gitea/\nmkdir /etc/gitea\nchown root:git /etc/gitea\nchmod 770 /etc/gitea\n\n#pull down gitea binary\nwget -O gitea https://dl.gitea.io/gitea/1.13.0/gitea-1.13.0-linux-amd64\nchmod +x gitea\n\n#validate gpg\napt install gnupg -y\ngpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2\ngpg --verify gitea-1.13.0-linux-amd64.asc gitea-1.13.0-linux-amd64\n\n#copy gitea to global location\ncp gitea /usr/local/bin/gitea\n\n#download systemd file from gitea\nwget https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service -P /etc/systemd/system/\n\n#add requires mysql to the systemd file\nsed -i 's/#Requires=mariadb.service/Requires=mariadb.service/' /etc/systemd/system/gitea.service\n\n#start gitea as systemd service\nsystemctl daemon-reload\nsystemctl start gitea\nsystemctl enable gitea\n\n#configures ufw rules before nginx\nsystemctl start ufw\nufw allow http\nufw allow https\nufw enable\n\n#set absolute domain if any, otherwise use localhost\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=localhost\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:3000;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx\n\nsleep 60\n\n#sets certbot ssl\nif [[ $SSL = \"Yes\" ]]; then\n check_dns_propagation ${ABS_DOMAIN} ${ip}\n apt install python3-certbot-nginx -y\n certbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${EMAIL_ADDRESS} -w /var/www/html/\nfi\n\nstackscript_cleanup","user_defined_fields":[{"name":"dbroot_password","label":"MySQL root Password"},{"name":"db_password","label":"gitea Database Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records.","default":""},{"name":"subdomain","label":"The subdomain for your server (Domain required)","default":""},{"name":"domain","label":"Your domain (API Token required)","default":""},{"name":"soa_email_address","label":"SOA Email for your domain (Required for new domains)","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate for your domain?","oneof":"Yes,No","default":"No"},{"name":"email_address","label":"Admin Email for Let's Encrypt certificate","default":""}]},{"id":401707,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"GitLab One-Click","description":"GitLab One-Click","ordinal":35,"logo_url":"assets/GitLab.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":3234,"deployments_active":138,"is_public":true,"mine":false,"created":"2019-03-08T21:12:21","updated":"2023-11-13T19:13:30","rev_note":"Remove SSH Pubkey UDF","script":"#!/usr/bin/env bash\n\n## Gitlab Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction gitlab {\n # Install dependencies\n apt-get install curl ca-certificates apt-transport-https gnupg2 -y\n\n curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash\n apt-get update -y\n EXTERNAL_URL=\"https://$FQDN\" apt-get install gitlab-ce -y\n\n}\n\nfunction sslgitlab {\n # Taking advantage of Gitlab's Let's Encrypt cert capabilities\n sed -i \"s/# letsencrypt\\['enable'\\] = nil/letsencrypt\\['enable'\\] = true/g\" /etc/gitlab/gitlab.rb\n sed -i -E \"s/(# )(letsencrypt\\['auto_renew*)/\\2/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/letsencrypt['auto_renew_minute'] = nil/letsencrypt['auto_renew_minute'] = 0/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/# letsencrypt\\['contact_emails'\\] = \\[\\]/letsencrypt\\['contact_emails'\\] = \\['$SOA_EMAIL_ADDRESS']/g\" /etc/gitlab/gitlab.rb\n\n gitlab-ctl reconfigure\n}\n\nfunction firewallgitlab {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n gitlab\n firewallgitlab\n sslgitlab\n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Gitlab server's DNS records","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""}]},{"id":1102905,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gopaddle One-Click","description":"Gopaddle One-Click app","ordinal":36,"logo_url":"assets/gopaddle.svg","images":["linode/ubuntu22.04"],"deployments_total":45,"deployments_active":2,"is_public":true,"mine":false,"created":"2022-12-20T17:44:47","updated":"2023-11-09T11:24:37","rev_note":"","script":"#!/bin/bash\nexec >/var/log/stackscript.log 2>&1\n# Install Docker\napt-get update -y\napt-get install -y ca-certificates curl gnupg lsb-release\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\napt-get update -y\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get update -y\napt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\n\n# Install microk8s\napt-get install snapd -y \nsudo snap install core\nexport PATH=$PATH:/snap/bin\nsnap install microk8s --classic --channel=1.25\nsnap refresh microk8s --channel=1.25\nmicrok8s status --wait-ready\n\n\n# Install gopaddle\nmicrok8s addons repo add gp-lite https://github.com/gopaddle-io/microk8s-community-addons-gplite.git\nmicrok8s enable gopaddle-lite\n\necho Waiting for gopaddle services to move to running state ...\nmicrok8s.kubectl wait --for=condition=ready pod -l released-by=gopaddle -n gp-lite --timeout=15m\n\nRDNS=$(dnsdomainname -A | awk '{print $1}')\n\necho gopaddle-lite installation is complete ! You can now access the gopaddle dashboard @ http://$RDNS:30003/","user_defined_fields":[]},{"id":607256,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Grafana One-Click","description":"Grafana One Click App","ordinal":37,"logo_url":"assets/grafana.svg","images":["linode/debian11"],"deployments_total":825,"deployments_active":57,"is_public":true,"mine":false,"created":"2019-10-30T20:43:07","updated":"2023-11-15T08:49:37","rev_note":"","script":"#!/usr/bin/env bash\n\n### Grafana OCA\n\n## Grafana Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Source the Bash StackScript Library\nsource \n\n# Source and run the New Linode Setup script for SSH configuration\nsource \n\n# Install PreReqs\napt-get install -y apt-transport-https \\\nsoftware-properties-common \\\nwget \\\ngnupg2 \\\nsqlite3\n\nwget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\necho \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\napt-get -y update\napt-get -y install grafana\nsystemctl start grafana-server\nsystemctl enable grafana-server\n\n## reset Grafana admin password\n#grafana-cli --homepath \"/usr/share/grafana\" admin reset-admin-password $grafana_password. --not working -hmorris\necho \"Initializing DB.....\" && sleep 25\nsqlite3 /var/lib/grafana/grafana.db <\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction grav {\n apt-get install -y apache2 php libapache2-mod-php php-mysql mysql-server composer php-curl php-common php-gd php-json php-mbstring php-xml php-zip\n run_mysql_secure_installation_ubuntu20\n cd /var/www/html\n git clone https://github.com/getgrav/grav.git\n cd grav\n chown www-data:www-data -R .\n su -l www-data -s /bin/bash -c \"cd /var/www/html/grav && composer install --no-dev -o && bin/grav install && bin/gpm install admin\"\n chown www-data:www-data -R .\n}\n\nfunction apache_conf {\n cat < /etc/apache2/sites-available/grav.conf\n\nServerAdmin $SOA_EMAIL_ADDRESS\nDocumentRoot /var/www/html/grav/\nServerName $FQDN\nServerAlias www.$FQDN\n\nOptions FollowSymLinks\nAllowOverride All\nOrder allow,deny\nallow from all\n\nErrorLog /var/log/apache2/$FQDN-error_log\nCustomLog /var/log/apache2/$FQDN-access_log common\n\n\nEND\n a2enmod rewrite\n a2ensite grav.conf\n a2dissite 000-default.conf\n service apache2 restart\n}\n\nfunction ssl {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n firewall\n grav\n apache_conf\n ssl\n\n}\n\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":688914,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Guacamole One-Click","description":"Guacamole One-Click","ordinal":39,"logo_url":"assets/guacamole.svg","images":["linode/ubuntu22.04"],"deployments_total":4416,"deployments_active":74,"is_public":true,"mine":false,"created":"2020-11-17T21:28:05","updated":"2023-11-15T15:43:40","rev_note":"","script":"#!/usr/bin/env bash\n### Apache Guacamole OCA\n### Required UDFs\n## Guacamole Settings\n#\n#\n#\n#\n#\n### Optional UDFs\n## Linode/SSH Security Settings\n#\n#\n## Domain Settings\n#\n#\n#\n## Logging and other debugging helpers\n# Put bash into verbose mode\nset -o pipefail\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Imports\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n### Main Script\n## Open the needed firewall ports\nufw allow http\nufw allow https\n# Install dependencies\nsystem_install_package build-essential libcairo2-dev libpng-dev libtool-bin libossp-uuid-dev libvncserver-dev freerdp2-dev libssh2-1-dev \\\nlibtelnet-dev libwebsockets-dev libpulse-dev libvorbis-dev libwebp-dev \\\nlibssl-dev libpango1.0-dev libswscale-dev libavcodec-dev libavutil-dev \\\nlibavformat-dev\n# Download the Guacamole Server source code\n# Fetch the latest release page\nlatest_release_page=$(curl -sL https://guacamole.apache.org/releases/ | grep -m 1 -o 'href=\"/releases/[0-9.]\\+/\"')\n# Extract the version number from the release page URL\nlatest_version=$(echo $latest_release_page | grep -Eo '[0-9]\\.[0-9]+.[0-9]+')\n# Download the server component\nwget https://downloads.apache.org/guacamole/$latest_version/source/guacamole-server-$latest_version.tar.gz\ntar -xvf guacamole-server-$latest_version.tar.gz\ncd guacamole-server-$latest_version\n# Build Guacamole Server using the downloaded source code\n./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots\nmake\nmake install\n# Update installed library cache and reload systemd\nldconfig\nsystemctl daemon-reload\n# Start guacd\nsystemctl enable guacd\n## Install Guacamole Web App\n# Install Apache Tomcat\nsystem_install_package tomcat9 tomcat9-admin tomcat9-common tomcat9-user\n# Download and install the Guacamole Client\nwget https://downloads.apache.org/guacamole/$latest_version/binary/guacamole-$latest_version.war\nmv guacamole-$latest_version.war /var/lib/tomcat9/webapps/guacamole.war\nsystemctl restart tomcat9 guacd\n## Guacamole configs\nmkdir /etc/guacamole\nreadonly ENCRYPTED_GUACAMOLE_PASSWORD=\"$(echo -n \"$GUACAMOLE_PASSWORD\" | openssl md5 | awk '{print $2}')\"\ncat <> /etc/guacamole/user-mapping.xml\n\n \n \n \n \n vnc\n localhost\n 5901\n ${PASSWORD}\n \n \n\nEOF\ncat <> /etc/guacamole/guacd.conf\n[daemon]\npid_file = /var/run/guacd.pid\n#log_level = debug\n[server]\nbind_host = 127.0.0.1\nbind_port = 4822\nEOF\ncat <> /etc/guacamole/guacamole.properties\n# Hostname and port of guacamole proxy\nguacd-hostname: localhost\nguacd-port: 4822\nEOF\nsystemctl restart tomcat9 guacd\n## Install a desktop environment (XFCE) and VNC Server\n# Install XFCE & NVC\nsystem_install_package xfce4 xfce4-goodies tigervnc-standalone-server expect\n# Set the VNC Server password\nreadonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\nsystemctl restart tomcat9 guacd\nkillvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\nkill $killvncprocess\n# Create a systemd service for Tiger VNC\ntouch /etc/systemd/system/vncserver@.service\ncat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n# Start and enable the systemd service\nsystemctl start vncserver@1.service\nsystemctl enable vncserver@1.service\n## Reverse proxy for the Guacamole client\n# Install Apache\napache_install\na2enmod proxy proxy_http headers proxy_wstunnel\n# Create the VirtualHost for Guacamole\ncat < /etc/apache2/sites-available/guacamole.conf\n\n ServerName $FQDN\n ErrorLog ${APACHE_LOG_DIR}/guacamole_error.log\n CustomLog ${APACHE_LOG_DIR}/guacamole_access.log combined\n \n Require all granted\n ProxyPass http://localhost:8080/guacamole/ flushpackets=on\n ProxyPassReverse http://localhost:8080/guacamole/\n \n \n Require all granted\n ProxyPass ws://localhost:8080/guacamole/websocket-tunnel\n ProxyPassReverse ws://localhost:8080/guacamole/websocket-tunnel\n \n Header always unset X-Frame-Options\n\nEOF\n# Enable the VirtualHost\na2ensite guacamole.conf\nsystemctl restart apache2\n## HTTPS\nsystem_install_package python3-certbot-apache\ncertbot -n --apache --agree-tos --redirect --hsts --staple-ocsp --email \"$SOA_EMAIL_ADDRESS\" -d \"$FQDN\" \n## Cleanup after ourselves\nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo/VNC user to be created for the Linode"},{"name":"password","label":"The password for the limited sudo/VNC user"},{"name":"guacamole_user","label":"The username to be used with Guacamole"},{"name":"guacamole_password","label":"The password to be used with Guacamole"},{"name":"soa_email_address","label":"Email for SSL certificate"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required if filling out any of the domain-related fields.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record","default":""},{"name":"domain","label":"The domain for the Linode's DNS record","default":""}]},{"id":1102902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HaltDOS Community WAF One-Click","description":"HaltDOS Community WAF One-Click app","ordinal":40,"logo_url":"assets/haltdos.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":169,"deployments_active":7,"is_public":true,"mine":false,"created":"2022-12-20T17:34:20","updated":"2023-11-04T11:02:00","rev_note":"","script":"#!/bin/bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\necho -e \"\\n---------------HALTDOS COMMUNITY WAF SETUP---------------\"\n\nexport NEEDRESTART_SUSPEND=1\nip=`ip route get 8.8.8.8 | awk -F\"src \" 'NR==1{split($2,a,\" \");print a[1]}'`\necho -e \"Checking OS ...\"\nsource /etc/os-release > /dev/null 2>&1\narch=`uname -m`\nif [[ \"$ID\" == \"ubuntu\" || \"$ID\" == \"debian\" ]]; then\n if [[ \"$VERSION_ID\" == \"18.04\" || \"$VERSION_ID\" == \"20.04\" || \"$VERSION_ID\" == \"22.04\" || \"$VERSION_ID\" == \"11\" ]]; then\n if [ \"$arch\" != \"x86_64\" ]; then\n echo -e \"\\e[1;31m$arch is not yet supported. Supported System Architecture - x86_64 \\e[0m\"\n fi\n else\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported OS - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\n fi\nelse\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported Versions - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\nfi\n\necho -e \"Downloading dependencies ...\"\n\napt-get update &> /dev/null\n\napt-get install -y default-jdk default-jre &> /dev/null\necho \"JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/\" >> /etc/environment\nsource /etc/environment\n\necho -e \"Downloading latest binaries ...\"\n\nsource /etc/os-release > /dev/null 2>&1\nif [ \"$VERSION_ID\" == \"18.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null \n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-18/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"20.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-20/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"22.04\" ]; then\n apt-get install -y libmaxminddb-dev libmaxminddb0 mmdb-bin python2-dev python2 &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-22/hd-community-waf-x86_64.deb &> /dev/null\nelif [[ \"$ID\" == \"debian\" && \"$VERSION_ID\" == \"11\" ]]; then\n apt-get install -y sudo libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/debian-11/hd-community-waf-x86_64.deb &> /dev/null\nfi\n\napt-get install -y ./hd-community-waf.deb &> /dev/null\nrm hd-community-waf.deb\necho -e \"Haltdos Community WAF Installed\"\n\n\ncurl -s -k -o hd-community-controller.deb https://binary.haltdos.com/community/waf/gui/hd-community-controller-x86_64.deb &> /dev/null\napt-get install -y ./hd-community-controller.deb &> /dev/null\nrm hd-community-controller.deb\necho -e \"Haltdos Community Controller Installed\"\n\n\necho -e \"Haltdos Community WAF Setup Done\\n\"\necho -e \"Configure your WAF on https://$ip:9000\\n\"\nexport NEEDRESTART_SUSPEND=0","user_defined_fields":[]},{"id":912262,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Harbor One-Click","description":"Harbor One-Click","ordinal":41,"logo_url":"assets/harbor.svg","images":["linode/ubuntu22.04"],"deployments_total":275,"deployments_active":14,"is_public":true,"mine":false,"created":"2021-09-29T17:06:13","updated":"2023-11-15T05:04:50","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## harbor Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-harbor\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # harbor vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -vvvv $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the Harbor server and Let's Encrypt SSL certificate"}]},{"id":1037037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad One-Click","description":"HashiCorp Nomad One Click App","ordinal":42,"logo_url":"assets/nomad.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":103,"deployments_active":3,"is_public":true,"mine":false,"created":"2022-08-02T18:46:19","updated":"2023-11-15T09:15:01","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## set some variables\nexport NOMAD_DIR=/usr/bin\nexport NOMAD_PATH=${NOMAD_DIR}/nomad\nexport NOMAD_CONFIG_DIR=/etc/nomad.d\nexport NOMAD_DATA_DIR=/opt/nomad/data\nexport NOMAD_TLS_DIR=/opt/nomad/tls\nexport NOMAD_ENV_VARS=${NOMAD_CONFIG_DIR}/nomad.conf\nexport IP=$(hostname -I | awk '{print$1}')\n\n\n## install gpg\napt-get install -y gpg\n\n## Install Nomad\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\nsudo apt update -y && sudo apt install -y nomad\n\n#echo \"Start Nomad in -server mode\"\nsudo tee ${NOMAD_ENV_VARS} > /dev/null < ${NOMAD_ENV_VARS}\n[Unit]\nDescription=Nomad Agent\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nRestart=on-failure\nEnvironmentFile=/etc/nomad.d/nomad.conf\nExecStart=/usr/local/bin/nomad agent -config /etc/nomad.d $FLAGS\nExecReload=/bin/kill -HUP $MAINPID\nKillSignal=SIGTERM\nUser=root\nGroup=root\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\n## enable and start nomad\nsystemctl enable nomad\nsystemctl start nomad\n\n## Install Docker\ncurl -fsSL get.docker.com | sudo sh\n\n## Configure nginx container\ncat << EOF > /root/nginx.conf\nevents {}\n\nhttp {\n server {\n location / {\n proxy_pass http://nomad-ws;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n\n # Nomad blocking queries will remain open for a default of 5 minutes.\n # Increase the proxy timeout to accommodate this timeout with an\n # additional grace period.\n proxy_read_timeout 310s;\n\n # Nomad log streaming uses streaming HTTP requests. In order to\n # synchronously stream logs from Nomad to NGINX to the browser\n # proxy buffering needs to be turned off.\n proxy_buffering off;\n\n # The Upgrade and Connection headers are used to establish\n # a WebSockets connection.\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n\n # The default Origin header will be the proxy address, which\n # will be rejected by Nomad. It must be rewritten to be the\n # host address instead.\n proxy_set_header Origin \"\\${scheme}://\\${proxy_host}\";\n }\n }\n\n # Since WebSockets are stateful connections but Nomad has multiple\n # server nodes, an upstream with ip_hash declared is required to ensure\n # that connections are always proxied to the same server node when possible.\n upstream nomad-ws {\n ip_hash;\n server host.docker.internal:4646;\n }\n}\nEOF\n\n## start docker container\ndocker run -d --publish=8080:80 --add-host=host.docker.internal:host-gateway \\\n --mount type=bind,source=$PWD/nginx.conf,target=/etc/nginx/nginx.conf \\\n nginx:latest\n\n## firewall\nufw allow 22\nufw allow 80\nufw allow 443\nufw allow 4646\nufw allow 8080\n\ncat << EOF > /etc/motd\n#################################\n The Nomad GUI is now available at HTTP://${IP}:8080\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Nomad configurations at https://www.nomadproject.io/docs/configuration\n#################################\nEOF\n\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1226544,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster One-Click","description":"Nomad Cluster One-Click","ordinal":43,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":92,"deployments_active":5,"is_public":true,"mine":false,"created":"2023-08-25T19:05:25","updated":"2023-11-14T16:00:13","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\ngit_username=\"akamai-compute-marketplace\"\nexport GIT_REPO_1=\"https://github.com/$git_username/nomad-occ.git\"\nexport GIT_REPO_2=\"https://github.com/$git_username/nomad-client-occ.git\"\nexport DEBIAN_FRONTEND=non-interactive\nexport UUID=$(uuidgen | awk -F - '{print $1}')\nexport CLUSTER_MODE='cluster'\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-server-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n REGION=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .region)\n export REGION=\"${REGION}\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${UUID}-${REGION}\\\"]}\" \\ \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO_1} /tmp/linode\n git clone ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n # clone one branch to test \n # git clone -b develop ${GIT_REPO_1} /tmp/linode\n # git clone -b develop ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Total instance count","default":"6","oneof":"6"},{"name":"servers","label":"Nomad Server count","default":"3","oneof":"3"},{"name":"clients","label":"Nomad client size","default":"3","oneof":"3"}]},{"id":1226545,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Clients Cluster One-Click","description":"Nomad Cluster Clients One-Click","ordinal":44,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":3,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-08-25T19:07:27","updated":"2023-11-14T15:53:47","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-client-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${CLUSTER_UUID}\\\"]}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=noninteractive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n # clone one branch to test \n # git clone -b develop ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Nomad Client Count","default":"3","oneof":"3,5,7"},{"name":"consul_nomad_autojoin_token_password","label":"consul_nomad_autojoin_token generated by Nomad Server OCC"},{"name":"cluster_uuid","label":"cluster_uuid tag for the Nomad Server OCC being joined to.","# git repogit_username":"akamai-compute-marketplace","export git_repo":"https://github.com/$git_username/nomad-client-occ.git"}]},{"id":1037038,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Vault One-Click","description":"HashiCorp Vault One Click App","ordinal":45,"logo_url":"assets/vault.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":206,"deployments_active":17,"is_public":true,"mine":false,"created":"2022-08-02T18:47:32","updated":"2023-11-15T05:18:04","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nexport IP=$(hostname -I | awk '{print$1}')\nexport VAULT_ADDR=\"http://${IP}:8200\"\n\n## install gpg\napt install -y gpg\n\n## add hashicorp gpg key and repo\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg >/dev/null\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\n\n## install vault\napt update && apt install -y vault\n\n## basic vault configs\nmkdir -p /vault/data\nchown -R vault:vault /vault\ncat << EOF > /etc/vault.d/vault.hcl\nstorage \"raft\" {\n path = \"/vault/data\"\n node_id = \"node1\"\n}\n\nlistener \"tcp\" {\n address = \"${IP}:8200\"\n tls_disable = \"true\"\n}\n\ndisable_mlock = true\n\napi_addr = \"http://127.0.0.1:8200\"\ncluster_addr = \"https://127.0.0.1:8201\"\nui = true\nEOF\n\n## systemd for vault\nsystemctl enable vault.service\n\n## Start vault server and stash the tokens\nsystemctl start vault.service\ntouch /root/.vault_tokens.txt\nsleep 20\nvault operator init | grep 'Token\\|Unseal' >> /root/.vault_tokens.txt\n\n## firewall\nufw allow 22\nufw allow 8200\n\n## config info and recommendations\ncat << EOF > /etc/motd\n#####################################\n The Vault server GUI is now available at ${VAULT_ADDR}\n The randomly generate Unseal Tokens and Initial Root Token are listed in /root/.vault_tokens.txt\n ** STORE THESE VALUES SOMEWHERE SAFE AND SECURE **\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Vault configurations at https://www.vaultproject.io/docs/configuration\n######################################\nEOF\n\nsleep 20\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1177605,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Illa Builder One-Click","description":"Illa Builder One-Click App","ordinal":46,"logo_url":"assets/illabuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":92,"deployments_active":3,"is_public":true,"mine":false,"created":"2023-05-17T14:22:00","updated":"2023-11-14T20:45:02","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Sources OCA helpers\nsource \nsource \nsource \nsource \n# Apt update/upgrade\nexport DEBIAN_FRONTEND=non-interactive\napt update && apt upgrade -y\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Env config\nILLA_HOME_DIR=~/illa\nPG_VOLUMN=${ILLA_HOME_DIR}/database\nDRIVE_VOLUMN=${ILLA_HOME_DIR}/drive\n\n\n# Init\nmkdir -p ${ILLA_HOME_DIR}\nmkdir -p ${PG_VOLUMN}\nmkdir -p ${DRIVE_VOLUMN}\n\n# Run\ndocker run -d \\\n --name illa_builder \\\n -v $PG_VOLUMN:/opt/illa/database \\\n -v $DRIVE_VOLUMN:/opt/illa/drive \\\n -p 80:2022 \\\n illasoft/illa-builder:latest\n\necho \"\n********************************************************************************\nWelcome to ILLA Builder!\n********************************************************************************\n # ILLA Builder: http://\"$FQDN\"\n # Website: https://www.illacloud.com\n # Documentation: https://www.illacloud.com/docs/about-illa\n # Github: https://github.com/illacloud\n # Community Support: https://github.com/orgs/illacloud/discussions\n\"","user_defined_fields":[]},{"id":607401,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jenkins One-Click","description":"Jenkins One-Click App","ordinal":47,"logo_url":"assets/jenkins.svg","images":["linode/debian11"],"deployments_total":1961,"deployments_active":127,"is_public":true,"mine":false,"created":"2019-10-31T15:29:54","updated":"2023-11-15T11:04:57","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prereq's & Jenkins\napt install -y default-jre wget gnupg2\nwget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -\nsh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'\napt_setup_update\napt install -y jenkins\nsystemctl enable --now jenkins\n\n# Cleanup \nstackscript_cleanup","user_defined_fields":[]},{"id":869623,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"JetBackup One-Click","description":"JetBackup One-Click","ordinal":48,"logo_url":"assets/jetbackup.svg","images":["linode/centos7","linode/almalinux8"],"deployments_total":101,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-21T12:45:59","updated":"2023-11-04T18:34:59","rev_note":"","script":"#!/bin/bash\n\n# JetBackup StackScript UDF Variables\n# \n# \n#\n# The next line makes the Official cPanel StackScript available if cPanel/WHM is selected as the control panel. Do not remove this line.\n# source \n#\n# Log File Paths:\n# StackScript Log: /var/log/stackscript.log\n# cPanel/WHM installation: /var/log/stackscript-595742.log\n# Debugging: /var/log/stackscript-debug.log\n#\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>/var/log/stackscript-debug.log\necho \"PID: $$\"\nCONTROLPANEL=${CONTROLPANEL}\nRELEASE=${RELEASETIER}\nJBDIR=\"/usr/local/jetapps/etc/jetbackup5\"\n\nif [[ -z ${CONTROLPANEL} ]]; then\necho \"Error: No panel selected. Please select a panel to deploy JetBackup.\"\nexit 1\nelif [[ -d ${JBDIR} ]]; then\necho \"Error: JetBackup already installed. Aborting StackScript.\"\nexit 0\nfi\n\necho \"Installing JetApps Repository\"\nrpm --import http://repo.jetlicense.com/centOS/RPM-GPG-KEY-JETAPPS\nyum -y -q install http://repo.jetlicense.com/centOS/jetapps-repo-latest.rpm\nyum -y -q install jetapps --disablerepo=* --enablerepo=jetapps\necho \"JetApps Repository Successfully Installed.\"\n\ncpanelinstall() {\n\necho \"Running cPanel/WHM Marketplace StackScript. You can track the progress of cPanel/WHM with: tail -f /var/log/stackscript-595742.log \"\n(source /root/ssinclude-595742 >>/var/log/stackscript-595742.log 2>&1)\n\n}\n\n# JETBACKUP 5 FOR LINUX - STANDALONE INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"Linux\" ]; then\necho \"Installing JetBackup 5.\"\npackage='jetbackup5-linux'\njetapps --install $package $RELEASE\njbhostname=$(hostname)\njbhostname=\"https://${jbhostname}:3035\"\necho \"Adding a Firewall rule to open port 3035. Port 3035 must be open for access to the JetBackup 5 Linux UI.\"\nfirewall-cmd --permanent --add-port=3035/tcp\nfirewall-cmd --reload\necho \"To go to JetBackup and Accept the User Agreement, go to ${jbhostname} and enter your root login credentials.\"\necho \"To generate a one-time JetBackup 5 login URL after installation and acceptance of the EULA type the following command in the terminal:\"\necho \"jb5login\"\nfi\n\n# JETBACKUP 5 FOR CPANEL/WHM INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"cPanel/WHM\" ]; then\n\npackage='jetbackup5-cpanel'\ncpanelinstall\nsleep 2\necho \"Installing JetBackup 5.\"\njetapps --install $package $RELEASE\necho \"To log in to cPanel/WHM as root user, please enter the following command to generate a one-time login token:\"\necho \"\"\necho \"whmlogin\"\nfi\n\necho \"Review the JetBackup 5 Getting Started Guide at https://docs.jetbackup.com/v5.1/adminpanel/gettingStarted.html\"\ninstallVersion=\"$(jetbackup5 --version | cut -d ' ' -f 1,3,4 | sed \"2 d\")\"\necho \"${installVersion} Successfully Installed!\"\nrm /root/ssinclude-595742\nrm /root/StackScript\nexit 0","user_defined_fields":[{"name":"CONTROLPANEL","label":"Choose a Control Panel to use with JetBackup 5. cPanel/WHM or Linux (No Control Panel)","default":"cPanel/WHM","oneof":"cPanel/WHM,Linux"},{"name":"RELEASETIER","label":"Choose a JetBackup Release Tier.","default":"stable","oneof":"stable,beta,edge"}]},{"id":662121,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jitsi One-Click","description":"Jitsi One-Click","ordinal":49,"logo_url":"assets/jitsi.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":4490,"deployments_active":133,"is_public":true,"mine":false,"created":"2020-08-12T16:08:51","updated":"2023-11-14T15:29:03","rev_note":"","script":"#!/bin/bash\n\n## Jitsi Settings\n#\n\n## Domain Settings\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# dependencies\nexport DEBIAN_FRONTEND=noninteractive\napt install apt-transport-https gnupg2 curl wget -y\napt-add-repository universe\napt update -y\n\n#Install Jitisi dep Prosody\necho deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list\nwget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -\napt install lua5.2\n\n#Install Nginx\napt install -y nginx\nsystemctl start nginx\nsystemctl enable nginx\n\n#Install Jitsi Meet\ncurl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg'\necho 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null\n\n# update all package sources\napt update -y\necho \"jitsi-videobridge jitsi-videobridge/jvb-hostname string $FQDN\" | debconf-set-selections\necho \"jitsi-meet-web-config jitsi-meet/cert-choice select 'Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)'\" | debconf-set-selections\napt --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes install jitsi-meet\n\n# Firewall\nsudo ufw allow 80/tcp\nsudo ufw allow 443/tcp\nsudo ufw allow 10000/udp\nsudo ufw allow 22\nsudo ufw allow 3478/udp\nsudo ufw allow 5349/tcp\nsudo ufw enable\n\n# SSL \ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh <\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction lampjoomla {\n apt-get install apache2 mariadb-server php php-common libapache2-mod-php php-cli php-fpm php-mysql php-json php-opcache php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-zip -y\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cat < /etc/php/$PHP_VERSION/apache2/php.ini\nmemory_limit = 512M\nupload_max_filesize = 256M\npost_max_size = 256M \nmax_execution_time = 300\noutput_buffering = off\ndisplay_errors = off\nupload_tmp_dir = \"/var/www/html/joomla/tmp\"\nEND\n}\n\nfunction databaseconf {\n run_mysql_secure_installation\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE DATABASE joomla_db;\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER 'joomla'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla'@'localhost';\"\n}\n\nfunction apachejoomla {\n apt-get install wget unzip -y\n mkdir -p /var/www/html/joomla\n cd /tmp && wget https://downloads.joomla.org/cms/joomla4/4-1-0/Joomla_4-1-0-Stable-Full_Package.zip?format=zip\n unzip Joomla_4* -d /var/www/html/joomla\n chown -R www-data:www-data /var/www/html/joomla \n chmod -R 755 /var/www/html/joomla\n cat < /etc/apache2/sites-available/joomla.conf\n\n ServerAdmin $SOA_EMAIL_ADDRESS\n DocumentRoot /var/www/html/joomla\n ServerName $FQDN\n\n \n Options FollowSymlinks\n AllowOverride All\n Require all granted\n \n\n ErrorLog ${APACHE_LOG_DIR}/$FQDN_error.log\n CustomLog ${APACHE_LOG_DIR}/$FQDN_access.log combined\n\n\nEND\n a2ensite joomla.conf\n a2enmod rewrite\n a2enmod php$PHP_VERSION\n a2dissite 000-default.conf\n systemctl restart apache2\n\n ufw allow http\n ufw allow https\n}\nfunction ssljoomla {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\n\nfunction main {\n lampjoomla\n databaseconf\n apachejoomla\n ssljoomla\n stackscript_cleanup\n}\n# Execute script\nmain","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":985380,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Joplin One-Click","description":"Joplin One-Click","ordinal":51,"logo_url":"assets/joplin.svg","images":["linode/ubuntu20.04"],"deployments_total":400,"deployments_active":34,"is_public":true,"mine":false,"created":"2022-03-08T18:14:30","updated":"2023-11-15T13:56:28","rev_note":"","script":"#!/bin/bash\n## Joplin Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n## Linode Docker OCA\nsource \n\nfunction joplininstall {\n mkdir -p /etc/docker/compose/joplin/ && cd /etc/docker/compose/joplin/\n cat < /etc/docker/compose/joplin/docker-compose.yml\nversion: '3'\n\nservices:\n db:\n image: postgres:13\n volumes:\n - ./data/postgres:/var/lib/postgresql/data\n ports:\n - \"5432:5432\"\n restart: unless-stopped\n environment:\n - POSTGRES_PASSWORD=$POSTGRES_PASSWORD\n - POSTGRES_USER=joplin\n - POSTGRES_DB=joplin\n app:\n image: joplin/server:latest\n depends_on:\n - db\n ports:\n - \"22300:22300\"\n restart: unless-stopped\n environment:\n - APP_PORT=22300\n - APP_BASE_URL=https://$FQDN\n - DB_CLIENT=pg\n - POSTGRES_PASSWORD=$POSTGRES_PASSWORD\n - POSTGRES_DATABASE=joplin\n - POSTGRES_USER=joplin\n - POSTGRES_PORT=5432\n - POSTGRES_HOST=db\nEND\n cat < /etc/systemd/system/joplin.service\n[Unit]\nDescription=Docker Compose Joplin Application Service\nRequires=joplin.service\nAfter=joplin.service\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/docker-compose up -d\nExecStop=/usr/bin/docker-compose down\nExecReload=/usr/bin/docker-compose up -d\nWorkingDirectory=/etc/docker/compose/joplin/\n[Install]\nWantedBy=multi-user.target\nEND\n systemctl daemon-reload\n systemctl enable joplin.service \n systemctl start joplin.service \n}\n\nfunction nginxreverse {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n server_name $FQDN;\n error_log /var/log/nginx/$FQDN.error;\n access_log /var/log/nginx/$FQDN.access;\n location / {\n proxy_pass http://localhost:22300;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n proxy_set_header Host \\$host;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n \n}\n\nfunction ssl_lemp {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n joplininstall\n firewall\n nginxreverse\n ssl_lemp\n stackscript_cleanup\n}\n\n# Execute script\nmain","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"postgres_password","label":"Password for the postgres database","example":"s3cure_p4ssw0rd"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":688912,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kepler Builder One-Click","description":"Kepler Builder One-Click","ordinal":52,"logo_url":"assets/keplerbuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":264,"deployments_active":4,"is_public":true,"mine":false,"created":"2020-11-17T21:17:33","updated":"2023-11-06T13:38:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-keplerbuilder\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401701,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LAMP One-Click","description":"LAMP One-Click","ordinal":53,"logo_url":"assets/LAMP.svg","images":["linode/ubuntu22.04"],"deployments_total":13658,"deployments_active":1118,"is_public":true,"mine":false,"created":"2019-03-09T02:07:09","updated":"2023-11-15T16:27:28","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LAMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-lamp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lamp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":606691,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LEMP One-Click","description":"LEMP Stack","ordinal":54,"logo_url":"assets/LEMP.svg","images":["linode/ubuntu22.04"],"deployments_total":4112,"deployments_active":310,"is_public":true,"mine":false,"created":"2019-10-27T15:29:04","updated":"2023-11-15T16:37:52","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LEMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-lemp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lemp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923032,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiteSpeed cPanel One-Click","description":"LiteSpeed cPanel One-Click","ordinal":55,"logo_url":"assets/litespeedcpanel.svg","images":["linode/almalinux8"],"deployments_total":1002,"deployments_active":20,"is_public":true,"mine":false,"created":"2021-10-18T00:57:12","updated":"2023-11-15T08:51:16","rev_note":"","script":"#!/bin/bash\n## Logging\nexec > /var/log/stackscript.log 2>&1\n## Install cPanel\nyum install -y kernel grub2\nsed -i -e \"s/GRUB_TIMEOUT=5/GRUB_TIMEOUT=10/\" /etc/default/grub\nsed -i -e \"s/crashkernel=auto rhgb console=ttyS0,19200n8/console=ttyS0,19200n8/\" /etc/default/grub\nmkdir /boot/grub\ngrub2-mkconfig -o /boot/grub/grub.cfg\nsystemctl stop firewalld.service\nsystemctl disable firewalld.service\nsystemctl stop NetworkManager\nsystemctl disable NetworkManager\nsystemctl enable network\nsystemctl start network\nyum remove NetworkManager -y\ncd /home \ncurl -o latest -L https://securedownloads.cpanel.net/latest && sh latest\nyum remove ea-apache24-mod_ruid2 -y\n## Install LSWS on cPanel\nADMIN_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo '')\ncat <>/home/lsws.options\n## 1 = enable, 0 = disable, 2 = user home directory\nphp_suexec=\"2\"\nport_offset=\"0\"\nadmin_user=\"admin\"\nadmin_pass=\"${ADMIN_PASS}\"\nadmin_email=\"root@localhost\"\neasyapache_integration=\"1\"\nauto_switch_to_lsws=\"1\"\ndeploy_lscwp=\"1\"\nEOT\nbash <( curl https://get.litespeed.sh ) TRIAL","user_defined_fields":[]},{"id":1008123,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiveSwitch One-Click","description":"LiveSwitch One-Click","ordinal":56,"logo_url":"assets/liveswitch.svg","images":["linode/ubuntu20.04"],"deployments_total":188,"deployments_active":2,"is_public":true,"mine":false,"created":"2022-05-18T16:41:37","updated":"2023-11-10T00:56:05","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\nsudo dpkg --configure -a\n\n# kill any background updater jobs\nsudo killall apt apt-get\n\n# helpers\nsudo apt-get install dialog apt-utils -y -q\n\nsudo DEBIAN_FRONTEND=noninteractive apt-get update -y\nsudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef -y\n\n# firewall\n# normal defaults\nsudo ufw default deny incoming\nsudo ufw default allow outgoing\n# ssh on\nsudo ufw allow ssh\n# dynamic inbound traffic\nsudo ufw allow 49152:65535/udp\n# TURN\nsudo ufw allow 3478/udp\n# TURN TCP\nsudo ufw allow 80/tcp\n# TURNS\nsudo ufw allow 443/tcp\n# admin (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 9090/tcp\nsudo ufw allow 9443/tcp\n# gateway (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 8080/tcp\nsudo ufw allow 8443/tcp\n\n# sip\n# sudo ufw allow 5061/udp\n# sudo ufw allow 5061/tcp\n\n# we will turn on the firewall at the end because it disconnects us\n\n# install docker\nsudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\napt-cache policy docker-ce\nsudo apt-get install -y docker-ce\n\n# entropy fix for docker\nsudo apt-get install -y haveged\n\n# install docker compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n\n# retrieve docker compose files\nmkdir -p /opt/liveswitch\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose-liveswitch.service\" -o /opt/liveswitch/docker-compose-liveswitch.service\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose.yml\" -o /opt/liveswitch/docker-compose.yml\n\n# install liveswitch docker compose\nsudo cp /opt/liveswitch/docker-compose-liveswitch.service /etc/systemd/system/\nsudo systemctl enable docker\nsudo systemctl enable docker-compose-liveswitch\nsudo systemctl start docker-compose-liveswitch\n\n# clean up some logs\nsudo rm -f /var/log/cloud-init-output.log\nsudo rm -f /var/log/dpkg.log\nsudo rm -f /var/log/kern.log\nsudo rm -f /var/log/ufw.log\n\n# turn on the firewall\nsudo ufw --force enable\nsudo reboot","user_defined_fields":[]},{"id":869159,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MagicSpam One-Click","description":"MagicSpam One-Click","ordinal":57,"logo_url":"assets/magicspam.svg","images":["linode/centos7"],"deployments_total":5,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-20T19:13:52","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\n# source the stackscript for the selected control panel\nif [ \"$CONTROL_PANEL\" == \"cPanel\" ]; then\n # redirect ALL output to the stackscript log for future troubleshooting\n exec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n # cPanel Marketplace App install\n source \n\n # set the hostname to replicate Plesk stackscript for consistent behavior\n IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n echo $HOSTNAME > /etc/hostname\n hostname -F /etc/hostname\n echo $IPADDR $HOSTNAME >> /etc/hosts\nelif [ \"$CONTROL_PANEL\" == \"Plesk\" ]; then\n # Plesk Marketplace App install\n # NOTE: do not redirect output to the stackscript log to avoid duplicate log\n # lines as the Plesk stackscript already redirects to it\n source \nelse\n echo \"Invalid control panel option detected. Aborting...\"\n exit 1\nfi\n\n# install MagicSpam via the installer script\nwget https://www.magicspam.com/download/magicspam-installer.sh -O /root/magicspam-installer\nchmod +x /root/magicspam-installer\n/root/magicspam-installer -l \"$MS_LICENSE_KEY\"","user_defined_fields":[{"name":"control_panel","label":"The Control Panel to deploy alongside with MagicSpam. Make sure to select an Image supported by the selected Control Panel. For more information, please refer to the MagicSpam App Information Sidebar.","oneof":"cPanel,Plesk"},{"name":"ms_license_key","label":"The MagicSpam license key. Please make sure to use the appropriate license key for the selected Control Panel. For more information, please refer to the MagicSpam App information sidebar."},{"name":"hostname","label":"The server's hostname."}]},{"id":1243759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept FFmpeg Plugins One-Click","description":"MainConcept FFmpeg Plugins","ordinal":58,"logo_url":"assets/mainconcept.svg","images":["linode/debian11"],"deployments_total":4,"deployments_active":2,"is_public":true,"mine":false,"created":"2023-09-28T15:02:48","updated":"2023-11-10T09:11:57","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\n\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-ffmpeg-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""}]},{"id":1243760,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept Live Encoder One-Click","description":"MainConcept Live Encoder\r\n\r\n","ordinal":59,"logo_url":"assets/mainconcept.svg","images":["linode/centos-stream9"],"deployments_total":9,"deployments_active":3,"is_public":true,"mine":false,"created":"2023-09-28T15:04:08","updated":"2023-11-13T19:35:09","rev_note":"","script":"#!/bin/bash\n\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-live-encoder-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(dnsdomainname -A | awk '{print $1}')\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n yum install dnf -y\n dnf update -y\n dnf upgrade -y\n dnf install -y git python3 python3-pip\n\n dnf makecache\n dnf install epel-release -y\n dnf makecache\n dnf install ansible -y\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SSL Generation","default":""}]},{"id":1243762,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept P2 AVC Ultra Transcoder One-Click","description":"MainConcept P2 AVC Ultra Transcoder","ordinal":60,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:01","updated":"2023-11-10T09:13:53","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept P2 AVC Ultra Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-p2-avc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept P2 AVC Ultra Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243763,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XAVC Transcoder One-Click","description":"MainConcept XAVC Transcoder","ordinal":61,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:47","updated":"2023-11-10T09:15:13","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XAVC Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xavc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XAVC Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243764,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XDCAM Transcoder One-Click","description":"MainConcept XDCAM Transcoder","ordinal":62,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:06:28","updated":"2023-11-10T09:16:10","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XDCAM Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xdcam-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n \n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XDCAM Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1096122,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mastodon One-Click","description":"Mastodon is an open-source and decentralized micro-blogging platform, supporting federation and public access to the server.","ordinal":63,"logo_url":"assets/mastodon.svg","images":["linode/debian11"],"deployments_total":1666,"deployments_active":64,"is_public":true,"mine":false,"created":"2022-12-05T15:57:04","updated":"2023-11-15T00:13:10","rev_note":"","script":"#!/bin/bash\nset -x\n## Mastodon Settings\n#\n#\n#\n#\n#\n#\n\n\n# git repo + workdirs\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/mastodon-oca.git\"\nexport WORK_DIR=\"/tmp/oca-deployment\"\nexport LINODE_API_TOKEN=\"${TOKEN_PASSWORD}\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nsource \n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction setup {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip python3-dev build-essential\n\n #clone repo and set up ansible environment\n mkdir -p ${WORK_DIR}\n cd ${WORK_DIR}\n git clone $GIT_REPO\n cd mastodon-oca\n\n # write udf vars\n cat < group_vars/mastodon/vars\n domain: ${DOMAIN}\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n owner_username: ${OWNER_USERNAME}\n owner_email: ${OWNER_EMAIL}\n single_user_mode: ${SINGLE_USER_MODE}\nEND\n\n #venv\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n}\n\nfunction run {\n# run playbooks\n ansible-playbook -v site.yml\n}\n\n# main\nsetup\nrun\ncleanup\necho \"Installation Complete!\"","user_defined_fields":[{"name":"domain","label":"Domain name for your Mastodon instance.","example":"domain.tld"},{"name":"token_password","label":"Your Linode API token"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"owner_username","label":"Username for Mastodon Owner","example":""},{"name":"owner_email","label":"Email address for Mastodon Owner","example":"owner@example.com"},{"name":"single_user_mode","label":"Do you want to start Mastodon in single-user mode?","oneof":"Yes,No"}]},{"id":611895,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MEAN One-Click","description":"MEAN One-Click","ordinal":64,"logo_url":"assets/mean.svg","images":["linode/ubuntu20.04"],"deployments_total":718,"deployments_active":35,"is_public":true,"mine":false,"created":"2019-11-14T04:49:44","updated":"2023-11-08T20:38:58","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MEAN Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction dependmean {\n apt-get install -y build-essential git fontconfig libpng-dev ruby ruby-dev wget gnupg\n gem install sass\n}\n\nfunction mongoinstall {\n cd && wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n echo \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\n\nfunction meaninstall {\n apt-get install -y curl software-properties-common\n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n apt-get install -y nodejs\n\n # MEAN APP CONFIGURATION\n cd && mkdir -p /opt/mean\n cd /opt/mean\n cat <> package.json\n{\n\"name\" : \"mean\",\n\"version\": \"0.0.1\"\n}\nEND\n npm install express --save\n npm install angular\n cat <> server.js\nvar express = require('express');\nvar app = express();\nvar port = 3000;\napp.get('/', function(req, res) {\nres.send('Hello World Powered By: Linode Marketplace');\n});\napp.listen(port, function(){\nconsole.log(\"Listening at port: \" + port);\n})\nEND\n # Start App on reboot\n cd && npm install pm2 -g\n pm2 start --name=\"MEAN_APP\" /opt/mean/server.js\n pm2 startup \n pm2 save\n}\n\nfunction nginxmean {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslmean {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallmean {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n dependmean\n firewallmean\n mongoinstall\n meaninstall\n nginxmean\n sslmean\n\n}\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401702,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MERN One-Click","description":"MERN One-Click","ordinal":65,"logo_url":"assets/MERN.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":1420,"deployments_active":55,"is_public":true,"mine":false,"created":"2019-03-08T21:07:40","updated":"2023-11-15T10:21:17","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3000\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install dependencies\napt-get install -y build-essential git \n\n# Install Mongodb\napt-get install -y wget gnupg\nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Install NodeJS and NPM\napt-get install -y curl software-properties-common\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \ncurl -fsSL https://deb.nodesource.com/setup_16.x | bash -\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\ncurl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get install -y nodejs\n\n# Install ExpressJS\nnpm update -g\nnpm install --global express\nnpm link express\nnpm -g install create-react-app\ncd /opt\ncreate-react-app hello-world\nnpm i --package-lock-only\nnpm audit fix\n\n# Start App on reboot\ncat < /lib/systemd/system/hello-world.service\n[Unit]\nDescription=Hello World React Application Service\nRequires=hello-world.service\nAfter=hello-world.service\n\n[Service]\nType=simple\nUser=root\nRemainAfterExit=yes\nRestart=on-failure\nWorkingDirectory=/opt/hello-world\nExecStart=npm start --host 0.0.0.0 --port=3000\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nsystemctl daemon-reload\nsystemctl start hello-world\nsystemctl enable hello-world\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1051714,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Microweber One-Click","description":"Microweber One-Click","ordinal":66,"logo_url":"assets/microweber.svg","images":["linode/ubuntu20.04"],"deployments_total":471,"deployments_active":25,"is_public":true,"mine":false,"created":"2022-09-01T15:43:41","updated":"2023-11-15T12:43:28","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/microweber/microweber\nset -o pipefail\nMICROWEBER_INSTALLER_TAG=\"1.3.1\"\nWORKING_DIR=\"/var/www/html\"\nDOWNLOAD_URL='http://updater.microweberapi.com/builds/master/microweber.zip'\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php8.1\napt install -y mysql-server\napt install -y php8.1-{bcmath,xml,fpm,mysql,iconv,xsl,zip,intl,ldap,gd,cli,dev,bz2,curl,exif,mbstring,pgsql,sqlite3,tokenizer,opcache,soap,cgi,common,imap,opcache}\napt install -y python3-certbot-apache software-properties-common unzip curl\napt install -y php-pear\npecl install -f libsodium\nsed -i 's/;opcache.enable\\s*=.*/opcache.enable=1/g' /etc/php/8.1/cli/php.ini\necho 'extension=sodium.so' > /etc/php/8.1/cli/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/fpm/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/cgi/10-sodium.ini\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Microweber at http://\\$myip/\n * Secure your database by running:\n > mysql_secure_installation\nFor help and more information visit https://microweber.org\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\ncat >/etc/cron.d/microweber </etc/php/8.1/apache2/conf.d/30-microweber.ini <>/var/log/per-instance.log\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\nMICROWEBER_DB_HOST=localhost\nMICROWEBER_DB_PORT=3306\nMICROWEBER_DB_NAME=microweber\nMICROWEBER_DB_USER=microweber\nMICROWEBER_DB_PASS=$(openssl rand -hex 16)\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\necho \"[OK] Microweber Installer $MICROWEBER_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":691614,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mist.io One-Click","description":"Mist.io One-Click","ordinal":67,"logo_url":"assets/mistio.svg","images":["linode/debian10"],"deployments_total":319,"deployments_active":1,"is_public":true,"mine":false,"created":"2020-11-30T20:25:44","updated":"2023-11-09T14:33:15","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\n# \n\n# \n\n## install docker\nsudo apt-get install -y \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n gnupg-agent \\\n software-properties-common\n\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -\n\nsudo add-apt-repository \\\n \"deb [arch=amd64] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) \\\n stable\"\n\nsudo apt-get update\n\nsudo apt-get install -y docker-ce docker-ce-cli containerd.io\n\n## install docker-compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n\nsudo chmod +x /usr/local/bin/docker-compose\n\n## get latest mist\nmkdir ~/mist && cd ~/mist\n\nexport MIST_CE_REPO=https://github.com/mistio/mist-ce/releases/latest\nexport LATEST_TAG=\"$(curl -sI \"${MIST_CE_REPO}\" | grep -Po 'tag\\/\\K(v\\S+)')\"\n\nwget https://github.com/mistio/mist-ce/releases/download/$LATEST_TAG/docker-compose.yml\n\n# set CORE_URI\nmkdir settings\nexport IP=$(ip r | grep /24 | grep -Eo \"([0-9]{1,3}[\\.]){3}[1-9]{1,3}\")\necho 'CORE_URI=\"http://'$IP'\"' > settings/settings.py\n\ndocker-compose up -d\n\nwhile !(curl -sSLf http://localhost >/dev/null); do\n sleep 5\ndone\n\ndocker-compose exec -T api ./bin/adduser --admin \"${MIST_EMAIL}\" --password \"${MIST_PASSWORD}\"","user_defined_fields":[{"name":"mist_email","label":"Mist admin user's email.","example":"Set your admin user's email."},{"name":"mist_password","label":"Mist admin user's password.","example":"Set your admin user's password."}]},{"id":609195,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB One-Click","description":"MongoDB One-Click","ordinal":68,"logo_url":"assets/mongodb.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":1757,"deployments_active":79,"is_public":true,"mine":false,"created":"2019-11-06T07:14:07","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\n## Mongo Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction mongoinstall {\n apt-get install -y wget gnupg\n if [ $MONGOVERSION == \"5.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ $MONGOVERSION == \"4.4\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\n elif [ $MONGOVERSION == \"4.2\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list\n elif [ $MONGOVERSION == \"4.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list\n fi\n\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\nfunction createmongouser {\n echo \"Creating Mongo User\" & sleep 3\n mongo < /etc/mongod.conf\n# mongod.conf\n# for documentation of all options, see:\n# http://docs.mongodb.org/manual/reference/configuration-options/\n# Where and how to store data.\nstorage:\n dbPath: /var/lib/mongodb\n journal:\n enabled: true\n# engine:\n# wiredTiger:\n# where to write logging data.\nsystemLog:\n destination: file\n logAppend: true\n path: /var/log/mongodb/mongod.log\n# network interfaces\nnet:\n port: 27017\n bindIp: 127.0.0.1\n# how the process runs\nprocessManagement:\n timeZoneInfo: /usr/share/zoneinfo\nsecurity:\n authorization: enabled\n#operationProfiling:\n#replication:\n#sharding:\n## Enterprise-Only Options:\n#auditLog:\n#snmp:\nEOF\n service mongod restart\n}\n\nfunction main {\n mongoinstall\n createmongouser \n setauth\n}\n\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"db_password","label":"Mongo Password"},{"name":"mongoversion","label":"Mongo Version","oneof":"5.0,4.4,4.2,4.0","default":"5.0"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for soa record","default":""}]},{"id":1067004,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster One-Click","description":"MongoDB replica set","ordinal":69,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":49,"deployments_active":0,"is_public":true,"mine":false,"created":"2022-09-29T18:32:36","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_PAT=\"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\"\nexport GIT_REPO=\"https://linode-solutions:${GIT_PAT}@github.com/linode-solutions/mongodb-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/mongodb-cluster\" ]; then\n rm -rf /tmp/mongodb-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction destroy_linode {\n curl -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X DELETE \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # Rename Provisioner & add Private IP \n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/mongodb-cluster\n cd /tmp/mongodb-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"cluster_name","label":"Domain Name"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Mongo CA"},{"name":"common_name","label":"Common Name","default":"Mongo Server"},{"name":"cluster_size","label":"MongoDB cluster size","default":"3","oneof":"3"}]},{"id":869127,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Moodle One-Click","description":"Moodle One-Click","ordinal":70,"logo_url":"assets/moodle.svg","images":["linode/ubuntu20.04"],"deployments_total":1262,"deployments_active":99,"is_public":true,"mine":false,"created":"2021-07-20T18:48:49","updated":"2023-11-13T17:45:33","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n## Moodle settings\n#\n#\n#\n#\n\n## Domain settings\n#\n#\n#\n\n## Linode/SSH Security Settings \n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\n# Install dependencies \napt install -y apache2 mysql-client mysql-server php libapache2-mod-php git graphviz aspell ghostscript clamav php7.4-pspell php7.4-curl php7.4-gd php7.4-intl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-ldap php7.4-zip php7.4-soap php7.4-mbstring\n\n# Firewall\nufw allow http \nufw allow https\n\n# Secure MySQL\nrun_mysql_secure_installation_ubuntu20\n\n# Install Moodle\ncd /var/www/html\ngit clone git://git.moodle.org/moodle.git\ncd moodle\ngit branch --track MOODLE_39_STABLE origin/MOODLE_39_STABLE\ngit checkout MOODLE_39_STABLE\n\n# Configure Moodle\nmkdir /var/moodledata\nchmod -R 777 /var/moodledata \nchmod -R 755 /var/www/html/moodle \n\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE USER 'moodle'@'localhost' IDENTIFIED BY '$DB_PASSWORD';\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodle'@'localhost';\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\ncat < /etc/apache2/sites-available/moodle.conf\n\n ServerAdmin admin@$FQDN\n DocumentRoot /var/www/html/moodle/\n ServerName $FQDN\n ServerAlias www.$FQDN \n \n Options +FollowSymlinks\n AllowOverride All\n Require all granted\n \n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEND\n\na2enmod rewrite\na2ensite moodle.conf\na2dissite 000-default.conf\nservice apache2 restart\n\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n/usr/bin/php admin/cli/install.php --chmod=777 --lang=en_us --wwwroot=https://$FQDN --dataroot=/var/moodledata/ --dbtype=mysqli --dbhost=localhost --dbname=moodle --dbuser=moodle --dbpass=$DB_PASSWORD --dbport=3306 --dbsocket=1 --prefix=mdl_ --fullname=moodle --shortname=moodle --summary=\"Moodle: Powered By Linode Marketplace\" --adminuser=moodle --adminpass=\"$ADMIN_PASSWORD\" --adminemail=$SOA_EMAIL_ADDRESS --upgradekey= --non-interactive --agree-license\n\nchown -R www-data: /var/www/html/moodle\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"admin_password","label":"Moodle Admin Password"},{"name":"soa_email_address","label":"Moodle Admin Email"},{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"db_password","label":"Moodle database User password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":607026,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MySQL/MariaDB One-Click","description":"MySql One Click","ordinal":71,"logo_url":"assets/mysql.svg","images":["linode/ubuntu20.04"],"deployments_total":4530,"deployments_active":326,"is_public":true,"mine":false,"created":"2019-10-29T19:03:33","updated":"2023-11-14T20:03:12","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MySQL Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3306\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\nif [[ \"$DATABASE\" == \"MySQL\" ]]; then\n # Install/configure MySQL\n apt install -y mysql-server\n # Secure MySQL install\n run_mysql_secure_installation_ubuntu20 \nelse \n # Install/configure MySQL\n apt install -y mariadb-server\n # Secure MySQL install\n run_mysql_secure_installation\nfi\n\nmysql -uroot -p$DBROOT_PASSWORD -e \"create database $DATABASE_NAME;\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER '$DBUSER' IDENTIFIED BY '$DBUSER_PASSWORD';\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON $DATABASE_NAME.* TO '$DBUSER'@'%' WITH GRANT OPTION;\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"database","label":"Would you like to install MySQL or MariaDB?","oneof":"MySQL,MariaDB"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser","label":"MySQL User","example":"user1"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"database_name","label":"Create Database","example":"testdb"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970561,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NodeJS One-Click","description":"NodeJS One-Click","ordinal":72,"logo_url":"assets/nodejs.svg","images":["linode/ubuntu20.04"],"deployments_total":2088,"deployments_active":263,"is_public":true,"mine":false,"created":"2022-02-07T17:21:41","updated":"2023-11-15T13:45:43","rev_note":"","script":"#!/usr/bin/env bash\n\n## NodeJS Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction nodejs {\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get install -y nodejs\n \n mkdir -p /opt/nodejs\n cat < /opt/nodejs/hello.js\nconst http = require('http');\n\nconst hostname = 'localhost';\nconst port = 3000;\n\nconst server = http.createServer((req, res) => {\n res.statusCode = 200;\n res.setHeader('Content-Type', 'text/plain');\n res.end('Hello World Powered By Linode Marketplace');\n});\n\nserver.listen(port, hostname, () => {\n console.log(`Server running at http://localhost:3000/`);\n});\nEND\n}\n\nfunction pm2nodejs {\n npm install pm2@latest -g --no-audit\n cd /opt/nodejs/\n pm2 start hello.js\n sleep 5\n pm2 startup systemd\n sleep 5\n pm2 save\n}\n\nfunction nginxnodejs {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslnodejs {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallnodejs {\n ufw allow http\n ufw allow https\n\n}\nfunction main {\n nodejs\n pm2nodejs\n firewallnodejs \n nginxnodejs \n sslnodejs \n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":869156,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NirvaShare One-Click","description":"NirvaShare One-Click","ordinal":73,"logo_url":"assets/nirvashare.svg","images":["linode/ubuntu22.04"],"deployments_total":215,"deployments_active":3,"is_public":true,"mine":false,"created":"2021-07-20T19:08:35","updated":"2023-10-30T18:03:59","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Nirvashare Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-nirvashare\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # Nirvashare \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -vvvv $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":971043,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Odoo One-Click","description":"Odoo One-Click","ordinal":74,"logo_url":"assets/odoo.svg","images":["linode/ubuntu22.04"],"deployments_total":1757,"deployments_active":89,"is_public":true,"mine":false,"created":"2022-02-08T16:21:37","updated":"2023-11-15T16:51:39","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## ODOO Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-odoo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # ODOO vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -vvvv $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1102907,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ONLYOFFICE Docs One-Click","description":"ONLYOFFICE Docs One-Click app","ordinal":75,"logo_url":"assets/onlyoffice.svg","images":["linode/ubuntu22.04"],"deployments_total":289,"deployments_active":15,"is_public":true,"mine":false,"created":"2022-12-20T17:50:23","updated":"2023-11-15T08:45:03","rev_note":"","script":"#!/usr/bin/env bash\n# \n# \n# \n\n# SSL Settings\n# \n# \n# \n# \n\n# Enable Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n\n# Get and install docker\n# curl -fsSL get.docker.com | sudo sh\napt install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \napt update\napt install -y docker-ce\nsystemctl enable --now docker.service\n\nCONTAINER_NAME=\"onlyoffice-docs\"\n\n# Run ONLYOFFICE-Docs with SSL\nif [[ \"${SSL_ENABLED}\" == \"true\" ]]; then\n\tif [[ -z ${ABS_DOMAIN} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_DOMAIN parameter for correct SSL work\"\n\t\texit 1\n\tfi\n\tif [[ -z ${LETS_ENCRYPT_MAIL} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_MAIL parameter for correct SSL work\"\n\t\texit 1\n fi\n\tsudo docker run -i -t -d -p 80:80 -p 443:443 \\\n\t\t-e JWT_ENABLED=${JWT_ENABLED} \\\n \t\t-e JWT_SECRET=${JWT_SECRET} \\\n\t\t-e LETS_ENCRYPT_DOMAIN=${ABS_DOMAIN} \\\n -e LETS_ENCRYPT_MAIL=${LETS_ENCRYPT_MAIL} \\\n\t\t-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n\t\t-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n \t-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n \t-v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n \t-v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n \t-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n\t\t--name ${CONTAINER_NAME} \\\n\t\tonlyoffice/documentserver:${DOCS_VERSION}\n\telse \n# Run ONLYOFFICE-Docs without SSL\n\tsudo docker run -i -t -d -p 80:80 \\\n -e JWT_ENABLED=${JWT_ENABLED} \\\n -e JWT_SECRET=${JWT_SECRET} \\\n -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n -v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n --name ${CONTAINER_NAME} \\\n onlyoffice/documentserver:${DOCS_VERSION}\nfi\n\n# Wait for run\nready_check() {\n echo -e \"\\e[0;32m Waiting for the launch of DocumentServer... \\e[0m\" \n for i in {1..30}; do\n echo \"Getting the DocumentServer status: ${i}\"\n OUTPUT=\"$(curl -Is http://localhost/healthcheck/ | head -1 | awk '{ print $2 }')\"\n if [ \"${OUTPUT}\" == \"200\" ]; then\n echo -e \"\\e[0;32m DocumentServer is ready \\e[0m\"\n local DS_READY\n DS_READY='yes'\n break\n else\n sleep 10\n fi\n done\n if [[ \"${DS_READY}\" != 'yes' ]]; then\n err \"\\e[0;31m Something goes wrong documentserver does not started, check logs with command --> docker logs -f ${CONTAINER_NAME} \\e[0m\"\n exit 1\n fi\n}\n\nready_check\n\n# Enable Docs-example\nsudo docker exec ${CONTAINER_NAME} supervisorctl start ds:example\n\n# Add Docs-example to autostart\nsudo docker exec ${CONTAINER_NAME} sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf\n\n# Add MOTD \ncat >/etc/motd < >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Django\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/djangosetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Reboot server\nreboot","user_defined_fields":[]},{"id":923031,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed NodeJS One-Click","description":"OpenLiteSpeed NodeJS One-Click","ordinal":77,"logo_url":"assets/openlitespeednodejs.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":481,"deployments_active":18,"is_public":true,"mine":false,"created":"2021-10-18T00:52:51","updated":"2023-11-10T01:48:01","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and NodeJS\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/nodejssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":923030,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed Rails One-Click","description":"OpenLiteSpeed Rails One-Click","ordinal":78,"logo_url":"assets/openlitespeedrails.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":50,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T00:51:05","updated":"2023-11-15T06:56:36","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Rails\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/railssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":691622,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed WordPress One-Click","description":"OpenLiteSpeed WordPress One-Click","ordinal":79,"logo_url":"assets/openlitespeedwordpress.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":7821,"deployments_active":622,"is_public":true,"mine":false,"created":"2020-11-30T21:25:01","updated":"2023-11-15T13:32:11","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### linode\n### Install OpenLiteSpeed and WordPress\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/wpimgsetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401719,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenVPN One-Click","description":"OpenVPN OCA Debian 11 & ubuntu 20","ordinal":80,"logo_url":"assets/OpenVPN.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":39820,"deployments_active":1711,"is_public":true,"mine":false,"created":"2019-03-09T03:02:02","updated":"2023-11-15T16:57:37","rev_note":"Install extra dependencies ","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Install OpenVPN dependencies\napt update && apt -y install ca-certificates wget net-tools gnupg\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian bullseye main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian focal main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelse \necho \"Distro Not Supported\"\nfi\n\n## Apt Update & Install OpenVPN\napt update -y && apt -y install openvpn-as\n\n# UFW install\nufw_install\nufw allow 1194/udp\nsed -ie \"s/DEFAULT_FORWARD_POLICY=\\\"DROP\\\"/DEFAULT_FORWARD_POLICY=\\\"ACCEPT\\\"/g\" /etc/default/ufw\n\n# Cleanup\nstackscript_cleanup\n\n# Adding to display default password as last line in LISH console\nsleep 3\ncat /usr/local/openvpn_as/init.log | grep 'To login'; echo \"(password can be changed on Admin UI)\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""}]},{"id":804172,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Owncast One-Click","description":"Owncast One-Click","ordinal":81,"logo_url":"assets/owncast.svg","images":["linode/debian10"],"deployments_total":1761,"deployments_active":81,"is_public":true,"mine":false,"created":"2021-04-01T15:24:50","updated":"2023-11-12T20:15:15","rev_note":"","script":"#!/usr/bin/bash\n#\n#\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Add owncast user\nadduser owncast --disabled-password --gecos \"\"\n\n# Install dependencies\napt-get install -y libssl-dev unzip curl\n\n# Install Owncast\nmkdir -p /opt/owncast\ncd /opt/owncast || exit\n\ncurl -s https://owncast.online/install.sh | bash\nchown -R owncast:owncast /opt/owncast\n\n# Setup Owncast as a systemd service\ncat >/etc/systemd/system/owncast.service </etc/caddy/Caddyfile </etc/motd <\n#\n#\n## LAMP Stack Settings\n#\n#\n#\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\n## Update\napt_setup_update\n\n## Local Functions used by this StackScript\nfunction owncloud_install {\n system_install_package unzip php-gd php-json php-curl php-mbstring \\\n php-intl php-imagick php-xml php-zip\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cd /var/www\n wget https://download.owncloud.com/server/stable/owncloud-complete-latest.zip\n unzip owncloud-complete-latest.zip\n chown -R www-data:www-data owncloud\n rm owncloud-complete-latest.zip\n local -a input_text=(\n \"Alias / \\\"/var/www/owncloud/\\\"\"\n \"\"\n \" Options +FollowSymlinks\"\n \" AllowOverride All\"\n \"\"\n \" Dav off\"\n \"\"\n \"SetEnv HOME /var/www/owncloud\"\n \"SetEnv HTTP_HOME /var/www/owncloud\"\n \"\"\n )\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n a2ensite owncloud\n a2enmod rewrite headers env dir mime\n sed -i '/^memory_limit =/s/=.*/= 512M/' /etc/php/$PHP_VERSION/apache2/php.ini\n systemctl restart apache2\n echo \"ownCloud is installed\"\n}\n\nfunction owncloud_vhost_configure {\n local -r fqdn=\"$1\"\n local -r soa_email_address=\"$2\"\n local -a input_text=(\n \"\"\n \" ServerName ${fqdn}\"\n \" ServerAdmin ${soa_email_address}\"\n \" DocumentRoot /var/www/owncloud\"\n \" \"\n \" Require all granted\"\n \" AllowOverride All\"\n \" Options FollowSymLinks MultiViews\"\n \" SetEnv HOME /var/www/owncloud\"\n \" SetEnv HTTP_HOME /var/www/owncloud\"\n \" \"\n \"\"\n )\n echo \"\" >> /etc/apache2/sites-available/owncloud.conf\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n}\n\n## Main Script\n# Install and configure the LAMP Stack\nlamp_stack \"$DB_NAME\" \"$DB_ROOT_PASSWORD\" \"${DB_USERNAME:-owncloud}\" \"$DB_USER_PASSWORD\"\n\n# Install ownCloud to be accessed via domain and configure the VirtualHost\nowncloud_install \"$FQDN\"\nowncloud_vhost_configure \"$FQDN\" \"$SOA_EMAIL_ADDRESS\"\n\n# Configure ownCloud - This replaces the installer GUI that was in the previous version of this OCA\nsudo -u www-data php /var/www/owncloud/occ maintenance:install \\\n --database \"mysql\" \\\n --database-name \"$DB_NAME\" \\\n --database-user \"${DB_USERNAME:-owncloud}\" \\\n --database-pass \"$DB_USER_PASSWORD\" \\\n --admin-user \"$OC_ADMIN\" \\\n --admin-pass \"$OC_ADMIN_PASSWORD\"\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 1 --value=$FQDN\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 2 --value=$IP\necho \"Trusted Domain setting added\"\n\n# Open the needed firewall ports\nufw allow http\nufw allow https\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"oc_admin","label":"The name of the admin user for ownCloud"},{"name":"oc_admin_password","label":"The password for ownCloud's admin user"},{"name":"soa_email_address","label":"Admin Email for the ownCloud server"},{"name":"db_name","label":"The name of the database","default":"owncloud"},{"name":"db_root_password","label":"The root password for the database"},{"name":"db_username","label":"The name of the database user to create","default":"owncloud"},{"name":"db_user_password","label":"The password for the created database user"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""}]},{"id":1102906,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Passky One-Click","description":"Passky One-Click app","ordinal":83,"logo_url":"assets/passky.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":174,"deployments_active":10,"is_public":true,"mine":false,"created":"2022-12-20T17:48:51","updated":"2023-11-15T07:30:50","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nInstalling...\nPlease logout and come back in few minutes.\nEOF\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\nDEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n\n# Install docker compose\nsystem_install_package docker-compose\n\n#\n# Passky Server\n#\nwget https://github.com/Rabbit-Company/Passky-Server/releases/latest/download/passky-server.tar.xz\ntar -xf passky-server.tar.xz\ncd passky-server\ncp .env.example .env\n\nSERVER_CORES=$(grep -c ^processor /proc/cpuinfo)\nIP_ADDRESS=$(system_primary_ip)\n\nsed -i \"s/SERVER_CORES=1/SERVER_CORES=$SERVER_CORES/g\" .env\nsed -i \"s/ADMIN_USERNAME=admin/ADMIN_USERNAME=$ADMINUSER/g\" .env\nsed -i \"s/ADMIN_PASSWORD=/ADMIN_PASSWORD=$ADMIN_PASSWORD/g\" .env\n\ndocker-compose up -d\n\napache_install\na2enmod proxy && a2enmod proxy_http && systemctl restart apache2\necho \"\" > /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPreserveHost On\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyRequests Off\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ServerName $WEBSITE\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPass / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPassReverse / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \"\" >> /etc/apache2/sites-available/$WEBSITE.conf\na2ensite \"$WEBSITE\"\nsystemctl restart apache2\n\n# Install SSL\nsystem_install_package python3-certbot-apache\ncat << EOF > /usr/local/bin/installCert\n#!/bin/bash\nif ! certbot -n --apache --agree-tos --redirect -d $WEBSITE -m $EMAIL; then\n echo \"There was a problem while installing SSL certificate. Make sure your A record for domain: $WEBSITE does redirect to IP: $IP_ADDRESS\"\nelse\n echo \"Certificate installed successfully.\"\nfi\nEOF\nchmod +x /usr/local/bin/installCert\n\n# Configure auto-renewal for the certificate\ncrontab -l > cron\necho \"0 4 * * * /usr/bin/certbot renew\" >> cron\ncrontab cron\nrm cron\n\nstackscript_cleanup\n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nAdmin Panel:\n Link: http://$IP_ADDRESS (https://$WEBSITE)\n Username: $ADMINUSER\n Password: $ADMIN_PASSWORD\nTo install SSL certificate please run command: installCert\nEOF","user_defined_fields":[{"name":"website","label":"Website","example":"passky.domain.com"},{"name":"email","label":"Email Address","example":"info@rabbit-company.com"},{"name":"adminuser","label":"Admin Username"},{"name":"admin_password","label":"Admin Password"}]},{"id":804143,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Peppermint One-Click","description":"Peppermint One-Click","ordinal":84,"logo_url":"assets/peppermint.svg","images":["linode/ubuntu22.04"],"deployments_total":1783,"deployments_active":126,"is_public":true,"mine":false,"created":"2021-04-01T12:45:15","updated":"2023-11-15T13:41:22","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Peppermint setup\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-peppermint\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -vvvv $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":644908,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Percona (PMM) One-Click","description":"Percona One-Click","ordinal":85,"logo_url":"assets/percona.svg","images":["linode/debian10"],"deployments_total":191,"deployments_active":8,"is_public":true,"mine":false,"created":"2020-04-30T14:49:38","updated":"2023-11-08T11:49:14","rev_note":"","script":"#!/bin/bash\n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Docker\napt -y install docker.io\nsystemctl enable docker.service\n\n#PMM \ndocker pull percona/pmm-server:2\ndocker create -v /srv --name pmm2-data percona/pmm-server:2 /bin/true\ndocker run -d -p 80:80 -p 443:443 \\\n --volumes-from pmm2-data \\\n --name pmm2-server \\\n --restart always percona/pmm-server:2\n\necho \"Waiting for PMM to initialize to set password...\"\n\nuntil [ \"`docker inspect -f {{.State.Health.Status}} pmm2-server`\" = \"healthy\" ]; do sleep 1; done\n\ndocker exec -t pmm2-server bash -c \"ln -s /srv/grafana /usr/share/grafana/data; grafana-cli --homepath /usr/share/grafana admin reset-admin-password $PMMPASSWORD\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"pmmpassword","label":"Admin Password","example":"Admin User Password for PMM Server"}]},{"id":609018,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"phpMyAdmin One-Click","description":"phpMyAdmin One-Click","ordinal":86,"logo_url":"assets/phpmyadmin.svg","images":["linode/debian11"],"deployments_total":2126,"deployments_active":117,"is_public":true,"mine":false,"created":"2019-11-05T00:28:33","updated":"2023-11-14T20:23:27","rev_note":"Initial import","script":"#!/bin/bash\n#\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname\nset_hostname\n\n# Update system\napt_setup_update\n\n# Install/configure MySQL, Add Admin User\napt-get install -y mariadb-server\nsystemctl enable mariadb --now\nrun_mysql_secure_installation\nmysql -u root -e \"CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD'\"\nmysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost' WITH GRANT OPTION\"\nmysql -u root -e \"FLUSH PRIVILEGES\"\n\n# Install PHP\necho 'phpmyadmin phpmyadmin/dbconfig-install boolean true' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/mysql/admin-pass password $DBROOT_PASSWORD' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | debconf-set-selections\napt-get install -y phpmyadmin libapache2-mod-php7.4\n\n# Configure ufw\nufw_install\nufw allow http\nufw reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"db_user","label":"phpMyAdmin/MySQL Admin User","example":"admin"},{"name":"dbuser_password","label":"phpMyAdmin/MySQL Admin Password"},{"name":"dbroot_password","label":"MySQL root Password"}]},{"id":970522,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pi-hole One-Click","description":"Pi-hole One-Click","ordinal":87,"logo_url":"assets/pihole.svg","images":["linode/ubuntu20.04"],"deployments_total":3810,"deployments_active":237,"is_public":true,"mine":false,"created":"2022-02-07T16:04:53","updated":"2023-11-15T17:06:25","rev_note":"","script":"#!/usr/bin/env bash\n\n## PIHOLE Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nIPV4=$(ip a | awk '/inet / {print $2}'| sed -n '2 p')\nIPV6=$(ip -6 a | grep inet6 | awk '/global/{print $2}' | cut -d/ -f1)\nGENPIHOLEPASSWD=$(echo -n $PIHOLE_PASSWORD | sha256sum | awk '{printf \"%s\",$1 }' | sha256sum)\nPIHOLE_PASSWD=${GENPIHOLEPASSWD:0:-1}\n\nfunction firewall {\n ufw allow 80\n ufw allow 53\n ufw allow 67\n ufw allow 547\n ufw allow 4711\n}\n\nfunction config_pihole {\n mkdir -p /etc/pihole\n cat < /etc/pihole/setupVars.conf\nPIHOLE_INTERFACE=eth0\nIPV4_ADDRESS=$IPV4\nIPV6_ADDRESS=$IPV6\nPIHOLE_DNS_1=8.8.8.8\nPIHOLE_DNS_2=8.8.4.4\nQUERY_LOGGING=true\nINSTALL_WEB_SERVER=true\nINSTALL_WEB_INTERFACE=true\nLIGHTTPD_ENABLED=true\nCACHE_SIZE=10000\nDNS_FQDN_REQUIRED=true\nDNS_BOGUS_PRIV=true\nDNSMASQ_LISTENING=local\nWEBPASSWORD=$PIHOLE_PASSWD\nBLOCKING_ENABLED=true\nEND\n\ncurl -L https://install.pi-hole.net | bash /dev/stdin --unattended\n}\n\nfunction main {\n config_pihole\n firewall\n}\n\n# Execute script\napt_setup_update\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"pihole_password","label":"PIHOLE USER Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"This is the Email address for the SOA record","default":""}]},{"id":662119,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plex One-Click","description":"Plex One-Click","ordinal":88,"logo_url":"assets/plex.svg","images":["linode/debian10"],"deployments_total":2890,"deployments_active":55,"is_public":true,"mine":false,"created":"2020-08-12T15:54:44","updated":"2023-11-13T09:29:54","rev_note":"","script":"#!/bin/bash\n# INPUT VARIABLES:\n# \n# \n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Limited user setup if username is not \"root\"\nif [ \"$USERNAME\" != \"root\" ]; then\n \n# ensure sudo is installed and configure secure user\n apt -y install sudo\n adduser -uid 1000 $USERNAME --disabled-password --gecos \"\"\n echo \"$USERNAME:$PASSWORD\" | chpasswd\n usermod -aG sudo $USERNAME\n \n# Harden SSH Access\n sed -i -e 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config\n \n# set home directory\n HOME=/home/$USERNAME\n \n# configure ssh key for secure user if provided\n if [ \"$SSHKEY\" != \"\" ]; then\n SSHDIR=$HOME/.ssh\n mkdir $SSHDIR && echo \"$SSHKEY\" >> $SSHDIR/authorized_keys\n chmod -R 700 $SSHDIR && chmod 600 $SSHDIR/authorized_keys\n chown -R $USERNAME:$USERNAME $SSHDIR\n fi\n \n# Enable SSH hardening\n systemctl restart sshd\n \n# Create docker group, add limited user, and enable\n groupadd docker\n usermod -aG docker $USERNAME\nfi\n\n# Install and configure UFW for Plex\nufw_install\nufw allow 32400,3005,8324,32469/tcp\nufw allow 1900,32410,32412,32413,32414/udp\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Install plex as limited user\ndocker pull plexinc/pms-docker\ndocker run \\\n -d \\\n --name plex \\\n --restart always \\\n -p 32400:32400/tcp \\\n -p 3005:3005/tcp \\\n -p 8324:8324/tcp \\\n -p 32469:32469/tcp \\\n -p 1900:1900/udp \\\n -p 32410:32410/udp \\\n -p 32412:32412/udp \\\n -p 32413:32413/udp \\\n -p 32414:32414/udp \\\n -e ADVERTISE_IP=\"http://$IP:32400/\" \\\n -h \"Linode Plex Server\" \\\n -v $HOME/plex/config:/config \\\n -v $HOME/plex/media:/media \\\n -v $HOME/plex/transcode:/transcode \\\n plexinc/pms-docker\n\n# Recursively update ownership of Plex directories after delay\nsleep 1\nchown -R $USERNAME:$USERNAME $HOME/plex\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"USERNAME","label":"Limited User Name (not 'root')"},{"name":"PASSWORD","label":"Limited User Password"},{"name":"SSHKEY","label":"Limited User SSH Key","default":"","example":"Usually found in: ./ssh/id_rsa.pub"}]},{"id":611376,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL One-Click","description":"PostgreSQL One-Click","ordinal":89,"logo_url":"assets/postgresql.svg","images":["linode/debian11"],"deployments_total":2761,"deployments_active":206,"is_public":true,"mine":false,"created":"2019-11-13T06:05:28","updated":"2023-11-15T09:47:52","rev_note":"Initial import","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 22\nufw allow 5432\n\n# Install PostgreSQL\napt install -y postgresql postgresql-contrib\nsystemctl enable postgresql\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1068726,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster One-Click","description":"PostgreSQL Cluster","ordinal":90,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":146,"deployments_active":7,"is_public":true,"mine":false,"created":"2022-10-03T20:11:59","updated":"2023-11-15T07:06:17","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n\n# set force apt non-interactive\nexport DEBIAN_FRONTEND=noninteractive\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/postgresql-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/postgresql-cluster\" ]; then\n rm -rf /tmp/postgresql-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[info] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/postgresql-cluster\n cd /tmp/postgresql-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"cluster_name","label":"Domain Name"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"PostgeSQL cluster size","default":"3","oneof":"3"}]},{"id":985364,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus & Grafana One-Click","description":"Prometheus and Grafana","ordinal":91,"logo_url":"assets/prometheusgrafana.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":554,"deployments_active":66,"is_public":true,"mine":false,"created":"2022-03-08T17:03:20","updated":"2023-11-14T22:44:43","rev_note":"","script":"#!/usr/bin/env bash\n## Updated: 01-17-2023\n## Author: n0vabyte, Elvis Segura, esegura@linode.com\n\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\ncreds=\"/root/credentials.txt\"\nprometheus_htpasswd_file=\"/etc/nginx/.prometheus_htpasswd\"\n\nfunction add_firewalls {\n ufw allow http\n ufw allow https\n}\n\nfunction configure_nginx {\n apt-get install nginx apache2-utils -y\n cat << EOF > /etc/nginx/sites-available/$FQDN.conf\nserver {\n listen 80;\n server_name $FQDN;\n location / {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:3000;\n }\n location /prometheus/ {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:9090;\n auth_basic \"Restricted Area\";\n auth_basic_user_file $prometheus_htpasswd_file;\n }\n# allow let's encrypt\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/html/.well-known;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-{available,enabled}/$FQDN.conf\n unlink /etc/nginx/sites-enabled/default\n systemctl reload nginx\n systemctl enable nginx\n}\n\nfunction install_node_exporter {\n groupadd --system prometheus\n useradd -s /sbin/nologin --system -g prometheus prometheus\n curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '\"' -f 4 | wget -qi - \n tar -xvf node_exporter*.tar.gz\n chmod +x node_exporter-*/node_exporter\n chown prometheus:prometheus node_exporter\n mv node_exporter-*/node_exporter /usr/local/bin\n rm -fr node_exporter-*\n cat < /etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start node_exporter\n systemctl enable node_exporter\n}\n\nfunction configure_prometheus {\n latest_version=$(curl -s https://raw.githubusercontent.com/prometheus/prometheus/main/VERSION)\n prom_conf=\"/etc/prometheus/prometheus.yml\"\n file_sd_targets=\"/etc/prometheus/file_sd_targets\"\n prometheus_conf_dir=\"/etc/prometheus\"\n prometheus_data_dir=\"/var/lib/prometheus\"\n mkdir $prometheus_conf_dir $prometheus_conf_dir/file_sd_targets \\\n $prometheus_conf_dir/rules $prometheus_data_dir\n\n wget https://github.com/prometheus/prometheus/releases/download/v$latest_version/prometheus-$latest_version.linux-amd64.tar.gz\n tar xvf prometheus-$latest_version.linux-amd64.tar.gz\n mv prometheus-$latest_version.linux-amd64/* $prometheus_conf_dir\n chown -R prometheus:prometheus $prometheus_conf_dir $prometheus_data_dir\n mv $prometheus_conf_dir/{prometheus,promtool} /usr/local/bin\n ## cleanup\n rm prometheus-$latest_version.linux-amd64.tar.gz\n rmdir prometheus-$latest_version.linux-amd64\n\n ## backup config before updating\n cp $prom_conf{,.bak}\n sed -i -e '/- job_name: \"prometheus\"/ s/^/#/' $prom_conf\n sed -i -e '/- targets:/ s/^/#/' $prom_conf\n sed -i -e '/static_configs/ s/^/#/g' $prom_conf\n ## add our config\n cat << EOF >> $prom_conf\n#########################################\n## Local Prometheus Instance - This Box #\n#########################################\n - job_name: local_prometheus\n scrape_interval: 3s\n file_sd_configs:\n - files:\n - file_sd_targets/local_prometheus.yml\n honor_labels: true\n relabel_configs:\n - regex: (.*)\n replacement: \\${1}:9100\n source_labels:\n - __address__\n target_label: __address__\n - regex: (.+)\n replacement: \\${1}\n source_labels:\n - __instance\n target_label: instance\nEOF\n ## add to file_sd_targets\n cat << EOF >> $file_sd_targets/local_prometheus.yml\n- labels:\n __instance: prometheus\n cluster: local\n targets:\n - 127.0.0.1\nEOF\n cat << EOF > /etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nGroup=prometheus\nType=simple\nExecStart=/usr/local/bin/prometheus \\\n--config.file /etc/prometheus/prometheus.yml \\\n--storage.tsdb.path $prometheus_data_dir/ \\\n--web.console.templates=$prometheus_conf_dir/consoles \\\n--web.console.libraries=$prometheus_conf_dir/console_libraries \\\n--web.listen-address=127.0.0.1:9090 \\\n--web.external-url=https://$FQDN/prometheus \\\n--storage.tsdb.retention=60d\nRestart=always\nExecReload=/usr/bin/kill -HUP \\$MAINPID\nTimeoutStopSec=20s\nOOMScoreAdjust=-900\nSendSIGKILL=no\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start prometheus\n systemctl enable prometheus\n\n ## protect with htpasswd\n prometheus_htpasswd=$(openssl rand -base64 32)\n htpasswd -cb $prometheus_htpasswd_file prometheus $prometheus_htpasswd\n ## log credentials locally\n cat << EOF >> $creds\n#################\n# Prometheus #\n#################\nLocation: https://$FQDN/prometheus\nUsername: prometheus\nPassword: $prometheus_htpasswd\nEOF\n ## sanity check\n function fallback {\n echo \"[FATAL] Creating custom configuration failed. Restoring old configuration\"\n cp $prom_conf{.bak,}\n systemctl restart prometheus\n sleep 2\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[CRITICAL] Encoutered unexpected error while configuring Prometheus. Please reach out to Support.\"\n exit 2\n fi\n }\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[ERROR] Prometheus is not running. Falling back to default config..\"\n fallback\n fi\n\n}\n\nfunction configure_grafana {\n echo \"[info] configuring Grafana - Installing Packages\"\n apt-get install -y apt-transport-https \\\n software-properties-common \\\n wget \\\n gnupg2 \\\n sqlite3\n\n wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\n echo \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\n apt-get -y update\n apt-get -y install grafana\n\n ## reset Grafana admin password\n grafana_password=$(openssl rand -base64 32)\n\n echo \"[info] updating grafana config\"\n sed -i -e 's/;admin_user = admin/admin_user = admin/g' /etc/grafana/grafana.ini\n sed -i \"s|;admin_password = admin|admin_password = $grafana_password|g\" /etc/grafana/grafana.ini\n\n echo \"[info] starting grafana-server\"\n systemctl start grafana-server\n systemctl enable grafana-server\n\n ## log credentials locally\n cat << EOF >> $creds\n##############\n# Grafana #\n##############\nLocation: https://$FQDN/\nUsername: admin\nPassword: $grafana_password\nEOF\n}\n\nfunction ssl_grafana {\n apt install -y certbot python3-certbot-nginx\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n add_firewalls\n configure_nginx\n install_node_exporter\n configure_prometheus\n configure_grafana\n ssl_grafana\n}\n\n## execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This email is for the LetsEncrypt SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":607034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus One-Click","description":"Prometheus One Click App","ordinal":92,"logo_url":"assets/prometheus.svg","images":["linode/debian10"],"deployments_total":354,"deployments_active":12,"is_public":true,"mine":false,"created":"2019-10-29T20:59:30","updated":"2023-11-09T03:43:27","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prometheus\ngroupadd --system prometheus\nuseradd -s /sbin/nologin --system -g prometheus prometheus\nmkdir /var/lib/prometheus\nfor i in rules rules.d files_sd; do mkdir -p /etc/prometheus/${i}; done\napt-get -y install wget\nmkdir -p /tmp/prometheus && cd /tmp/prometheus\ncurl -s https://api.github.com/repos/prometheus/prometheus/releases/latest \\\n | grep browser_download_url \\\n | grep linux-amd64 \\\n | cut -d '\"' -f 4 \\\n | wget -qi -\ntar xvf prometheus*.tar.gz\ncd prometheus*/\nmv prometheus promtool /usr/local/bin/\nmv prometheus.yml /etc/prometheus/prometheus.yml\nmv consoles/ console_libraries/ /etc/prometheus/\ncd ~/\nrm -rf /tmp/prometheus\n\n# Edit Prometheus config\nsudo tee /etc/prometheus/prometheus.yml</etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nType=simple\nUser=prometheus\nGroup=prometheus\nExecReload=/bin/kill -HUP $MAINPID\nExecStart=/usr/local/bin/prometheus \\\n --config.file=/etc/prometheus/prometheus.yml \\\n --storage.tsdb.path=/var/lib/prometheus \\\n --web.console.templates=/etc/prometheus/consoles \\\n --web.console.libraries=/etc/prometheus/console_libraries \\\n --web.listen-address=0.0.0.0:9090 \\\n --web.external-url=\n\nSyslogIdentifier=prometheus\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nfor i in rules rules.d files_sd; do chown -R prometheus:prometheus /etc/prometheus/${i}; done\nfor i in rules rules.d files_sd; do chmod -R 775 /etc/prometheus/${i}; done\nchown -R prometheus:prometheus /var/lib/prometheus/\n\n# Add node_exporter & Enable services\ncurl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest \\\n| grep browser_download_url \\\n| grep linux-amd64 \\\n| cut -d '\"' -f 4 \\\n| wget -qi -\n\ntar -xvf node_exporter*.tar.gz\ncd node_exporter*/\ncp node_exporter /usr/local/bin\nnode_exporter --version\n\ncat </etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n\n[Install]\nWantedBy=default.target\nEND\n\nsystemctl daemon-reload\nsystemctl start prometheus\nsystemctl enable prometheus\nsystemctl start node_exporter\nsystemctl enable node_exporter\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":688890,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"RabbitMQ One-Click","description":"RabbitMQ One-Click","ordinal":93,"logo_url":"assets/rabbitmq.svg","images":["linode/debian10"],"deployments_total":388,"deployments_active":51,"is_public":true,"mine":false,"created":"2020-11-17T20:53:00","updated":"2023-11-14T19:29:44","rev_note":"","script":"#!/bin/bash\n#\n#\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n## Install prerequisites\napt-get install curl gnupg -y\n\n## Get RabbitMQ \n$ curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -\nsudo apt-key adv --keyserver \"hkps://keys.openpgp.org\" --recv-keys \"0x0A9AF2115F4687BD29803A206B73A36E6026DFCA\"\n## Install apt HTTPS transport\napt-get install apt-transport-https\n\n## Add Bintray repositories that provision latest RabbitMQ and Erlang 23.x releases\ntee /etc/apt/sources.list.d/bintray.rabbitmq.list <\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# System Update\nset_hostname\napt_setup_update\n\nfunction install_redis {\n apt install -y redis-server\n systemctl enable redis-server\n}\n\nfunction redis_config {\n sed -ie \"s/supervised no/supervised systemd/g\" /etc/redis/redis.conf\n sed -ie \"s/appendonly no/appendonly yes/g\" /etc/redis/redis.conf\n systemctl restart redis-server\n}\n\nfunction main {\n install_redis\n redis_config\n}\nmain\n\n# cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1132204,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Marketplace App for Redis® Sentinel Cluster One-Click","description":"Redis Sentinel One-Click Cluster","ordinal":95,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":134,"deployments_active":7,"is_public":true,"mine":false,"created":"2023-02-27T20:05:44","updated":"2023-11-15T00:24:00","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/redis-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\n\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\n\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\n\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\n\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Redis CA"},{"name":"common_name","label":"Common Name","default":"Redis Server"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Redis cluster size","default":"3","oneof":"3,5"}]},{"id":923036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Restyaboard One-Click","description":"Restyaboard One-Click","ordinal":96,"logo_url":"assets/restyaboard.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04"],"deployments_total":207,"deployments_active":2,"is_public":true,"mine":false,"created":"2021-10-18T01:07:09","updated":"2023-11-10T01:20:57","rev_note":"","script":"#!/bin/bash\n#\n# Install script for Restyaboard\n#\n# Usage: ./restyaboard.sh\n#\n# Copyright (c) 2014-2021 Restya.\n# Dual License (OSL 3.0 & Commercial License)\n{\n\tmain() {\n\t\tif [[ $EUID -ne 0 ]];\n\t\tthen\n\t\t\techo \"This script must be run as root\"\n\t\t\texit 1\n\t\tfi\n\t\tset -x\n\t\twhoami\n\t\t#\n\t\t# Checking the OS name and OS version\n\t\t#\n\t\tfind_release ()\n\t\t{\n\t\t\t# Checking the Ubuntu OS\n\t\t\tif [ -f /etc/lsb-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`grep DISTRIB_ID /etc/lsb-release`\"\n\t\t\t\tDISTRIB_ID='DISTRIB_ID='\n\t\t\t\tOS_NAME=$OS_REQUIREMENT$DISTRIB_ID\n\t\t\t\tarray=();\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" != \"$DISTRIB_ID\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_NAME ]]; do\n\t\t\t\t\tarray+=( \"${OS_NAME%%\"$DISTRIB_ID\"*}\" );\n\t\t\t\t\tOS_NAME=${OS_NAME#*\"$DISTRIB_ID\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_REQUIREMENT=${array[1]}\n\t\t\t\tfi\n\t\t\t\tOS_VERSION=\"`grep DISTRIB_RELEASE /etc/lsb-release`\"\n\t\t\t\tDISTRIB_RELEASE='DISTRIB_RELEASE='\n\t\t\t\tOS_Ver=$OS_VERSION$DISTRIB_RELEASE\n\t\t\t\tversion=();\n\t\t\t\tif ([ \"$OS_VERSION\" != \"$DISTRIB_RELEASE\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_Ver ]]; do\n\t\t\t\t\tversion+=( \"${OS_Ver%%\"$DISTRIB_RELEASE\"*}\" );\n\t\t\t\t\tOS_Ver=${OS_Ver#*\"$DISTRIB_RELEASE\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_VERSION=${version[1]}\n\t\t\t\tfi\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Redhat, Fedora, and Centos\n\t\t\tif [ -f /etc/redhat-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/redhat-release | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/redhat-release | cut -d ' ' -f 4 | cut -d '.' -f 1`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Debian OS\n\t\t\tif [ -f /etc/issue ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/issue | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/issue | cut -d ' ' -f 3`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the OpenBSD \n\t\t\tif [ -f /etc/motd ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/motd | head -1 | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/motd | head -1 | cut -d ' ' -f 2`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t}\n\t\tfindbin ()\n {\n ret=0\n newpath=`echo $PATH | tr : ' '`\n for i in ${newpath}; do\n\t\t\t\tif [ -x $i/$1 ]; then\n\t\t\t\t\tret=1\n\t\t\t\t\tbreak\n\t\t\t\tfi\n done\n echo $ret\n return \n }\n checkdeps()\n {\n pkginfo=\"dpkg rpm ipkg pkg_info\"\n for i in $pkginfo; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n\t\t\t\t\tpkginfo=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that for listing packages\"\n\t\t\t\t\tbreak\n fi\n done\n\n if [ ${pkginfo} = \"pkg_info\" ]; then\n # BSD needs PKG_PATH set to load anything over the net.\n if [ x${PKG_PATH} = x ]; then\n\t\t\t\t\techo \"Please set the environment variable PKG_PATH and try again.\"\n\t\t\t\t\texit 1\n fi\n fi\n \n \n pkg_name=\"yum apt-get ipkg pkg_add\"\n for i in ${pkg_name}; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n pkg_name=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that to install packages\"\n\t\t\t\t\tbreak\n fi\n done\n \n\n for i in ${genericdeps} ${gtkdeps} ${kdedeps}; do\n case $pkginfo in\n dpkg)\n deps=\"`dpkg -l \"*$i*\" | grep -- \"^ii\" | cut -d ' ' -f 3`\"\n ;;\n rpm)\n deps=\"`rpm -q $i`\"\n ;;\n pkg_info)\n deps=\"`pkg_info | grep \"$i\" | sed -e 's: .*$::'`\"\n ;;\n ipkg)\n deps=\"todo\"\n ;;\n *)\n echo \"ERROR: No package manager found!\"\n exit 1\n ;;\n esac\n found=`echo ${deps} | grep -v 'not installed' | grep -c \"${i}\" 2>&1`\n if [ $found -gt 0 ]; then\n \techo \"Yes, found $i\"\n else\n\t\t\t\t\techo \"Nope, $i appears to not be installed\"\n\t\t\t\t\tmissing=\"${missing} $i\"\n fi\n done\n\n if [ -n \"${missing}\" ]; then\n echo \"package(s)\\\"${missing}\\\" are missing!\"\n echo \"You will need sudo priviledges to install the packages\"\n if [ x$yes = xno ]; then\n \t$debug sudo ${pkgnet} install ${missing}\n else\n \t$debug sudo ${pkgnet} -y install ${missing}\n fi\n fi\n }\n\t\tinstall_nginx() \n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n apt install -y cron nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"nginx installation failed with error code ${error_code} (nginx installation failed with error code 2)\"\n return 2\n fi\n if [ -f \"/etc/nginx/conf.d/default\" ]; then\n rm -rf /etc/nginx/conf.d/default\n fi\n if [ -f \"/etc/nginx/sites-enabled/default\" ]; then\n rm -rf /etc/nginx/sites-enabled/default\n fi\n if [ -f \"/etc/nginx/sites-available/default\" ]; then\n rm -rf /etc/nginx/sites-available/default\n fi\n service nginx start\n fi\n\t\t\telse\t\t\t\t\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n rpm -Uvh \"http://nginx.org/packages/centos/${OS_VERSION}/noarch/RPMS/nginx-release-centos-${OS_VERSION}-0.el${OS_VERSION}.ngx.noarch.rpm\"\n yum install -y zip cronie nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"cron nginx installation failed with error code ${error_code} cron nginx installation failed with error code 18\"\n return 18\n fi\n if [ -f \"/etc/nginx/conf.d/default.conf\" ]; then\n rm -rf /etc/nginx/conf.d/default.conf\n fi\n if [ -f \"/etc/nginx/sites-enabled/default.conf\" ]; then\n rm -rf /etc/nginx/sites-enabled/default.conf\n fi\n if [ -f \"/etc/nginx/sites-available/default.conf\" ]; then\n rm -rf /etc/nginx/sites-available/default.conf\n fi\n service nginx start\n chkconfig --levels 35 nginx on\n fi\n\t\t\tfi\n\t\t}\n\t\tinstall_php()\n\t\t{\n\t\t\tif ! hash php 2>&-; then\n\t\t\t\techo \"PHP is not installed!\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\t\t\t\t\t\t\t\n echo \"Installing PHP...\"\n apt install -y php7.4 php7.4-common --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"PHP installation failed with error code ${error_code} (PHP installation failed with error code 3)\"\n return 3\n fi\n else \n if ([ \"$pkg_name\" = \"yum\" ])\n then\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n echo \"Note: For the latest version of PHP, we're going to download https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm and https://rpms.remirepo.net/enterprise/remi-release-8.rpm.\"\n echo \"Installing PHP...\"\n dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm\n dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\n dnf module enable php:remi-7.4\n dnf -y install php php-cli php-common\n else\n yum install -y epel-release\n echo \"Note: For the latest version of PHP, we're going to download http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm.\"\n echo \"Installing PHP...\"\n rpm -Uvh \"http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm\"\n yum --enablerepo=remi-php74 install -y php\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"php installation failed with error code ${error_code} (php installation failed with error code 20)\"\n return 20\n fi\n fi\n fi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Installing PHP fpm and cli extension...\"\n\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\tthen\n\t\t\t\tapt install -y php7.4-fpm php7.4-cli --allow-unauthenticated\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"php7.4-cli installation failed with error code ${error_code} (php7.4-cli installation failed with error code 4)\"\n\t\t\t\tfi\n\t\t\t\tservice php7.4-fpm start\n\t\t\telse \n\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\tthen\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n \t\t\tthen\n\t\t\t\t\t\tdnf -y install php-fpm php-devel php-opcache\n\t\t\t\t\t\tdnf -y install php-json\n\t\t\t\t\telse\n\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-fpm php-devel php-cli php-opcache\n\t\t\t\t\tfi\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php-devel installation failed with error code ${error_code} (php-devel installation failed with error code 21)\"\n\t\t\t\t\t\treturn 21\n\t\t\t\t\tfi\t\t\t\t\t\n\t\t\t\t\tservice php-fpm start\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"....\"\n\t\t\telse\n\t\t\t\tchkconfig --levels 35 php-fpm on\t\t\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP curl extension...\"\n\t\t\tphp -m | grep curl\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-curl...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-curl --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-curl installation failed with error code ${error_code} (php7.4-curl installation failed with error code 5)\"\n\t\t\t\t\t\treturn 5\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-curl\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-curl\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-curl installation failed with error code ${error_code} (php-curl installation failed with error code 22)\"\n\t\t\t\t\t\t\treturn 22\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP pgsql extension...\"\n\t\t\tphp -m | grep pgsql\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-pgsql...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install libpq5\n\t\t\t\t\tapt install -y php7.4-pgsql --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-pgsql installation failed with error code ${error_code} (php7.4-pgsql installation failed with error code 6)\"\n\t\t\t\t\t\treturn 6\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pgsql\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pgsql\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-pgsql installation failed with error code ${error_code} (php-pgsql installation failed with error code 23)\"\n\t\t\t\t\t\t\treturn 23\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP mbstring extension...\"\n\t\t\tphp -m | grep mbstring\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-mbstring...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-mbstring --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-mbstring installation failed with error code ${error_code} (php7.4-mbstring installation failed with error code 7)\"\n\t\t\t\t\t\treturn 7\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-mbstring\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-mbstring\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-mbstring installation failed with error code ${error_code} (php-mbstring installation failed with error code 24)\"\n\t\t\t\t\t\t\treturn 24\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP ldap extension...\"\n\t\t\tphp -m | grep ldap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-ldap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-ldap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-ldap installation failed with error code ${error_code} (php7.4-ldap installation failed with error code 8)\"\n\t\t\t\t\t\treturn 8\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-ldap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-ldap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-ldap installation failed with error code ${error_code} (php-ldap installation failed with error code 25)\"\n\t\t\t\t\t\t\treturn 25\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imagick extension...\"\n\t\t\tphp -m | grep imagick\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-imagick...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y gcc\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"gcc installation failed with error code ${error_code} (gcc installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y imagemagick\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"imagemagick installation failed with error code ${error_code} (imagemagick installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y php7.4-imagick --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imagick installation failed with error code ${error_code} (php7.4-imagick installation failed with error code 10)\"\n\t\t\t\t\t\treturn 10\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tyum install -y ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pear\n\t\t\t\t\t\t\tdnf -y install php-gd\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pear\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-gd\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"Installing php-imagick failed with error code ${error_code} (Installing php-imagick failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\n\t\t\t\t\t\tcd /usr/local/src\n\t\t\t\t\t\twget http://pecl.php.net/get/imagick-2.2.2.tgz\n\t\t\t\t\t\ttar zxvf ./imagick-2.2.2.tgz\n\t\t\t\t\t\tcd imagick-2.2.2\n\t\t\t\t\t\tphpize\n\t\t\t\t\t\t./configure\n\t\t\t\t\t\tmake\n\t\t\t\t\t\tmake test\n\t\t\t\t\t\tmake install\n\t\t\t\t\t\techo \"extension=imagick.so\" >> /etc/php.ini\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imap extension...\"\n\t\t\tphp -m | grep imap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php7.4-imap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-imap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imap installation failed with error code ${error_code} (php7.4-imap installation failed with error code 11)\"\n\t\t\t\t\t\treturn 11\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-imap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-imap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-imap installation failed with error code ${error_code} (php-imap installation failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking xml...\"\n\t\t\tphp -m | grep xml\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing xml...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install php7.4-xml --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 56)\"\n\t\t\t\t\t\treturn 56\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-xml\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-xml\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 57)\"\n\t\t\t\t\t\t\treturn 57\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_timezone()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\ttimezone=$(cat /etc/timezone)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php/7.4/fpm/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php/7.4/fpm/php.ini\n\t\t\telse \n\t\t\t\tPHP_VERSION=$(php -v | grep \"PHP 5\" | sed 's/.*PHP \\([^-]*\\).*/\\1/' | cut -c 1-3)\n\t\t\t\techo \"Installed PHP version: '$PHP_VERSION'\"\n\t\t\t\ttimezone=$(cat /etc/sysconfig/clock | grep ZONE | cut -d\"\\\"\" -f2)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php.ini\n\t\t\tfi\n\t\t}\n\t\tinstall_postgresql()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tid -a postgres\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]; then\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n sh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n apt install wget ca-certificates\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n fi\n wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n apt-key add ACCC4CF8.asc\n apt update\n apt install -y postgresql --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n return 13\n fi\n\t\t\t\telse\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ 1 -eq \"$(echo \"${PSQL_VERSION} < 9.3\" | bc)\" ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tsh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n\t\t\t\t\t\tapt install wget ca-certificates\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n\t\t\t\t\t\tfi\n\t\t\t\t\t\twget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n\t\t\t\t\t\tapt-key add ACCC4CF8.asc\n\t\t\t\t\t\tapt update\n\t\t\t\t\t\tapt upgrade\n\t\t\t\t\t\tapt install -y postgresql --allow-unauthenticated\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n\t\t\t\t\t\t\treturn 13\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\tfi\n\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf > /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf.1\n\t\t\t\tcd /etc/postgresql/${PSQL_VERSION}/main || exit\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tservice postgresql restart\n\t\t\telse\n\t\t\t\tif ! which psql > /dev/null 2>&1;\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n if [ $(getconf LONG_BIT) = \"64\" ]; then\n if [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n dnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n else\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n then\n yum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n fi\n fi\n fi\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n dnf module enable postgresql:13\n dnf -y install postgresql-server postgresql-contrib postgresql-libs\n else\n yum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\t\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql13 installation failed with error code ${error_code} (postgresql13 installation failed with error code 29)\"\n return 29\n fi\n\t\t\t\telse \n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tif [[ $PSQL_VERSION < 9.3 ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tif [ $(getconf LONG_BIT) = \"64\" ]; then\n\t\t\t\t\t\t\tif [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n\t\t\t\t\t\t\t\tdnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n\t\t\t\t\t\t\t\tthen\n\t\t\t\t\t\t\t\t\tyum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf module enable postgresql:13\n\t\t\t\t\t\t\tdnf -y install postgresql-server postgresql-contrib postgresql-libs\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 29)\"\n\t\t\t\t\t\t\treturn 29\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^13\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=13\n\t\t\t\tfi\n\t\t\t\tPSQL_FOLDER=$(echo ${PSQL_VERSION} | sed 's/\\.//')\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tpostgresql-setup --initdb\n\t\t\t\telse\n\t\t\t\t\t\"/usr/pgsql-${PSQL_VERSION}/bin/postgresql-${PSQL_VERSION}-setup\" initdb\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl enable postgresql\n\t\t\t\t\tsystemctl start postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl start \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\t\tsystemctl enable \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" start\n\t\t\t\t\t\tchkconfig --levels 35 \"postgresql-${PSQL_VERSION}\" on\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/data/pg_hba.conf\" > \"/var/lib/pgsql/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/data\" || exit\n\t\t\t\telse\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf\" > \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/${PSQL_VERSION}/data\" || exit\n\t\t\t\tfi\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl restart postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl restart \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_geoip()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tif ! hash GeoIP-devel 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-geoip php7.4-dev libgeoip-dev\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code ${error_code} (php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code 50)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\techo \"extension=geoip.so\" >> /etc/php.ini\n\n\t\t\t\tmkdir -v /usr/share/GeoIP\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"GeoIP folder creation failed with error code ${error_code} (GeoIP folder creation failed with error code 52)\"\n\t\t\t\tfi\n\t\t\t\tget_geoip_data\n\t\t\telse\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\t\treturn 47\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tconfigure_restyaboard()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n echo \"Changing server_name in nginx configuration...\"\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\telse\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\tfi\n\t\t}\n\t\tinstall_postfix()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Installing postfix...\"\n\t\t\t\techo \"postfix postfix/mailname string $IPADDR\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\techo \"postfix postfix/main_mailer_type string 'Internet Site'\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\tapt install -y postfix\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"postfix installation failed with error code ${error_code} (postfix installation failed with error code 16)\"\n\t\t\t\tfi\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/fpm/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/fpm/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/cli/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/cli/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php.ini\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tchange_permission()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/media/ $RESTYABOARD_DIR/tmp/cache/ $RESTYABOARD_DIR/client/img/\n\t\t\t\tchcon -Rv --type=httpd_t $RESTYABOARD_DIR/\n\t\t\tfi\n\t\t}\n\t\tpsql_connect()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 34)\"\n\t\t\t\t\treturn 34\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 35)\"\n\t\t\t\t\treturn 35\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 36)\"\n\t\t\t\t\treturn 36\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 37)\"\n\t\t\t\t\treturn 37\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 39)\"\n\t\t\t\t\t\treturn 39\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 40)\"\n\t\t\t\t\treturn 40\n\t\t\t\tfi\t\t\t\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 41)\"\n\t\t\t\t\treturn 41\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 42)\"\n\t\t\t\t\treturn 42\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 43)\"\n\t\t\t\t\treturn 43\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\tif [ \"$?\" = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 45)\"\n\t\t\t\t\t\treturn 45\n\t\t\t\t\tfi\t\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P allow_postfix_local_write_mail_spool 1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tphp_fpm_reset()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \".........\"\n\t\t\telse\n\t\t\t\techo \"Reset php-fpm (use unix socket mode)...\"\n\t\t\t\tif [ -f \"/run/php/php7.4-fpm.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php\\/php7.4-fpm.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\telif [ -f \"/run/php-fpm/www.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php-fpm\\/www.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/unix:\\/run\\/php-fpm\\/www.sock/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\telse\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/127.0.0.1:9000/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_jq()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tapt install -y jq\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 53)\"\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tyum install -y jq\n\t\t\t\terror_code\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 49)\"\n\t\t\t\t\treturn 49\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_db_connection()\n\t\t{\t\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Starting services...\"\n\t\t\t\tservice cron restart\n\t\t\t\tservice php7.4-fpm restart\n\t\t\t\tservice nginx restart\n\t\t\t\tservice postfix restart\n\t\t\t\tapt install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\telse\n\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\telse\n\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\tfi\n\t\t\t\tyum install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P httpd_can_network_connect_db=1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tssl_connectivity()\n\t\t{\n\t\t\tif [[ $IPADDR =~ ^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$ ]]; then\n\t\t\t\techo \"SSL connectivity cannot be set for IP address\"\n\t\t\telse\n\t\t\t\tset +x\n\t\t\t\techo \"Do you want to set up SSL connectivity for your domain and your domain should be publicly accessible Restyaboard instance and your domain should be mappped to this Restyaboard Server, Note: If you're trying to set SSL for Non-publicly accessible instance, then your Restyaboard will not work (y/n)?\"\n\t\t\t\tread -r answer\n\t\t\t\tset -x\n\t\t\t\tcase \"${answer}\" in\n\t\t\t\t\t[Yy])\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tapt install certbot python3-certbot-nginx -y\n\t\t\t\t\t\tservice nginx restart\n\t\t\t\t\t\tservice php7.4-fpm restart\n\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\telse\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install epel-release\n\t\t\t\t\t\t\tdnf -y install certbot python3-certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y epel-release\n\t\t\t\t\t\t\tyum install certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"SSL installation failed with error code ${error_code} (php installation failed with error code 20)\"\n\t\t\t\t\t\t\treturn 20\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tesac\n\t\t\tfi\n\t\t}\n\t\tfind_release\n\t\tcheckdeps\n\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n then\n\t\t\tapt update\n apt install -y net-tools\n\t\t\tapt install -y curl unzip\n\t\telse\n\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n \tthen\n yum install -y net-tools\n\t\t\t\tyum install -y curl unzip\n\t\t\tfi\n\t\tfi\n IFCONFIG_PATH=$(which ifconfig)\n IPADDR=$(${IFCONFIG_PATH} eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n\t\tRESTYABOARD_VERSION=$(curl --silent https://api.github.com/repos/RestyaPlatform/board/releases | grep tag_name -m 1 | awk '{print $2}' | sed -e 's/[^v0-9.]//g')\n\t\tPOSTGRES_DBHOST=localhost\n\t\tPOSTGRES_DBNAME=restyaboard\n\t\tPOSTGRES_DBUSER=restya\n\t\tPOSTGRES_DBPASS=hjVl2!rGd\n\t\tPOSTGRES_DBPORT=5432\n\t\tDOWNLOAD_DIR=/opt/restyaboard\n RESTYABOARD_DIR=/usr/share/nginx/html/restyaboard\n\t\t\n\t\tget_geoip_data () \n\t\t{\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIP.dat.gz\n\t\t\tgunzip GeoIP.dat.gz\n\t\t\tmv GeoIP.dat /usr/share/GeoIP/GeoIP.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz\n\t\t\tgunzip GeoIPv6.dat.gz\n\t\t\tmv GeoIPv6.dat /usr/share/GeoIP/GeoIPv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.xz\n\t\t\tunxz GeoLiteCity.dat.xz\n\t\t\tmv GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCityv6.dat.gz\n\t\t\tgunzip GeoLiteCityv6.dat.gz\n\t\t\tmv GeoLiteCityv6.dat /usr/share/GeoIP/GeoLiteCityv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNum.dat.gz\n\t\t\tgunzip GeoIPASNum.dat.gz\n\t\t\tmv GeoIPASNum.dat /usr/share/GeoIP/GeoIPASNum.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNumv6.dat.gz\n\t\t\tgunzip GeoIPASNumv6.dat.gz\n\t\t\tmv GeoIPASNumv6.dat /usr/share/GeoIP/GeoIPASNumv6.dat\n\t\t}\n\n\t\tupgrade-0.3-0.4()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.4-0.4.1()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.5.2-0.6()\n\t\t{\n\t\t\tsed -i \"s/rewrite ^\\/ical\\/.*/rewrite ^\\/ical\\/([0-9]*)\\/([0-9]*)\\/([a-z0-9]*).ics\\$ \\/server\\/php\\/ical.php?board_id=\\$1\\&user_id=\\$2\\&hash=\\$3 last;/\" /etc/nginx/conf.d/restyaboard.conf\n\t\t}\n\n\t\tupgrade-0.6.3-0.6.4()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_created_date\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_created_date/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.4-0.6.5()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_id\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_id/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.2.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.5-0.6.6()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\t\t\n\t\tupgrade-0.6.6-0.6.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_card_counter-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_card_counter-v0.1.1.zip\n\t\t\tunzip /tmp/r_card_counter-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.2.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_eu_gdpr-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_eu_gdpr-v0.1.2.zip\n\t\t\tunzip /tmp/r_eu_gdpr-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.1.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\t\t\t\n\t\t\t\n\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.3.zip\n\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\t: > /var/spool/cron/crontabs/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n\t\t\telse\n\t\t\t\t: > /var/spool/cron/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.7-0.6.8(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.3.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\n\t\tupgrade-0.6.8-0.6.9(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.4.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.4.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.4.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\t\tupgrade-0.6.9-1.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_togetherjs\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_togetherjs/\n\t\t\tfi\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.5.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.5.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.5.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.2.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\n\t\t\techo \"Applying permission...\"\n\t\t\tuseradd restyaboard\n\t\t\tusermod --password 'hjVl2!rGd' restyaboard\n\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tuser www-data;\n\t\t\t\tusermod -a -G restyaboard www-data\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\telse\n\t\t\t\tuser nginx;\n\t\t\t\tusermod -a -G restyaboard nginx\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\tfi\n\t\t\tchown -R restyaboard:restyaboard $RESTYABOARD_DIR\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n\t\t\tchmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tfi\n\t\t}\n\n\t\tupdate_version()\n\t\t{\n\t\t\tset +x\n\t\t\techo -e \"A newer version ${RESTYABOARD_VERSION} of Restyaboard is available.\\n\\nImportant: Please note that upgrading will remove any commercial apps that were free in previous version.\\nFor more details about commercial apps, please visit https://restya.com/board/pricing\\n\\nDo you want to get it now y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tset +x\n\t\t\t\tset -x\n\t\t\t\t\n\t\t\t\techo \"Downloading files...\"\n\t\t\t\tcurl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n\t\t\t\tunzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n\t\t\t\t\n\t\t\t\techo \"Updating files...\"\n\t\t\t\tcp -r ${DOWNLOAD_DIR}/. \"$RESTYABOARD_DIR\"\n\t\t\t\t\n\t\t\t\techo \"Connecting database to run SQL changes...\"\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$? \n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database connection failed with error code ${error_code} (PostgreSQL database connection failed with error code 32)\"\n\t\t\t\t\treturn 32\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\t\n\t\t\t\techo \"Changing PostgreSQL database name, user and password...\"\n\t\t\t\tsed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\t\tdeclare -a upgrade;\n\t\t\t\tif [[ $version < \"v0.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.3-0.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.4.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4-0.4.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4.2-0.5\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.1-0.5.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.2-0.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6-0.6.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.1-0.6.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.3\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.2-0.6.3\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.3-0.6.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.4-0.6.5\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v0.6.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.5-0.6.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tset +x\n\t\t\t\t\techo \"Before updating make sure to remove duplicate username's and emails used by more than one user, otherwise unique indexing for users will be thrown an error But all other queries will be executed without any issue.\"\n\t\t\t\t\tread -r -s -p $'Press [Enter] key to continue...'\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.6-0.6.7\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.8\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.7-0.6.8\")\n\t\t\t\tfi\t\t \n\t\t\t\tif [[ $version < \"v0.6.9\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.8-0.6.9\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v1.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.9-1.7\")\n\t\t\t\tfi\n\t\t\t\t# use for loop to read all values and indexes\n\t\t\t\tfor i in \"${upgrade[@]}\"\n\t\t\t\tdo\n\t\t\t\t\tif [ \"$(type -t ${i})\" = function ];\n\t\t\t\t\tthen\n\t\t\t\t\t\teval ${i}\n\t\t\t\t\tfi\n\t\t\t\t\tif [ -f \"$RESTYABOARD_DIR/sql/${i}.sql\" ];\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"Updating SQL...\"\n\t\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/${i}.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"PostgreSQL updation of SQL failed with error code ${error_code} (PostgreSQL updation of SQL failed with error code 33)\"\n\t\t\t\t\t\t\treturn 33\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tdone\n\t\t\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\tthen\t\t\t\t \n service nginx restart\n\t\t\t\t\tservice php${PHP_VERSION}-fpm restart\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\telse\n\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\tesac\n\t\t}\n\n\t\tif [ -f \"$DOWNLOAD_DIR/release\" ];\n\t\tthen\n\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\tif [[ $version < $RESTYABOARD_VERSION ]];\n\t\t\tthen\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\telse\n\t\t\t\techo \"No new version available\"\n\t\t\t\texit;\n\t\t\tfi\n\t\telse\n\t\t\tset +x\n\t\t\techo \"Is Restyaboard already installed and configured/working y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\tesac\n\t\tfi\n\n if ([ \"$OS_REQUIREMENT\" = \"Debian\" ])\n then\n sed -i -e 's/deb cdrom/#deb cdrom/g' /etc/apt/sources.list\n sh -c 'echo \"deb http://ftp.de.debian.org/debian jessie main\" > /etc/apt/sources.list.d/debjessie.list'\n apt install apt-transport-https lsb-release ca-certificates -y\n wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg\n echo \"deb https://packages.sury.org/php/ $(lsb_release -sc) main\" | tee /etc/apt/sources.list.d/php.list\n fi\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n apt install debian-keyring debian-archive-keyring -y\n apt update -y\n apt upgrade -y\n apt install python-software-properties -y\n apt install software-properties-common -y\n if ! hash php 2>&-; then\n add-apt-repository -y ppa:ondrej/php\n apt update -y\n apt install libjpeg8 -y --allow-unauthenticated\n fi\n fi\n install_nginx\n \n echo \"Checking PHP...\"\n install_php\n\n echo \"Setting up timezone...\"\n set_timezone\n \n echo \"Checking PostgreSQL...\"\n install_postgresql\n\n install_geoip\n \n echo \"Downloading Restyaboard script...\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\n apt install -y curl\n fi\n mkdir ${DOWNLOAD_DIR}\n curl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n unzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n rm /tmp/restyaboard.zip\n\n configure_restyaboard\n \n \n echo \"Copying Restyaboard script to root directory...\"\n cp -r ${DOWNLOAD_DIR}/* \"$RESTYABOARD_DIR\"\n \n install_postfix\n \n echo \"Changing permission...\"\n useradd restyaboard\n usermod --password 'hjVl2!rGd' restyaboard\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n user www-data;\n usermod -a -G restyaboard www-data\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n else\n user nginx;\n usermod -a -G restyaboard nginx\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n fi\n chown -R restyaboard:restyaboard $RESTYABOARD_DIR\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n chmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n change_permission\n\n psql_connect\n \n echo \"Changing PostgreSQL database name, user and password...\"\n sed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n \n echo \"Setting up cron for every 5 minutes..\"\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n else\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n fi\n php_fpm_reset\n \n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n service nginx restart\n service php7.4-fpm restart\n else\n if [ -f \"/bin/systemctl\" ]; then\n echo \"Starting services with systemd...\"\n systemctl restart nginx\n systemctl restart php-fpm\n else\n echo \"Starting services...\"\n /etc/init.d/php-fpm restart\n /etc/init.d/nginx restart\n fi\n fi\n set_db_connection\n\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\tthen\n\t\t\tssl_connectivity\n\t\telse\n\t\t\tssl_connectivity\n\t\tfi\n\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n\t\t\tsemanage permissive -a httpd_t\n\t\tfi\n\t\tset +x\n\t\techo \"Checking Hosting...\"\n\t\tresponse=$(curl -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2017-04-02 --write-out %{http_code} --connect-timeout 10 --max-time 10 --silent --output /dev/null)\n\t\t\n\t\tif [ -f /etc/ImageMagick-6/policy.xml ]; then\n \t\tsed -i -e 's///g' /etc/ImageMagick-6/policy.xml\n\t\tfi\n\n\t\tif [ -f /etc/ImageMagick/policy.xml ]; then\n\t\t\tsed -i -e 's///g' /etc/ImageMagick/policy.xml\n\t\tfi\n\n\t\tif [ ${response} -eq 200 ];then\n\t\t\techo \"Note: PHP Mailer will not work in Azure. Kindly use external SMTP mail server.\"\n\t\tfi\n\t\tset +x\n\t\tcurl -v -L -G -d \"app=board&os=${os}&version=${version}\" -k \"https://restya.com/success_installation.php\"\n\t\techo \"Restyaboard URL : $IPADDR\"\n\n\t\techo \"Login with username admin and password restya\"\n\t\texit 1\n\t}\n\tmain\n\terror=$?\n\tos=$(lsb_release -i -s)\n\tcurl -v -L -G -d \"app=board&os=${os}&error=${error}\" -k \"https://restya.com/error_installation.php\"\n\techo \"If you're finding it difficult to install Restyaboard from your end, we do also offer installation support that you may consider https://restya.com/contact\"\n\texit 1\n} 2>&1 | tee -a /tmp/restyaboard_install.log","user_defined_fields":[]},{"id":912264,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rocket.Chat One-Click","description":"Rocket.Chat One-Click","ordinal":97,"logo_url":"assets/rocketchat.svg","images":["linode/ubuntu20.04"],"deployments_total":1761,"deployments_active":93,"is_public":true,"mine":false,"created":"2021-09-29T17:16:16","updated":"2023-11-15T15:52:57","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nufw allow 3000\nfail2ban_install\n\n# Snapd & rocketchat install\napt install snapd -y\nsnap install rocketchat-server\nsnap info rocketchat-server\n\n# Check DNS\ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n# SSL\nsnap set rocketchat-server siteurl=https://$FQDN\nsystemctl enable --now snap.rocketchat-server.rocketchat-caddy \nsnap restart rocketchat-server\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA","default":""}]},{"id":609048,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ruby on Rails One-Click","description":"Ruby on Rails One-Click","ordinal":98,"logo_url":"assets/rubyonrails.svg","images":["linode/ubuntu20.04"],"deployments_total":454,"deployments_active":20,"is_public":true,"mine":false,"created":"2019-11-05T07:22:54","updated":"2023-11-15T05:03:40","rev_note":"Initial import","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Ruby on Rails\napt install -y ruby rails\n\n# Configure rails Directory\nmkdir /home/railsapp\ncd /home/railsapp\nrails new $RAILSAPP\ncd $RAILSAPP\nrails s -b 0.0.0.0 &\n\n# Start rails app on reboot\ncrontab -l | { cat; echo \"@reboot cd /home/railsapp/app1/ && rails s -b 0.0.0.0 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"railsapp","label":"Rails Application name","example":"railsapp"}]},{"id":401703,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rust One-Click","description":"Rust - Latest One-Click","ordinal":99,"logo_url":"assets/Rust.svg","images":["linode/ubuntu20.04"],"deployments_total":2440,"deployments_active":12,"is_public":true,"mine":false,"created":"2019-03-08T21:09:34","updated":"2023-11-15T02:40:45","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \nsource \n\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"rustserver\"\n\nset_hostname\napt_setup_update\n\n\nif [[ \"$RUSTHOSTNAME\" = \"\" ]]; then\n RUSTHOSTNAME=\"Linode Rust Server\"\nfi\n\nif [[ \"$LEVEL\" = \"Procedural Map\" ]]; then\n LEVEL=\"\"\nfi\n\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix curl \\\nwget file bzip2 gzip unzip bsdmainutils python \\\nutil-linux ca-certificates binutils bc jq tmux \\\nlib32gcc1 libstdc++6 libstdc++6:i386 lib32z1\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Rust\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\ncp /home/rustserver/lgsm/config-lgsm/rustserver/_default.cfg /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nchown -R rustserver:rustserver /home/rustserver/\n\necho \"server.globalchat $GLOBALCHAT/\" > /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.pve $PVE\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.description \\\"$DESCRIPTION\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.maxplayers $MAXPLAYERS\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.seed \\\"$SEED\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.level $LEVEL\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.hostname \\\"$RUSTHOSTNAME\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.ip $IP\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\nsed -i \"s/rconpassword=\\\"CHANGE_ME\\\"/rconpassword=\\\"$RCONPASSWORD\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/worldsize=\\\"3000\\\"/worldsize=\\\"$WORLDSIZE\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/maxplayers=\\\"50\\\"/maxplayers=\\\"$MAXPLAYERS\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\n\n\n# Start the service and setup firewall\nufw allow 28015\nufw allow 28016\n\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rusthostname","label":"Server Hostname","default":"Linode Rust Server"},{"name":"description","label":"Server Description","default":"Powered by Linode!"},{"name":"rconpassword","label":"RCON Password"},{"name":"maxplayers","label":"Maximum Players","oneof":"10,25,50,75,100","default":"50"},{"name":"level","label":"World","oneof":"Procedural Map,Barren,HapisIsland,SavasIsland_koth","default":"Procedural Map"},{"name":"worldsize","label":"World Size","oneof":"1000,3000,6000","default":"3000"},{"name":"seed","label":"Seed","default":"50000"},{"name":"globalchat","label":"Global Chat Enabled","oneof":"true,false","default":"true"},{"name":"pve","label":"PvE Enabled","oneof":"true,false","default":"false"}]},{"id":971042,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Saltcorn One-Click","description":"Saltcorn One-Click","ordinal":100,"logo_url":"assets/saltcorn.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":293,"deployments_active":9,"is_public":true,"mine":false,"created":"2022-02-08T16:21:05","updated":"2023-11-15T04:20:47","rev_note":"","script":"#!/bin/bash\n## Saltcorn Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction saltcorninstall {\n wget -qO - https://deb.nodesource.com/setup_14.x | sudo bash -\n apt-get install -qqy nodejs\n npx saltcorn-install -y\n systemctl enable saltcorn\n systemctl stop saltcorn\n cat < /lib/systemd/system/saltcorn.service\n[Unit]\nDescription=saltcorn\nDocumentation=https://saltcorn.com\nAfter=network.target\n\n[Service]\nType=notify\nWatchdogSec=5\nUser=saltcorn\nWorkingDirectory=/home/saltcorn\nExecStart=/home/saltcorn/.local/bin/saltcorn serve -p 8080\nRestart=always\nEnvironment=\"NODE_ENV=production\"\n\n[Install]\nWantedBy=multi-user.target\nEND\n systemctl daemon-reload\n systemctl start saltcorn\n}\n\nfunction firewallsaltcorn {\n ufw allow 22\n ufw allow 80\n ufw allow 443\n}\n\nfunction nginxreversesaltcorn {\n apt-get install nginx -y\n cat < /etc/nginx/conf.d/saltcorn.conf\nserver {\n listen 80;\n server_name $FQDN $IP;\n\n location / {\n proxy_set_header X-Forwarded-For \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:8080;\n }\n}\nEND\n nginx -t\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\n\nfunction ssl_saltcorn {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n saltcorninstall\n nginxreversesaltcorn\n firewallsaltcorn\n ssl_saltcorn\n\n}\n# Execute\nmain \nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for Letsencrypt SSL","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":774829,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ServerWand One-Click","description":"ServerWand One-Click","ordinal":101,"logo_url":"assets/serverwand.svg","images":["linode/ubuntu22.04"],"deployments_total":1066,"deployments_active":12,"is_public":true,"mine":false,"created":"2021-02-19T17:28:16","updated":"2023-11-15T08:46:35","rev_note":"","script":"#!/bin/bash\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# serverwand ssh key\nmkdir -p /root/.ssh/\nchmod 700 /root/.ssh/\ncurl https://serverwand.com/api/servers/connect > ~/.ssh/authorized_keys\nchmod 600 /root/.ssh/authorized_keys","user_defined_fields":[]},{"id":1177225,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Seatable One-Click","description":"Seatable One-Click App","ordinal":102,"logo_url":"assets/seatable.svg","images":["linode/debian11"],"deployments_total":42,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-05-16T19:56:00","updated":"2023-10-18T12:38:34","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\nsource \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION \n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Update and basic installs\nsystem_update\ndebian_upgrade\nenable_fail2ban\nsystem_install_package ufw ca-certificates curl gnupg lsb-release curl pwgen\n\n# Install docker\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \\\n \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get -y update\napt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose\n\n# Pull current seatable container\ndocker pull seatable/seatable-enterprise:latest\nmkdir /opt/seatable\nwget -O \"/opt/seatable/docker-compose.yml\" \"https://manual.seatable.io/docker/Enterprise-Edition/docker-compose.yml\"\n\n# Prepare SeaTable\nMYSQL_PASSWORD=`pwgen -s 30 1`\nsed -i \"s|DB_ROOT_PASSWD=.*|DB_ROOT_PASSWD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|MYSQL_ROOT_PASSWORD=.*|MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_LETSENCRYPT=.*|SEATABLE_SERVER_LETSENCRYPT=${LE}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_HOSTNAME=.*|SEATABLE_SERVER_HOSTNAME=${URL}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|TIME_ZONE=.*|TIME_ZONE=${TIMEZONE}|\" /opt/seatable/docker-compose.yml\n\n# Add a license\nmkdir -p /opt/seatable/seatable-data/seatable\ntouch /opt/seatable/seatable-data/seatable/seatable-license.txt\ncat << EOF > /opt/seatable/seatable-data/seatable/seatable-license.txt\n#SeaTable server licence\nName = \"Cloud Trial\"\nLicencetype = \"User\"\nLicenceKEY = \"1672935702\"\nProductID = \"SeaTable server\"\nExpiration = \"2024-01-31\"\nMaxUsers = \"3\"\nMode = \"subscription\"\nHash = \"045af708265d7d549cad51fc2b678272a1d15ab8cbfbf05734e371504bb72b388f4441493c7bfeccce7c19ac9c6877cb8f3aecc3beebe685db007832e1c0231728a92772d45dc1c08facbc225d90776f86d34cb4154bafe7c983b6767ffb31a74b133de61edf15c170564fcefb6e457012f63b95ed4aaf6fd2e1e1cfc2ad93a682cfab2fe86f427f7d93ae9b69cbaf02a7565074a95a8c1176402f250d2e815ab206a6b65009c65d94259772ab31a00c11e5c6b57fda0fbb1b22a69734c10214594a5d7b4c88a995eaeb3a65f9aa5d163d9e5c09f73105a4ef760a8421fb66d1982da739c42808fded9a95e456090747e494b0a1aee2a40f388d9f1146051754\"\nEOF\n\n# firewall\nufw limit ssh\nufw allow 80\nufw allow 443\nufw --force enable\n\n# Message of the day\ncat << EOF > /etc/motd\n#############################\n#############################\nSeaTable Enterprise Server\n\nTo finish the installation, change to the directory /opt/seatable and follow our deployment instructions at https://manual.seatable.io/docker/Enterprise-Edition/Deploy%20SeaTable-EE%20with%20Docker/.\nYou can skip the beginning and start directly with the adjustment of the docker-compose.yml file.\n\nPlease visit https://forum.seatable.io for SeaTable community support.\n#############################\n#############################\n\nEOF\n\necho \"Installation complete\"\nall_set\nstackscript_cleanup","user_defined_fields":[{"name":"url","label":"The domain/subdomain for SeaTable Server","example":"https://seatable.example.org"},{"name":"le","label":"Get a Let's Encrypt certificate","default":"True","oneof":"True,False"},{"name":"timezone","label":"Choose your timezone (e.g Europe/Berlin)","example":"Choices can be found here: http://en.wikipedia.org/wiki/List_of_tz_zones_by_name","default":"Etc/UTC"}]},{"id":604068,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Shadowsocks One-Click","description":"Shadowsocks One-Click","ordinal":103,"logo_url":"assets/shadowsocks.svg","images":["linode/ubuntu20.04"],"deployments_total":8641,"deployments_active":154,"is_public":true,"mine":false,"created":"2019-10-22T16:11:39","updated":"2023-11-15T16:40:16","rev_note":"final edit","script":"#!/usr/bin/env bash\n\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Install & configure shadowsocks\nfunction install_shadowsocks {\n apt-get install shadowsocks-libev -y\n cat </etc/shadowsocks-libev/config.json\n{\n\"server\":\"$IP\",\n\"server_port\":8000,\n\"local_port\":1080,\n\"password\":\"$SHADOWPASSWORD\",\n\"timeout\":60,\n\"method\":\"aes-256-gcm\"\n}\nEND\n systemctl start shadowsocks-libev\n systemctl enable shadowsocks-libev\n systemctl restart shadowsocks-libev\n}\n\nfunction shadowsocks_firewall {\n ufw allow 8000\n}\n\nfunction main {\n install_shadowsocks\n shadowsocks_firewall\n stackscript_cleanup\n}\n\n# Execute function\nmain","user_defined_fields":[{"name":"shadowpassword","label":"Shadowsocks Password","example":"Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1243780,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"SimpleX Chat One-Click","description":"SimpleX Chat","ordinal":104,"logo_url":"assets/simplexchat.svg","images":["linode/ubuntu22.04"],"deployments_total":19,"deployments_active":2,"is_public":true,"mine":false,"created":"2023-09-28T15:20:59","updated":"2023-11-12T02:18:50","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Simplex Settings\n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-simplex-chat\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n # Simplex variables\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n if [[ -n ${DOMAIN} && -n ${SUBDOMAIN} ]]; then\n echo \"addr: ${SUBDOMAIN}.${DOMAIN}\" >> ${group_vars}\n elif [[ -n ${DOMAIN} ]]; then\n echo \"addr: ${DOMAIN}\" >> ${group_vars}\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n\n if [[ -n ${SMP_PASSWORD} ]]; then\n echo \"smp_password: ${SMP_PASSWORD}\" >> ${group_vars};\n fi\n\n if [[ -n ${XFTP_QUOTA} ]]; then\n case ${XFTP_QUOTA} in\n *gb) echo \"xftp_quota: ${XFTP_QUOTA}\" >> ${group_vars} ;;\n *) echo \"xftp_quota: ${XFTP_QUOTA}gb\" >> ${group_vars} ;;\n esac\n fi\n\n # Linode variables\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"smp_password","label":"Set password for smp-server.","example":"123qwe","default":""},{"name":"xftp_quota","label":"Set xftp-server file storage quota in GB.","example":"1/5/10/100gb","default":"10gb"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":869153,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Splunk One-Click","description":"Splunk One-Click","ordinal":105,"logo_url":"assets/splunk.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":937,"deployments_active":94,"is_public":true,"mine":false,"created":"2021-07-20T19:04:43","updated":"2023-11-15T13:30:29","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Splunk settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# Configure Splunk\nwget https://download.splunk.com/products/splunk/releases/8.2.0/linux/splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz\nwget \ntar zxvf splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz -C /opt/\nuseradd splunk --system --shell=/usr/sbin/nologin\nchown -R splunk:splunk /opt/splunk\n\napt install -y expect\n SPLUNK_INSTALL=$(expect -c \"\n set timeout 10\n spawn /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 1 --accept-license\n expect \\\"Please enter an administrator username:\\\"\n send \\\"$SPLUNK_USER\\r\\\"\n expect \\\"Please enter a new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect \\\"Please confirm new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect eof\n \")\n\n# Start daemon\nsystemctl start Splunkd\nsystemctl status Splunkd\n\n# Firewall\nufw allow 22 \nufw allow 8000\nufw allow 8089\nufw allow 9997\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"splunk_user","label":"Splunk Admin User"},{"name":"splunk_password","label":"Splunk Admin password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1","default":""},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd","default":""},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1102904,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Superinsight One-Click","description":"Superinsight One-Click app","ordinal":106,"logo_url":"assets/superinsight.svg","images":["linode/ubuntu22.04"],"deployments_total":26,"deployments_active":0,"is_public":true,"mine":false,"created":"2022-12-20T17:43:01","updated":"2023-10-29T08:11:27","rev_note":"","script":"#!/usr/bin/bash\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Install docker\ncurl -fsSL get.docker.com | sudo sh\n\n# Creating Password\necho \"Superinsight setting up password....\"\nADMIN_PASSWORD=$(openssl rand -hex 12)\nNODE_IP=$(hostname -I | cut -f1 -d' ')\necho \"Downloading and Installing Superinsight instance......\"\n\n# Install Superinsight\ndocker run \\\n--detach \\\n--name superinsight-db-standalone \\\n--restart always \\\n-p 5432:5432 \\\n-v vol-superinsight:/db \\\n-e SUPERINSIGHT_USER=admin \\\n-e SUPERINSIGHT_PASSWORD=\"${ADMIN_PASSWORD}\" \\\nsuperinsight/superinsight-db-standalone:latest\n\n\n# Print instructions\ncat << EOF > /etc/motd\n\n################################################################################################################################################\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSUPERINSIGHT\n################################################################################################################################################\n\nSuperinsight created the user admin with password: ${ADMIN_PASSWORD}\nYou can can connect using a database client with the following connection string postgres://admin:${ADMIN_PASSWORD}@${NODE_IP}:5432/superinsight\nFor complete source code and information, visit: https://github.com/superinsight/superinsight-db\n\n################################################################################################################################################\nEOF","user_defined_fields":[]},{"id":401705,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Terraria One-Click","description":"Terraria One-Click","ordinal":107,"logo_url":"assets/Terraria.svg","images":["linode/ubuntu20.04"],"deployments_total":696,"deployments_active":6,"is_public":true,"mine":false,"created":"2019-03-08T21:10:49","updated":"2023-10-22T18:04:43","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n\n#Game config options\n\n#\n#\n#\n#\n#\n#\n#\n\n\n#Non-MVP config options\n#name=\"autocreate\" label=\"autocreate\" default=\"1\"/>\n#name=\"worldpath\" label=\"worldpath\" default=\"~/.local/share/Terraria/Worlds/\"/>\n#name=\"banlist\" label=\"banlist\" default=\"banlist.txt\"/>\n#name=\"priority\" label=\"priority\" default=\"1\"/>\n#name=\"upnp\" label=\"upnp\" default=\"1\"/>\n#name=\"npcstream\" label=\"npcstream\" default=\"60\"/>\n#name=\"secure\" label=\"secure\" default=\"1\"/>\n#name=\"language\" label=\"language\" default=\"en-US\"/>\n\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\nGAMESERVER=\"terrariaserver\"\n\n### UDF to config\n\nif [[ \"$DIFFICULTY\" = \"Normal\" ]]; then\n DIFFICULTY=\"0\"\nelif [[ \"$DIFFICULTY\" = \"Expert\" ]]; then\n DIFFICULTY=\"1\"\nfi\n\nset_hostname\napt_setup_update\n\n\n# Terraria specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\necho Requires Steam username and password to install\nsu - $GAMESERVER -c \"mkdir -p /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER\"\nsu - $GAMESERVER -c \"touch /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steamuser=\\\"$STEAMUSER\\\" >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steampass=\\''$STEAMPASSWORD'\\' >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\n\n# Install Terraria\ngame_install\n\nsed -i s/#seed=AwesomeSeed/seed=\"$SEED\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/worldname=world1/worldname=\"$WORLDNAME\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/difficulty=0/difficulty=\"$DIFFICULTY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/maxplayers=20/maxplayers=\"$MAXPLAYERS\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/port=7777/port=\"$PORT\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/password=/password=\"$PASSWORD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/motd=.*/motd=\"$MOTD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n#Non-MVP config options\n# sed -i s/autocreate=1/autocreate=\"$AUTOCREATE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/worldpath=\\~\\/\\.local\\/share\\/Terraria\\/Worlds\\//worldpath=\"$WORLDPATH\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/banlist=banlist.txt/banlist=\"$BANLIST\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/\\#priority=1/priority=\"$PRIORITY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#npcstream=60/npcstream=\"$NPCSTREAM\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#upnp=1/upnp=\"$UPNP\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/secure=1/secure=\"$SECURE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/language=en\\-US/language=\"$LANGUAGE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n# Setup crons and create systemd service file\nservice_config\n\n# Start the service and setup firewall\nufw_install\nufw allow \"$PORT\"/tcp\nufw allow \"$PORT\"/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"steamuser","label":"Steam Username","example":"username"},{"name":"steampassword","label":"Steam Password, must have Steam Guard turned off for deployment","example":"YourSteamPassword"},{"name":"worldname","label":"World Name","default":"world1"},{"name":"password","label":"Server Password","default":""},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"difficulty","label":"Difficulty Level","oneof":"Normal,Expert","default":"Normal"},{"name":"maxplayers","label":"Maximum Players","oneof":"1,10,20,50,100,200,255,","default":"20"},{"name":"port","label":"Port","default":"7777"},{"name":"seed","label":"Seed","default":"AwesomeSeed"}]},{"id":401704,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"TF2 One-Click","description":"TF2 One-Click","ordinal":108,"logo_url":"assets/TF2.svg","images":["linode/debian11"],"deployments_total":345,"deployments_active":3,"is_public":true,"mine":false,"created":"2019-03-08T21:10:23","updated":"2023-10-18T12:38:34","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nGAMESERVER=\"tf2server\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\nif [[ \"$SERVERNAME\" = \"\" ]]; then\n SERVERNAME=\"Linode TF2 Server\"\nfi\n\n\n# Server config\nset_hostname\napt_setup_update\n\n\n# Teamfortress2 specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\napt -q -y install mailutils postfix curl wget file \\\nbzip2 gzip unzip bsdmainutils python util-linux \\\nca-certificates binutils bc jq tmux lib32gcc-s1 libstdc++6 \\\nlibstdc++6:i386 libcurl4-gnutls-dev:i386 libtcmalloc-minimal4:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Teamfortress2\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\ncp /home/tf2server/lgsm/config-lgsm/tf2server/_default.cfg /home/tf2server/lgsm/config-lgsm/tf2server/common.cfg\n\n# Custom game configs\n> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\ncat <> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile\nEND\n\necho \"hostname $SERVERNAME\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_maxrounds $MAXROUNDS\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_timelimit $TIMELIMIT\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"\\\"$MOTD\\\"\" > /home/tf2server/serverfiles/tf/cfg/motd_default.txt\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27014:27050/tcp\nufw allow 3478:4380/udp\nufw allow 27000:27030/udp\nufw allow 26901\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode TF2 Server"},{"name":"svpassword","label":"Server Password","default":""},{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,3,5,10,15,20","default":"5"},{"name":"timelimit","label":"Round Time Limit","oneof":"10,15,35,45,60","default":"35"},{"name":"rconpassword","label":"RCON password"}]},{"id":1051711,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UniFi Network Application One-Click","description":"UniFi Network Application One-Click","ordinal":109,"logo_url":"assets/unifi.svg","images":["linode/debian10"],"deployments_total":493,"deployments_active":26,"is_public":true,"mine":false,"created":"2022-09-01T15:41:39","updated":"2023-10-18T12:38:34","rev_note":"","script":"#!/bin/bash\n#\n# Script to install UniFi Controller on Linode\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n## install depends \nexport DEBIAN_FRONTEND=noninteractive\napt-get install apt-transport-https ca-certificates wget dirmngr gpg software-properties-common multiarch-support libcommons-daemon-java jsvc openjdk-11-jre-headless -y \n\n# install mongodb req libssl1\nwget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\ndpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\n\n# install mongodb-3.4\nwget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | apt-key add -\necho \"deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main\" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list\napt update && apt upgrade -y\napt install mongodb-org -y \n \n# install latest UniFi Controller \necho 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list\nsudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg \napt update && apt install unifi -yq \n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n location /wss/ {\n proxy_pass https://localhost:8443;\n proxy_http_version 1.1;\n proxy_buffering off;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"Upgrade\";\n proxy_read_timeout 86400;\n }\n location / {\n proxy_pass https://localhost:8443;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http\nufw allow https\nufw allow 53\nufw allow 3479/udp\nufw allow 5514/udp\nufw allow 8080/tcp\nufw allow 8443/tcp\nufw allow 8880/tcp\nufw allow 8843/tcp\nufw allow 27117/tcp\nufw allow 5656:5699/udp\nufw allow 10001/udp \nufw allow 1900/udp\nufw allow 123/udp\nufw enable \n\nsleep 60 \n\n## install SSL certs. required \napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n \n## add some details \ncat << EOF > /etc/motd\n###################\n\n The installation is now complete, and you can access the UniFi Network Controller GUI from https://${ABS_DOMAIN}\n We recommend using the GUI to complete your configurations of the service\n\n################### \nEOF\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970523,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Uptime Kuma One-Click","description":"Uptime Kuma One-Click","ordinal":110,"logo_url":"assets/uptimekuma.svg","images":["linode/ubuntu22.04"],"deployments_total":2217,"deployments_active":406,"is_public":true,"mine":false,"created":"2022-02-07T16:06:08","updated":"2023-11-13T22:11:24","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## KUMA Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-uptimekuma\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n # Uptimekuma vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -vvvv $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":925530,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UTunnel VPN One-Click","description":"UTunnel VPN One-Click","ordinal":111,"logo_url":"assets/utunnel.svg","images":["linode/ubuntu20.04"],"deployments_total":1159,"deployments_active":16,"is_public":true,"mine":false,"created":"2021-10-25T18:55:37","updated":"2023-11-15T09:38:32","rev_note":"","script":"#!/bin/bash\n# Update the packages on the system from the distribution repositories.\t\napt-get update\nDEBIAN_FRONTEND=noninteractive apt-get upgrade -y\n\n# Install pre-requisites for docker-ce\n\nDEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common\n\n#Add Docker official GPG key\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\n#Add repository\n\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n\n# Download and install utnservice\n\nmkdir /utunnel\n\ncd /utunnel \n\nwget https://files.utunnel.io/production/deploy/install_bundle_20.tar\n\ntar -xf install_bundle_20.tar\n\nrm -f install_bundle_20.tar","user_defined_fields":[]},{"id":781317,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Valheim One-Click","description":"Valheim One-Click","ordinal":112,"logo_url":"assets/valheim.svg","images":["linode/debian10"],"deployments_total":2403,"deployments_active":53,"is_public":true,"mine":false,"created":"2021-03-01T13:26:36","updated":"2023-11-12T04:28:57","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Valheim Server Settings - Required\n#\n#\n\n## Linode/SSH Security Settings - Required\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n\n# Download and install dependencies\ndpkg --add-architecture i386\nsystem_update\nsystem_install_package curl wget file tar expect bzip2 gzip unzip \\\n bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 \\\n libc6-dev libsdl2-2.0-0:i386\n\n\n# Open the needed firewall ports\nufw allow 2456:2458/udp\nufw allow 4380/udp\nufw allow 27000:27030/udp\n\n# Install linuxGSM\nGAMESERVER='vhserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Set the Valheim dedicated server's name and password\ncat /home/$USERNAME/lgsm/config-lgsm/vhserver/_default.cfg >> /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/servername=\\\"Valheim Server\\\"/servername=\\\"$SERVER_NAME\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/serverpassword=\\\"\\\"/serverpassword=\\\"$SERVER_PASSWORD\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\n\n# Start and enable the Valheim services\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"server_name","label":"The name of the Valheim dedicated server"},{"name":"server_password","label":"The password for the Valheim dedicated server","example":"S3cuReP@s$w0rd"},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":954759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VictoriaMetrics Single One-Click","description":"VictoriaMetrics Single","ordinal":113,"logo_url":"assets/victoriametricssingle.svg","images":["linode/ubuntu20.04"],"deployments_total":39,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-01-06T18:53:56","updated":"2023-10-18T12:38:34","rev_note":"","script":"#!/bin/bash\n# \nsource \nsystem_set_hostname \"$HOSTNAME\"\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=noninteractive\napt update && apt upgrade -y && apt install -y curl wget net-tools traceroute jq\n# Generate files\nmkdir -p /etc/victoriametrics/single\nmkdir -p /var/lib/victoria-metrics-data\nmkdir -p /var/lib/cloud/scripts/per-instance\n# Create victoriametrics user\ngroupadd -r victoriametrics\nuseradd -g victoriametrics -d /var/lib/victoria-metrics-data -s /sbin/nologin --system victoriametrics\nchown -R victoriametrics:victoriametrics /var/lib/victoria-metrics-data\n# Install VictoriaMetrics Single\nVM_VERSION=`curl -sg \"https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/tags\" | jq -r '.[0].name'`\nwget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/${VM_VERSION}/victoria-metrics-linux-amd64-${VM_VERSION}.tar.gz -O /tmp/victoria-metrics.tar.gz\ntar xvf /tmp/victoria-metrics.tar.gz -C /usr/bin\nchmod +x /usr/bin/victoria-metrics-prod\nchown root:root /usr/bin/victoria-metrics-prod\ntouch /etc/victoriametrics/single/scrape.yml\nchown root:root /etc/victoriametrics/single/scrape.yml\ncat </etc/systemd/system/vmsingle.service\n[Unit]\nDescription=VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database.\n# https://docs.victoriametrics.com\nAfter=network.target\n[Service]\nType=simple\nUser=victoriametrics\nGroup=victoriametrics\nWorkingDirectory=/var/lib/victoria-metrics-data\nStartLimitBurst=5\nStartLimitInterval=0\nRestart=on-failure\nRestartSec=5\nEnvironmentFile=-/etc/victoriametrics/single/victoriametrics.conf\nExecStart=/usr/bin/victoria-metrics-prod \\$ARGS\nExecStop=/bin/kill -s SIGTERM \\$MAINPID\nExecReload=/bin/kill -HUP \\$MAINPID\n# See docs https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#tuning\nProtectSystem=full\nLimitNOFILE=1048576\nLimitNPROC=1048576\nLimitCORE=infinity\nStandardOutput=syslog\nStandardError=syslog\nSyslogIdentifier=vmsingle\n[Install]\nWantedBy=multi-user.target\nEND\ncat </etc/victoriametrics/single/victoriametrics.conf\n# See https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#list-of-command-line-flags to get more information about supported command-line flags\n# \n# If you use IPv6 pleas add \"-enableTCP6\" to args line\nARGS=\"-promscrape.config=/etc/victoriametrics/single/scrape.yml -storageDataPath=/var/lib/victoria-metrics-data -retentionPeriod=12 -httpListenAddr=:8428 -graphiteListenAddr=:2003 -opentsdbListenAddr=:4242 -influxListenAddr=:8089 -enableTCP6\"\nEND\ncat < /etc/profile.d/victoriametrics_welcome.sh\n#!/bin/sh\n#\nmyip=$(hostname -I | awk '{print$1}')\n******************************************************************************** \nWelcome to VictoriaMetrics Single.\nTo keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH), 80 (HTTP), and 443 (HTTPS), 8428 (VictoriaMetrics HTTP), 8089 (VictoriaMetrics Influx),\n4242 (VictoriaMetrics OpenTSDB), 2003 (VictoriaMetrics Graphite)\nIn a web browser, you can view:\n * The VictoriaMetrics Quickstart guide: https://kutt.it/1click-quickstart\nOn the server:\n * The default VictoriaMetrics root is located at /var/lib/victoria-metrics-data\n * VictoriaMetrics is running on ports: 8428, 8089, 4242, 2003 and they are bound to the local interface.\n********************************************************************************\n # This image includes version v1.74.0 of VictoriaMetrics. \n # See Release notes https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.70.0\n # Welcome to VictoriaMetrics droplet!\n # Website: https://victoriametrics.com\n # Documentation: https://docs.victoriametrics.com\n # VictoriaMetrics Github : https://github.com/VictoriaMetrics/VictoriaMetrics\n # VictoriaMetrics Slack Community: https://slack.victoriametrics.com\n # VictoriaMetrics Telegram Community: https://t.me/VictoriaMetrics_en\n # VictoriaMetrics config: /etc/victoriametrics/single/victoriametrics.conf\n # VictoriaMetrics scrape config: /etc/victoriametrics/single/scrape.yml\n # VictoriaMetrics UI accessable on: http://your_droplet_public_ipv4:8428/vmui/\nEND\n# Enable UFW and add some rules to it\nsed -e 's|DEFAULT_FORWARD_POLICY=.*|DEFAULT_FORWARD_POLICY=\"ACCEPT\"|g' \\\n -i /etc/default/ufw\nufw allow ssh comment \"SSH port\"\nufw allow http comment \"HTTP port\"\nufw allow https comment \"HTTPS port\"\nufw allow 8428 comment \"VictoriaMetrics Single HTTP port\"\nufw allow 8089/tcp comment \"TCP Influx Listen port for VictoriaMetrics\"\nufw allow 8089/udp comment \"UDP Influx Listen port for VictoriaMetrics\"\nufw allow 2003/tcp comment \"TCP Graphite Listen port for VictoriaMetrics\"\nufw allow 2003/udp comment \"UDP Graphite Listen port for VictoriaMetrics\"\nufw allow 4242 comment \"OpenTSDB Listen port for VictoriaMetrics\"\nufw --force enable\n# Cleaning up\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n# Start VictoriaMetrics\nsystemctl enable vmsingle.service\nsystemctl start vmsingle.service\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]},{"id":662117,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Virtualmin One-Click","description":"Virtualmin One-Click","ordinal":114,"logo_url":"assets/virtualmin.svg","images":["linode/debian10","linode/ubuntu22.04"],"deployments_total":2183,"deployments_active":141,"is_public":true,"mine":false,"created":"2020-08-12T15:46:13","updated":"2023-11-15T05:34:44","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nIFS=$'\\n\\t'\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n# Import the OCA Helper Functions\nsource \n\nfunction install_virtualmin {\n if [ $(cat /etc/os-release | grep -i 'ubuntu' )]; then\n if [ ! $(cat /etc/os-release | grep -i 'lts') ]; then\n printf \"Virtualmin only works with LTS versions of Ubuntu\\n\"\n exit 1;\n fi\n else\n wget http://software.virtualmin.com/gpl/scripts/virtualmin-install.sh -O /root/virtualmin-install.sh && {\n chmod +x /root/virtualmin-install.sh\n /bin/sh /root/virtualmin-install.sh -f -v\n }\n fi\n}\n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Configure firewall and install Fail2Ban\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\nfail2ban_install\n\n# Install Webmin and Virtualmin\nsource \ninstall_virtualmin\n\n# Disable SSL so that everything works\nsed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n# Restart Webmin\nsystemctl restart webmin\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated intrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688903,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VS Code Server One-Click","description":"Visual Studio Code One-Click","ordinal":115,"logo_url":"assets/vscodeserver.svg","images":["linode/debian10"],"deployments_total":5192,"deployments_active":134,"is_public":true,"mine":false,"created":"2020-11-17T21:10:25","updated":"2023-11-15T16:46:07","rev_note":"","script":"#!/usr/bin/env bash\n\n## VS Code Server OCA Script\n\n### UDF Variables\n\n## VS Code Web Password\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n\nfunction get_code_server {\n local -r username=\"$1\" vs_code_ver=\"$2\"\n\n cd \"/home/$username\"\n\n wget \"https://github.com/cdr/code-server/releases/download/v${vs_code_ver}/code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n tar -xf \"code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n mv code-server-*/ bin/\n\n chown -R \"${username}:${username}\" bin/\n chmod +x bin/code-server\n mkdir data/\n chown -R \"${username}:${username}\" data/\n\n cd /root/\n}\n\nfunction enable_code_service {\n local -r vs_code_password=\"$1\" username=\"$2\"\n\n # Set the password in /etc/systemd/system/code-server.service\n cat << EOF > /etc/systemd/system/code-server.service\n[Unit]\nDescription=code-server\nAfter=nginx.service\n[Service]\nUser=$username\nWorkingDirectory=/home/$username\nEnvironment=PASSWORD=$vs_code_password\nExecStart=/home/${username}/bin/code-server --host 127.0.0.1 --user-data-dir /home/${username}/data --auth password\nRestart=always\n[Install]\nWantedBy=multi-user.target\nEOF\n\n # Enable code-server as a service\n systemctl daemon-reload\n systemctl start code-server\n systemctl enable code-server\n}\n\nfunction certbot_standalone {\n local -r email_address=\"$1\" ssl_domain=\"$2\"\n\n # Get an SSL certificate from CertBot\n system_install_package \"certbot\"\n certbot -n certonly --standalone --agree-tos -m \"$email_address\" -d \"$ssl_domain\"\n}\n\nfunction nginx_reverse_proxy {\n local -r ssl_domain=\"$1\"\n\n ## Setup a reverse proxy with Nginx\n system_install_package \"nginx\"\n\n cat << EOF > /etc/nginx/sites-available/code-server\nserver {\n listen 80;\n server_name $ssl_domain;\n # enforce https\n return 301 https://\\$server_name:443\\$request_uri;\n}\nserver {\n listen 443 ssl http2;\n server_name $ssl_domain;\n ssl_certificate /etc/letsencrypt/live/${ssl_domain}/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/${ssl_domain}/privkey.pem;\n location / {\n proxy_pass http://127.0.0.1:8080/;\n proxy_set_header Host \\$host;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection upgrade;\n proxy_set_header Accept-Encoding gzip;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-available/code-server /etc/nginx/sites-enabled\n nginx -t\n systemctl restart nginx\n}\n\n### Install UFW and open the needed firewall ports\nufw allow 80,443/tcp\n\n### Install and configure VS Code Server\nget_code_server \"$USERNAME\" \"$VS_CODE_VER\"\nenable_code_service \"$VS_CODE_PASSWORD\" \"$USERNAME\"\ncheck_dns_propagation \"$FQDN\" \"$IP\"\ncertbot_standalone \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\nnginx_reverse_proxy \"$FQDN\"\n\n### Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"vs_code_password","label":"The password to login to the VS Code Web UI"},{"name":"vs_code_ver","label":"The version of VS Code Server you'd like installed","default":"3.10.2"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"disable_root","label":"Would you like to disable root login over SSH? (Recommended)","oneof":"Yes,No","default":"Yes"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address for your VirtualHost configuration, DNS records (If Required), and SSL certificates (If Required)."},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above","oneof":"Yes,No","default":"No"}]},{"id":923037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WarpSpeed One-Click","description":"WarpSpeed One-Click","ordinal":116,"logo_url":"assets/warpspeed.svg","images":["linode/ubuntu20.04"],"deployments_total":868,"deployments_active":16,"is_public":true,"mine":false,"created":"2021-10-18T01:12:49","updated":"2023-11-14T05:12:42","rev_note":"","script":"#!/bin/bash\nset -o errexit\nset -o nounset\nset -o pipefail\nset -o xtrace\n\n# \n# \n# \n# \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=\"noninteractive\"\napt-get \\\n -o 'Acquire::ForceIPv4=true' \\\n --yes \\\n update\n\napt-get \\\n -o 'DPkg::options::=--force-confdef' \\\n -o 'DPkg::options::=--force-confold' \\\n --yes \\\n install grub-pc\n\napt-get \\\n -o Acquire::ForceIPv4=true \\\n --yes \\\n update\n# # END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Handle the arguments.\nWIRESPEED_ADMIN_EMAIL=\"$(echo -e \"${WIRESPEED_ADMIN_EMAIL}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"$(echo -e \"${WIRESPEED_HTTP_HOST}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//\\//}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//https:/}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//http:/}\"\n\nif [[ -z \"${WIRESPEED_ADMIN_EMAIL}\" ]]; then\n echo \"Missing required parameter: admin email\"\n exit 101\nfi\n\nif [[ -z \"${WIRESPEED_HTTP_HOST}\" ]]; then\n echo \"Missing required parameter: http host\"\n exit 102\nfi\n\nif [[ -z \"${WIRESPEED_DATA_DIR}\" ]]; then\n WIRESPEED_DATA_DIR=\"/wirespeed\"\nfi\n\n# Set hostname\nIP=\"$(hostname --all-ip-addresses | awk '{ print $1 }')\"\nhostnamectl set-hostname \"${WIRESPEED_HTTP_HOST}\"\necho \"${IP} ${WIRESPEED_HTTP_HOST}\" >>/etc/hosts\n\nwget https://bunker.services/wirespeed-installer.sh\nchmod +x wirespeed-installer.sh\n./wirespeed-installer.sh \\\n \"${WIRESPEED_HTTP_HOST}\" \\\n \"${WIRESPEED_DATA_DIR}\" \\\n \"${WIRESPEED_ADMIN_EMAIL}\" \\\n \"${WIRESPEED_ADMIN_PASSWORD}\" \\\n --non-interactive\n\n# Force IPv4 and noninteractive upgrade after script runs to prevent breaking nf_conntrack for UFW\necho 'Acquire::ForceIPv4 \"true\";' >/etc/apt/apt.conf.d/99force-ipv4\napt-get upgrade --yes\n\nfor file in /root/StackScript /root/ssinclude* /root/wirespeed-installer.sh; do\n rm \"${file}\"\ndone\n\necho 'WireSpeed Installation complete!'","user_defined_fields":[{"name":"wirespeed_admin_email","label":"Admin Email","default":"","example":"it@example.com"},{"name":"wirespeed_admin_password","label":"Admin Password","default":"","example":"Password"},{"name":"wirespeed_http_host","label":"DNS Name","default":"","example":"vpn.example.com"},{"name":"wirespeed_data_dir","label":"Data Directory","default":"/wirespeed","example":"/wirespeed"}]},{"id":913276,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Wazuh One-Click","description":"Wazuh One-Click","ordinal":117,"logo_url":"assets/wazuh.svg","images":["linode/ubuntu22.04"],"deployments_total":4813,"deployments_active":857,"is_public":true,"mine":false,"created":"2021-09-30T18:27:36","updated":"2023-11-15T16:21:20","rev_note":"","script":"#!/bin/bash\n\n# #\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings \n#\n#\n#\n\n## Enable logging\n# set -o pipefail\nset -x\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# UFW https://documentation.wazuh.com/current/getting-started/architecture.html\nufw allow 1514\nufw allow 1515\nufw allow 1516\nufw allow 514\nufw allow 55000\nufw allow 443\nufw allow 80\nufw allow 9200\nufw allow 9300\n\n# NGINX\napt install git nginx certbot python3-certbot-nginx -y\n\nmkdir -p /var/www/certs/.well-known\nchown -R www-data:www-data /var/www/certs/\ncat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\nln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\nunlink /etc/nginx/sites-enabled/default\nsystemctl restart nginx\n\n# SSL Certbot\n#certbot certonly --agree-tos --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n\nfunction get_cert {\n if [ \"$1\" == \"dry_run\" ]; then\n certbot certonly --dry-run --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n elif [ \"$1\" == \"run\" ]; then\n certbot certonly --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n fi\n}\n\nfunction propagate {\n while [[ $count -le $retries ]]; do\n echo \"[Info] Let's Encrypt validation failed. Retrying...\"\n sleep 5\n count=$(( $count + 1 ))\n get_cert dry_run\n\n if [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful..\"\n get_cert run\n return 0\n \n fi\n\n # no more retries left. Exit\n if [[ $count -eq $retries ]]; then\n echo \"[Error] Unable to get Let's Encrypt certificate for $FQDN\"\n return 1\n fi\n done\n}\n\ncount=1\nretries=24\nget_cert dry_run\nif [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful. Getting certificate\"\n get_cert run\nelse\n propagate\nfi\n\n# reorder Wazuh script\ncurl -sO https://packages.wazuh.com/4.4/wazuh-install.sh && sudo bash ./wazuh-install.sh -a \ntar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt >> .deployment-secrets.txt\n\n# Set Variables\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\n\n# Place certificates in /etc/wazuh-dashboard/certs/\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\n\n# Restart Kibana\nservice wazuh-dashboard restart\n\n# Create Cert renewal cron script\ncat </root/certbot-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & Kibana\n# Debug\n# set -xo pipefail\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\nservice wazuh-dashboard restart\nEND\n\nchmod +x /root/certbot-renewal.sh\n\n# Setup Cron\ncrontab -l > cron\necho \"* 1 * * 1 bash /root/certbot-renewal.sh\" >> cron\ncrontab cron\nrm cron\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":662116,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webmin One-Click","description":"Webmin One-Click","ordinal":118,"logo_url":"assets/webmin.svg","images":["linode/debian10"],"deployments_total":1172,"deployments_active":35,"is_public":true,"mine":false,"created":"2020-08-12T15:41:21","updated":"2023-11-15T01:51:13","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n#Check if the script is being sourced by another script\n[[ $_ != $0 ]] && readonly SOURCED=1\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction webmin_install {\n # Install webmin\n echo \"deb http://download.webmin.com/download/repository sarge contrib\" >> /etc/apt/sources.list\n wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add\n system_update\n system_install_package \"webmin\"\n}\n\nfunction webmin_configure {\n local -r email_address=\"$1\"\n local -r fqdn=\"$2\"\n\n # Configure the Virtual Host\n cat < /etc/apache2/sites-available/\"${fqdn}.conf\"\n\n ServerAdmin ${email_address}\n ServerName ${fqdn}\n ProxyPass / http://localhost:10000/\n ProxyPassReverse / http://localhost:10000/\n\nEOF\n # Disable SSL in Webmin so Apache can handle it instead\n sed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n # Add FQDN to the list of allowed domains\n echo \"referers=${fqdn}\" >> /etc/webmin/config\n\n # Restart Webmin\n systemctl restart webmin\n\n # Enable proxy_http module\n a2enmod proxy_http\n systemctl restart apache2\n\n # Enable the Virtual Host\n a2ensite \"${fqdn}\"\n systemctl reload apache2\n}\n\n\n# Open the needed firewall ports\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\n\n# Make sure unzip is installed, or else the webmin install will fail\n[ ! -x /usr/bin/unzip ] && system_install_package \"unzip\"\n\n# \"${package_list[@]}\" contains a list of packages to be installed on the system\npackage_list=(\n \"gnupg1\" \\\n \"python\" \\\n \"apt-show-versions\" \\\n \"libapt-pkg-perl\" \\\n \"libauthen-pam-perl\" \\\n \"libio-pty-perl\" \\\n \"libnet-ssleay-perl\"\n)\n\n# Install all of the packages specified in ${package_list[@]}\nsystem_install_package \"${package_list[@]}\"\n\n# Intall Webmin\nwebmin_install\napache_install\nwebmin_configure \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\n\n# Install SSL Certificate - NOT READY YET\n#certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n## Cleanup before exiting\nif [ \"$SOURCED\" -ne 1 ]; then\n stackscript_cleanup\nfi","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webuzo One-Click","description":"Webuzo One-Click","ordinal":119,"logo_url":"assets/webuzo.svg","images":["linode/ubuntu20.04"],"deployments_total":896,"deployments_active":23,"is_public":true,"mine":false,"created":"2020-11-17T21:04:21","updated":"2023-11-14T00:56:52","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library & Helpers\nsource \nsource \nsource \nsource \n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n# Install Prereq's & Services\napt install -y wget\nwget -N http://files.webuzo.com/install.sh\nchmod +x install.sh\n./install.sh\nsleep 2\nsystemctl start webuzo.service\n\n# firewall\nufw allow 25\nufw allow 53\nufw allow 587\nufw allow 2002\nufw allow 2003\nufw allow 2004\nufw allow 2005\n\n# Cleanup \nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":401706,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WireGuard® One-Click","description":"WireGuard One-Click","ordinal":120,"logo_url":"assets/Wireguard.svg","images":["linode/ubuntu22.04"],"deployments_total":9230,"deployments_active":298,"is_public":true,"mine":false,"created":"2019-03-08T21:11:36","updated":"2023-11-15T17:04:53","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n# \n\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### Set hostname, Apt configuration and update/upgrade\n\nset_hostname\napt_setup_update\n\napt install wireguard wireguard-tools linux-headers-$(uname -r) -y\n\nif [[ \"$PORT\" != \"51820\" ]]; then\n PORT=\"$PORT\"\nfi\n\n# Wireguard\n\nwg genkey | tee ~/wg-private.key | wg pubkey > ~/wg-public.key\n\nPRIVATEKEY=`cat ~/wg-private.key`\n\ncat </etc/wireguard/wg0.conf\n[Interface]\nPrivateKey = $PRIVATEKEY\nAddress = $PRIVATEIP\nListenPort = $PORT\nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -A FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -D FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\nSaveConfig = true\n[Peer]\nPublicKey = $PEERPUBKEY\nAllowedIPs = $PRIVATEIP_CLIENT\nEndpoint = $ENDPOINT:$PORT\nEND\n\n### Enable Port Forwarding\nsed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf\nsysctl -p /etc/sysctl.conf\nsysctl --system\n\n### Services\n\n# wg-quick up wg0. #### Removed to let systemctl manage the service\nsystemctl enable wg-quick@wg0\nsystemctl start wg-quick@wg0\nwg show\nufw_install\nufw allow \"$PORT\"/udp\nufw enable\n\nsystemctl restart wg-quick@wg0\n\nstackscript_cleanup","user_defined_fields":[{"name":"port","label":"Port","example":"51820","default":"51820"},{"name":"privateip","label":"Tunnel IP","example":"10.0.0.1/24, 172.16.0.1/24, 192.168.1.1/24, etc","default":"10.0.1.1/24"},{"name":"peerpubkey","label":"WireGuard Public Key (Client)","default":""},{"name":"privateip_client","label":"Tunnel IP (Client)","example":"10.0.0.2/24, 172.16.0.2/24, 192.168.1.2/24 etc","default":"10.0.1.2/24"},{"name":"endpoint","label":"Endpoint IP (Client)","default":""}]},{"id":401708,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WooCommerce One-Click","description":"WooCommerce One-Click","ordinal":121,"logo_url":"assets/WooCommerce.svg","images":["linode/ubuntu22.04"],"deployments_total":4294,"deployments_active":216,"is_public":true,"mine":false,"created":"2019-03-08T21:12:57","updated":"2023-11-13T12:51:25","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-woocommerce\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":741207,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Yacht One-Click","description":"Yacht One-Click","ordinal":122,"logo_url":"assets/yacht.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":955,"deployments_active":15,"is_public":true,"mine":false,"created":"2021-01-26T21:52:26","updated":"2023-11-12T07:20:08","rev_note":"","script":"#!/bin/bash\n#\n#\n#\n#\n\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n## Linode Docker OCA\nsource \n\nif [ \"$COMPOSE_SUPPORT\" == \"Yes\" ]; then\n mkdir -p /opt/Yacht/compose/example\n docker volume create yacht_data\n docker run -d \\\n --name=yacht \\\n -p 8000:8000 \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -v yacht_data:/config \\\n -v /opt/Yacht/compose:/compose \\\n -e COMPOSE_DIR=/compose/ \\\n -e THEME=$YACHT_THEME \\\n -e ADMIN_EMAIL=$YEMAIL \\\n -e ADMIN_PASSWORD=$YPASSWORD \\\n selfhostedpro/yacht:latest\n printf \"\\nThe default compose directory is /opt/Yacht/compose.\\nAn example project has been added there.\" > /etc/update-motd.d/99-yacht\n curl -L https://raw.githubusercontent.com/SelfhostedPro/selfhosted_templates/yacht/Template/Compose/example/docker-compose.yml -o /opt/Yacht/compose/example/docker-compose.yml\nelif [ \"$COMPOSE_SUPPORT\" == \"No\" ]; then\n docker volume create yacht\n docker run -d \\\n --name=yacht \\\n -p 8000:8000 \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -v yacht_data:/config \\\n -e THEME=$YACHT_THEME \\\n -e ADMIN_EMAIL=$YEMAIL \\\n -e ADMIN_PASSWORD=$YPASSWORD \\\n selfhostedpro/yacht:latest\n \nfi\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"YEMAIL","label":"Yacht Email","example":"admin@yacht.local","default":"admin@yacht.local"},{"name":"YPASSWORD","label":"Yacht Password","example":"Password"},{"name":"COMPOSE_SUPPORT","label":"Yacht Compose Support","example":"Yes","default":"Yes","oneof":"Yes,No"},{"name":"YACHT_THEME","label":"Yacht Theme","example":"Default","default":"Default","oneof":"Default,RED,OMV"}]},{"id":741208,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Zabbix One-Click","description":"Zabbix One-Click","ordinal":123,"logo_url":"assets/zabbix.svg","images":["linode/centos-stream8"],"deployments_total":1738,"deployments_active":70,"is_public":true,"mine":false,"created":"2021-01-26T21:56:54","updated":"2023-11-15T11:55:53","rev_note":"","script":"#!/bin/bash\n\n# \n\nsource \n\nsystem_set_hostname \"$HOSTNAME\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Generate files\nmkdir -p /etc/my.cnf.d/\nmkdir -p /etc/nginx/conf.d/\nmkdir -p /etc/php-fpm.d/\nmkdir -p /etc/php.d/\n# mkdir -p /etc/profile.d/\nmkdir -p /etc/motd.d/\nmkdir -p /etc/zabbix/web/\nmkdir -p /var/lib/cloud/scripts/per-instance\n\ncat </etc/my.cnf.d/zabbix.cnf\n[mysqld]\nuser = mysql\nlocal_infile = 0\n\ndatadir = /var/lib/mysql/\n\ndefault-storage-engine = InnoDB\nskip-name-resolve\nkey_buffer_size = 32M\nmax_allowed_packet = 128M\ntable_open_cache = 1024\ntable_definition_cache = 1024\nmax_connections = 2000\njoin_buffer_size = 1M\nsort_buffer_size = 2M\nread_buffer_size = 256K\nread_rnd_buffer_size = 256K\nmyisam_sort_buffer_size = 1M\nthread_cache_size = 512\nopen_files_limit = 10000\nwait_timeout = 86400\n\noptimizer_switch=index_condition_pushdown=off\n\ntmp_table_size = 32M\nmax_heap_table_size = 32M\n\nbinlog_format=mixed\nbinlog_cache_size = 32M\nmax_binlog_size = 256M\nbinlog_expire_logs_seconds = 259200\n\n# innodb_page_size = 32K\ninnodb_buffer_pool_size = 512M\ninnodb_log_file_size = 256M\ninnodb_log_buffer_size = 64M\ninnodb_file_per_table = 1\ninnodb_flush_method = O_DIRECT\ninnodb_buffer_pool_instances = 4\ninnodb_write_io_threads = 4\ninnodb_read_io_threads = 4\ninnodb_adaptive_flushing = 1\ninnodb_lock_wait_timeout = 50\n\ninnodb_flush_log_at_trx_commit = 1\n\ninnodb_io_capacity = 300\ninnodb_io_capacity_max = 400\ninnodb_flush_neighbors = 0\n\ninnodb_doublewrite = 1\ninnodb_thread_concurrency = 0\n\ninnodb_purge_threads = 1\n\nserver_id = 1\nbinlog_checksum = crc32\n\ninnodb_lru_scan_depth = 512\n\ninnodb_stats_on_metadata = 0\n\nEND\n\ncat </etc/nginx/conf.d/zabbix_ssl.conf\nserver {\n listen 0.0.0.0:443 ssl http2;\n # server_name ;\n index index.php;\n\n root \\$webroot;\n charset utf8;\n set \\$webroot '/usr/share/zabbix';\n\n access_log /var/log/nginx/zabbix_access_ssl.log main;\n error_log /var/log/nginx/zabbix_error_ssl.log error;\n\n ssl_stapling on;\n ssl_stapling_verify on;\n\n #resolver 192.168.13.160 192.168.10.24;\n\n ssl_certificate /etc/ssl/certs/zabbix_example.crt;\n ssl_certificate_key /etc/ssl/private/zabbix_example.key;\n\n ssl_dhparam /etc/ssl/private/zabbix_dhparam.pem;\n\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_verify_depth 3;\n #ssl_ciphers HIGH:!aNULL:!MD5;\n ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;\n #ssl_session_cache shared:SSL:10m;\n ssl_session_cache shared:MozSSL:10m;\n ssl_session_timeout 1d;\n ssl_prefer_server_ciphers off;\n ssl_session_tickets off;\n\n add_header Strict-Transport-Security \"max-age=63072000\" always;\n add_header Content-Security-Policy-Report-Only \"default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report\";\n\n location = /favicon.ico {\n log_not_found off;\n }\n\n location / {\n index index.php;\n try_files \\$uri \\$uri/ =404;\n }\n\n location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {\n access_log off;\n expires 10d;\n }\n\n location ~ /\\.ht {\n deny all;\n }\n\n location ~ /(api\\/|conf[^\\.]|include|locale) {\n deny all;\n return 404;\n }\n\n location ~ [^/]\\.php(/|$) {\n fastcgi_pass unix:/run/php-fpm/zabbix.sock;\n fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n fastcgi_index index.php;\n\n fastcgi_param DOCUMENT_ROOT /usr/share/zabbix;\n fastcgi_param SCRIPT_FILENAME /usr/share/zabbix\\$fastcgi_script_name;\n fastcgi_param PATH_TRANSLATED /usr/share/zabbix\\$fastcgi_script_name;\n\n include fastcgi_params;\n fastcgi_param QUERY_STRING \\$query_string;\n fastcgi_param REQUEST_METHOD \\$request_method;\n fastcgi_param CONTENT_TYPE \\$content_type;\n fastcgi_param CONTENT_LENGTH \\$content_length;\n\n fastcgi_intercept_errors on;\n fastcgi_ignore_client_abort off;\n fastcgi_connect_timeout 60;\n fastcgi_send_timeout 180;\n fastcgi_read_timeout 180;\n fastcgi_buffer_size 128k;\n fastcgi_buffers 4 256k;\n fastcgi_busy_buffers_size 256k;\n fastcgi_temp_file_write_size 256k;\n }\n}\n\nEND\n\ncat </etc/nginx/conf.d/zabbix.conf\nserver {\n listen 0.0.0.0:80;\n # server_name zabbix;\n\n return 301 https://\\$host\\$request_uri;\n}\n\nEND\n\ncat </etc/nginx/nginx.conf\n# For more information on configuration, see:\n# * Official English Documentation: http://nginx.org/en/docs/\n# * Official Russian Documentation: http://nginx.org/ru/docs/\n\nuser nginx;\nworker_processes auto;\nworker_priority -5;\nworker_rlimit_nofile 256000;\n\nerror_log /var/log/nginx/error.log;\n\npid /run/nginx.pid;\n\n# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.\ninclude /usr/share/nginx/modules/*.conf;\n\nevents {\n worker_connections 5120;\n use epoll;\n multi_accept on;\n}\n\n\nhttp {\n include /etc/nginx/mime.types;\n default_type application/octet-stream;\n\n log_format main\n '\\$http_x_forwarded_for - \\$remote_user [\\$time_local] '\n '\"\\$request\" \\$status \\$bytes_sent '\n '\"\\$http_referer\" \"\\$http_user_agent\" '\n '\"\\$gzip_ratio\"';\n\n access_log /var/log/nginx/access.log main;\n\n open_file_cache max=200000 inactive=20s;\n open_file_cache_valid 30s;\n open_file_cache_min_uses 2;\n open_file_cache_errors on;\n\n limit_conn_zone \\$binary_remote_addr zone=perip:10m;\n limit_conn_zone \\$server_name zone=perserver:10m;\n\n client_header_timeout 5m;\n client_body_timeout 5m;\n send_timeout 5m;\n\n connection_pool_size 4096;\n client_header_buffer_size 4k;\n large_client_header_buffers 4 4k;\n request_pool_size 4k;\n\n reset_timedout_connection on;\n\n\n gzip on;\n gzip_min_length 100;\n gzip_buffers 4 8k;\n gzip_comp_level 5;\n gzip_types text/plain text/css text/xml application/x-javascript application/xml application/xhtml+xml;\n\n types_hash_max_size 2048;\n\n output_buffers 128 512k;\n postpone_output 1460;\n aio on;\n directio 512;\n\n sendfile on;\n client_max_body_size 8m;\n fastcgi_intercept_errors on;\n\n tcp_nopush on;\n tcp_nodelay on;\n\n keepalive_timeout 75 20;\n\n ignore_invalid_headers on;\n\n index index.php;\n server_tokens off;\n\n # Load modular configuration files from the /etc/nginx/conf.d directory.\n # See http://nginx.org/en/docs/ngx_core_module.html#include\n # for more information.\n include /etc/nginx/conf.d/*.conf;\n}\n\nEND\n\ncat </etc/php-fpm.d/zabbix.conf\n[zabbix]\nuser = apache\ngroup = apache\n\nlisten = /run/php-fpm/zabbix.sock\nlisten.acl_users = apache,nginx\nlisten.allowed_clients = 127.0.0.1\n\npm = dynamic\npm.max_children = 50\npm.start_servers = 5\npm.min_spare_servers = 5\npm.max_spare_servers = 35\n\nphp_value[session.save_handler] = files\nphp_value[session.save_path] = /var/lib/php/session\n\nphp_value[max_execution_time] = 300\nphp_value[memory_limit] = 128M\nphp_value[post_max_size] = 16M\nphp_value[upload_max_filesize] = 2M\nphp_value[max_input_time] = 300\nphp_value[max_input_vars] = 10000\n; php_value[date.timezone] = Europe/Riga\nEND\n\n# cat </etc/php.d/99-zabbix.ini\n# max_execution_time=300\n# memory_limit=128M\n# post_max_size=16M\n# upload_max_filesize=2M\n# max_input_time=300\n# always_populate_raw_post_data=-1\n# max_input_vars=10000\n# date.timezone=UTC\n# session.save_path=/var/lib/php/\n# END\n\n# cat </etc/profile.d/zabbix_welcome.sh\n# #!/bin/sh\n# #\n# myip=\\$(hostname -I | awk '{print\\$1}')\n# cat </etc/motd.d/zabbix\n********************************************************************************\n\nZabbix frontend credentials:\n\nUsername: Admin\n\nPassword: replace_password\n\n\nTo learn about available professional services, including technical suppport and training, please visit https://www.zabbix.com/services\n\nOfficial Zabbix documentation available at https://www.zabbix.com/documentation/current/\n\n\n********************************************************************************\nEND\n\n# cat </etc/systemd/system/zabbix-instance-init.service\n# [Unit]\n# After=mariadb.service\n\n# [Service]\n# ExecStart=/var/lib/cloud/scripts/per-instance/001-zabbix\n\n# [Install]\n# WantedBy=multi-user.target\n# END\n\n# cat </etc/yum.repos.d/MariaDB.repo\n# # MariaDB 10.3 CentOS repository list - created 2019-03-28 10:57 UTC\n# # http://downloads.mariadb.org/mariadb/repositories/\n# [mariadb]\n# name = MariaDB\n# baseurl = http://yum.mariadb.org/10.2/centos7-amd64\n# gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB\n# gpgcheck=1\n# END\n\ncat </etc/yum.repos.d/Nginx.repo\n[nginx-stable]\nname=nginx stable repo\nbaseurl=http://nginx.org/packages/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=1\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\n\n[nginx-mainline]\nname=nginx mainline repo\nbaseurl=http://nginx.org/packages/mainline/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=0\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\nEND\n\ncat </etc/zabbix/web/zabbix.conf.php\n 'http://localhost:9200',\n//\t'text' => 'http://localhost:9200'\n//];\n// Value types stored in Elasticsearch.\n//\\$HISTORY['types'] = ['uint', 'text'];\n\n// Used for SAML authentication.\n// Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings.\n//\\$SSO['SP_KEY']\t\t\t= 'conf/certs/sp.key';\n//\\$SSO['SP_CERT']\t\t\t= 'conf/certs/sp.crt';\n//\\$SSO['IDP_CERT']\t\t= 'conf/certs/idp.crt';\n//\\$SSO['SETTINGS']\t\t= [];\nEND\n\ncat </tmp/zabbix_server_custom.te\nmodule zabbix_server_custom 1.2;\nrequire {\n type zabbix_var_run_t;\n type tmp_t;\n type zabbix_t;\n class sock_file { create unlink write };\n class unix_stream_socket connectto;\n class process setrlimit;\n class capability dac_override;\n}\n#============= zabbix_t ==============\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:process setrlimit;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:unix_stream_socket connectto;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t tmp_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t zabbix_var_run_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:capability dac_override;\nEND\n\n# Installing RPM packages\nyum makecache\nyum -y upgrade\nyum -y install wget\nwget https://dev.mysql.com/get/mysql80-community-release-el8-3.noarch.rpm\ndnf -y install mysql80-community-release-el8-3.noarch.rpm\ndnf -y module disable mysql\ndnf -y install https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm\ndnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\ndnf -y install epel-release\ndnf -y module enable php:remi-8.1\nyum -y install cloud-init cloud-utils-growpart firewalld nginx php-fpm mysql-community-client mysql-community-server java-1.8.0-openjdk-headless zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent zabbix-get zabbix-sender zabbix-java-gateway zabbix-js\n\n\n# Configure firewalld\nsystemctl enable firewalld\nsystemctl start firewalld\nfirewall-cmd --permanent --add-service=ssh --zone=public\nfirewall-cmd --permanent --add-service=http --zone=public\nfirewall-cmd --permanent --add-service=https --zone=public\nfirewall-cmd --permanent --add-port=10051/tcp --zone=public\nfirewall-cmd --reload\n\n# Configure SELinux\nrm -rf /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.pp\ncheckmodule -M -m -o /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.te\nsemodule_package -o /tmp/zabbix_server_custom.pp -m /tmp/zabbix_server_custom.mod\nsemodule -i /tmp/zabbix_server_custom.pp\n\nsetsebool -P httpd_can_connect_zabbix=1\nsetsebool -P zabbix_can_network=1\n\n# Generate SSL certificate\nmkdir -p /etc/ssl/private\nopenssl dhparam -out /etc/ssl/private/zabbix_dhparam.pem 2048\n\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/zabbix_example.key \\\n -out /etc/ssl/certs/zabbix_example.crt -subj \"/C=LV/ST=Riga/L=Riga/O=Global Security/OU=IT Department/CN=example.zabbix.com\"\n\n# Configure Zabbix instance\nsystemctl enable mysqld\nsystemctl disable nginx\nsystemctl disable php-fpm\nsystemctl disable zabbix-server\nsystemctl enable zabbix-agent\nsystemctl enable zabbix-java-gateway\n\nsystemctl stop nginx php-fpm\n\necho \"Requires=multi-user.target\" >> /usr/lib/systemd/system/cloud-init.target\n\nsystemctl set-default cloud-init.target\n\nchown -R apache:apache /var/lib/php/\n\nchmod g+r /etc/zabbix/zabbix_server.conf\nchmod o+w /run/zabbix/\n\nchmod 755 /etc/my.cnf\nchmod -R 755 /etc/my.cnf.d/\n\nsed -i 's/^#PrintMotd yes/&\\nPrintMotd no/g' /etc/ssh/sshd_config\n\nsed -i '/^; php_value\\[date.timezone\\] /s/^; //' /etc/php-fpm.d/zabbix.conf\n\nsed -i 's/^# JavaGateway=.*/&\\nJavaGateway=127.0.0.1/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# StartJavaPollers=.*/&\\nStartJavaPollers=5/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# LISTEN_IP=.*/&\\nLISTEN_IP=\"127.0.0.1\"/g' /etc/zabbix/zabbix_java_gateway.conf\n\nescape_spec_char() {\n local var_value=$1\n\n var_value=\"${var_value//\\\\/\\\\\\\\}\"\n var_value=\"${var_value//[$'\\n']/}\"\n var_value=\"${var_value//\\//\\\\/}\"\n var_value=\"${var_value//./\\\\.}\"\n var_value=\"${var_value//\\*/\\\\*}\"\n var_value=\"${var_value//^/\\\\^}\"\n var_value=\"${var_value//\\$/\\\\$}\"\n var_value=\"${var_value//\\&/\\\\&}\"\n var_value=\"${var_value//\\[/\\\\[}\"\n var_value=\"${var_value//\\]/\\\\]}\"\n\n echo \"$var_value\"\n}\n\nsystemctl start mysqld\nsystemctl enable mysqld\nsystemctl enable nginx\nsystemctl enable php-fpm\nsystemctl enable zabbix-server\n\nDB_ROOT_TMP_PASS=$(grep 'temporary password' /var/log/mysqld.log | awk '{print $13}' | tail -1)\nWEB_PASS=$(openssl rand -base64 14)\nWEB_PASS=${WEB_PASS%?}\nINST_NAME=$(hostname)\n\nrm -f /root/.my.cnf\n\nDB_ROOT_PASS=$(MYSQL_PWD=\"$DB_ROOT_TMP_PASS\" mysql --connect-expired-password -s -N -e \"SET PASSWORD FOR root@localhost TO RANDOM;\" | awk '{print $3}')\nDB_ZBX_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_srv'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\nDB_ZBXWEB_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_web'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"CREATE DATABASE zabbix CHARACTER SET 'utf8' COLLATE 'utf8_bin'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP, ALTER, INDEX, REFERENCES ON zabbix.* TO 'zabbix_srv'@'localhost'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP ON zabbix.* TO 'zabbix_web'@'localhost'\"\n\ncat > /root/.my.cnf << EOF\n[client]\npassword=\"$DB_ROOT_PASS\"\nEOF\n\nzcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -uroot zabbix\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"UPDATE users SET passwd = MD5('$WEB_PASS') WHERE username = 'Admin'\" zabbix\n\nWEB_PASS=$(escape_spec_char \"$WEB_PASS\")\nsed -i \"s/replace_password/$WEB_PASS/g\" /etc/motd.d/zabbix\n\nsed -i \"s/replace_name/$INST_NAME/g\" /etc/zabbix/web/zabbix.conf.php\n\nDB_ZBX_PASS=$(escape_spec_char \"$DB_ZBX_PASS\")\nDB_ZBXWEB_PASS=$(escape_spec_char \"$DB_ZBXWEB_PASS\")\n\nsed -i \"s/^DBUser=.*/DBUser=zabbix_srv/g\" /etc/zabbix/zabbix_server.conf\nsed -i -e \"/^[#;] DBPassword=/s/.*/&\\nDBPassword=$DB_ZBX_PASS/\" /etc/zabbix/zabbix_server.conf\nsed -i \"s/replace_password/$DB_ZBXWEB_PASS/g\" /etc/zabbix/web/zabbix.conf.php\nsed -i \"s/replace_user/zabbix_web/g\" /etc/zabbix/web/zabbix.conf.php\n\n# Cleaning up remote machine\nrm -rf /etc/nginx/conf.d/default.conf\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n\n\n\nsystemctl start zabbix-server zabbix-agent zabbix-java-gateway\nsystemctl start nginx php-fpm\n\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]}],"page":1,"pages":1,"results":129} \ No newline at end of file diff --git a/packages/manager/src/cachedData/regions.json b/packages/manager/src/cachedData/regions.json index e9f0ca7d333..d444b31bfa2 100644 --- a/packages/manager/src/cachedData/regions.json +++ b/packages/manager/src/cachedData/regions.json @@ -1 +1 @@ -{"data":[{"id":"ap-west","label":"Mumbai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.34.5, 172.105.35.5, 172.105.36.5, 172.105.37.5, 172.105.38.5, 172.105.39.5, 172.105.40.5, 172.105.41.5, 172.105.42.5, 172.105.43.5","ipv6":"2400:8904::f03c:91ff:fea5:659, 2400:8904::f03c:91ff:fea5:9282, 2400:8904::f03c:91ff:fea5:b9b3, 2400:8904::f03c:91ff:fea5:925a, 2400:8904::f03c:91ff:fea5:22cb, 2400:8904::f03c:91ff:fea5:227a, 2400:8904::f03c:91ff:fea5:924c, 2400:8904::f03c:91ff:fea5:f7e2, 2400:8904::f03c:91ff:fea5:2205, 2400:8904::f03c:91ff:fea5:9207"}},{"id":"ca-central","label":"Toronto, CA","country":"ca","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.0.5, 172.105.3.5, 172.105.4.5, 172.105.5.5, 172.105.6.5, 172.105.7.5, 172.105.8.5, 172.105.9.5, 172.105.10.5, 172.105.11.5","ipv6":"2600:3c04::f03c:91ff:fea9:f63, 2600:3c04::f03c:91ff:fea9:f6d, 2600:3c04::f03c:91ff:fea9:f80, 2600:3c04::f03c:91ff:fea9:f0f, 2600:3c04::f03c:91ff:fea9:f99, 2600:3c04::f03c:91ff:fea9:fbd, 2600:3c04::f03c:91ff:fea9:fdd, 2600:3c04::f03c:91ff:fea9:fe2, 2600:3c04::f03c:91ff:fea9:f68, 2600:3c04::f03c:91ff:fea9:f4a"}},{"id":"ap-southeast","label":"Sydney, AU","country":"au","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.166.5, 172.105.169.5, 172.105.168.5, 172.105.172.5, 172.105.162.5, 172.105.170.5, 172.105.167.5, 172.105.171.5, 172.105.181.5, 172.105.161.5","ipv6":"2400:8907::f03c:92ff:fe6e:ec8, 2400:8907::f03c:92ff:fe6e:98e4, 2400:8907::f03c:92ff:fe6e:1c58, 2400:8907::f03c:92ff:fe6e:c299, 2400:8907::f03c:92ff:fe6e:c210, 2400:8907::f03c:92ff:fe6e:c219, 2400:8907::f03c:92ff:fe6e:1c5c, 2400:8907::f03c:92ff:fe6e:c24e, 2400:8907::f03c:92ff:fe6e:e6b, 2400:8907::f03c:92ff:fe6e:e3d"}},{"id":"us-iad","label":"Washington, DC","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"139.144.192.62, 139.144.192.60, 139.144.192.61, 139.144.192.53, 139.144.192.54, 139.144.192.67, 139.144.192.69, 139.144.192.66, 139.144.192.52, 139.144.192.68","ipv6":"2600:3c05::f03c:93ff:feb6:43b6, 2600:3c05::f03c:93ff:feb6:4365, 2600:3c05::f03c:93ff:feb6:43c2, 2600:3c05::f03c:93ff:feb6:e441, 2600:3c05::f03c:93ff:feb6:94ef, 2600:3c05::f03c:93ff:feb6:94ba, 2600:3c05::f03c:93ff:feb6:94a8, 2600:3c05::f03c:93ff:feb6:9413, 2600:3c05::f03c:93ff:feb6:9443, 2600:3c05::f03c:93ff:feb6:94e0"}},{"id":"us-ord","label":"Chicago, IL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.0.17, 172.232.0.16, 172.232.0.21, 172.232.0.13, 172.232.0.22, 172.232.0.9, 172.232.0.19, 172.232.0.20, 172.232.0.15, 172.232.0.18","ipv6":"2600:3c06::f03c:93ff:fed0:e5fc, 2600:3c06::f03c:93ff:fed0:e54b, 2600:3c06::f03c:93ff:fed0:e572, 2600:3c06::f03c:93ff:fed0:e530, 2600:3c06::f03c:93ff:fed0:e597, 2600:3c06::f03c:93ff:fed0:e511, 2600:3c06::f03c:93ff:fed0:e5f2, 2600:3c06::f03c:93ff:fed0:e5bf, 2600:3c06::f03c:93ff:fed0:e529, 2600:3c06::f03c:93ff:fed0:e5a3"}},{"id":"fr-par","label":"Paris, FR","country":"fr","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.32.21, 172.232.32.23, 172.232.32.17, 172.232.32.18, 172.232.32.16, 172.232.32.22, 172.232.32.20, 172.232.32.14, 172.232.32.11, 172.232.32.12","ipv6":"2600:3c07::f03c:93ff:fef2:2e63, 2600:3c07::f03c:93ff:fef2:2ec7, 2600:3c07::f03c:93ff:fef2:0dee, 2600:3c07::f03c:93ff:fef2:0d25, 2600:3c07::f03c:93ff:fef2:0de0, 2600:3c07::f03c:93ff:fef2:2e29, 2600:3c07::f03c:93ff:fef2:0dda, 2600:3c07::f03c:93ff:fef2:0d82, 2600:3c07::f03c:93ff:fef2:b3ac, 2600:3c07::f03c:93ff:fef2:b3a8"}},{"id":"us-central","label":"Dallas, TX","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"72.14.179.5, 72.14.188.5, 173.255.199.5, 66.228.53.5, 96.126.122.5, 96.126.124.5, 96.126.127.5, 198.58.107.5, 198.58.111.5, 23.239.24.5","ipv6":"2600:3c00::2, 2600:3c00::9, 2600:3c00::7, 2600:3c00::5, 2600:3c00::3, 2600:3c00::8, 2600:3c00::6, 2600:3c00::4, 2600:3c00::c, 2600:3c00::b"}},{"id":"us-west","label":"Fremont, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"173.230.145.5, 173.230.147.5, 173.230.155.5, 173.255.212.5, 173.255.219.5, 173.255.241.5, 173.255.243.5, 173.255.244.5, 74.207.241.5, 74.207.242.5","ipv6":"2600:3c01::2, 2600:3c01::9, 2600:3c01::5, 2600:3c01::7, 2600:3c01::3, 2600:3c01::8, 2600:3c01::4, 2600:3c01::b, 2600:3c01::c, 2600:3c01::6"}},{"id":"us-southeast","label":"Atlanta, GA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"74.207.231.5, 173.230.128.5, 173.230.129.5, 173.230.136.5, 173.230.140.5, 66.228.59.5, 66.228.62.5, 50.116.35.5, 50.116.41.5, 23.239.18.5","ipv6":"2600:3c02::3, 2600:3c02::5, 2600:3c02::4, 2600:3c02::6, 2600:3c02::c, 2600:3c02::7, 2600:3c02::2, 2600:3c02::9, 2600:3c02::8, 2600:3c02::b"}},{"id":"us-east","label":"Newark, NJ","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Bare Metal","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"66.228.42.5, 96.126.106.5, 50.116.53.5, 50.116.58.5, 50.116.61.5, 50.116.62.5, 66.175.211.5, 97.107.133.4, 207.192.69.4, 207.192.69.5","ipv6":"2600:3c03::7, 2600:3c03::4, 2600:3c03::9, 2600:3c03::6, 2600:3c03::3, 2600:3c03::c, 2600:3c03::5, 2600:3c03::b, 2600:3c03::2, 2600:3c03::8"}},{"id":"eu-west","label":"London, UK","country":"gb","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"178.79.182.5, 176.58.107.5, 176.58.116.5, 176.58.121.5, 151.236.220.5, 212.71.252.5, 212.71.253.5, 109.74.192.20, 109.74.193.20, 109.74.194.20","ipv6":"2a01:7e00::9, 2a01:7e00::3, 2a01:7e00::c, 2a01:7e00::5, 2a01:7e00::6, 2a01:7e00::8, 2a01:7e00::b, 2a01:7e00::4, 2a01:7e00::7, 2a01:7e00::2"}},{"id":"ap-south","label":"Singapore, SG","country":"sg","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.11.5, 139.162.13.5, 139.162.14.5, 139.162.15.5, 139.162.16.5, 139.162.21.5, 139.162.27.5, 103.3.60.18, 103.3.60.19, 103.3.60.20","ipv6":"2400:8901::5, 2400:8901::4, 2400:8901::b, 2400:8901::3, 2400:8901::9, 2400:8901::2, 2400:8901::8, 2400:8901::7, 2400:8901::c, 2400:8901::6"}},{"id":"eu-central","label":"Frankfurt, DE","country":"de","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.130.5, 139.162.131.5, 139.162.132.5, 139.162.133.5, 139.162.134.5, 139.162.135.5, 139.162.136.5, 139.162.137.5, 139.162.138.5, 139.162.139.5","ipv6":"2a01:7e01::5, 2a01:7e01::9, 2a01:7e01::7, 2a01:7e01::c, 2a01:7e01::2, 2a01:7e01::4, 2a01:7e01::3, 2a01:7e01::6, 2a01:7e01::b, 2a01:7e01::8"}},{"id":"ap-northeast","label":"Tokyo, JP","country":"jp","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.66.5, 139.162.67.5, 139.162.68.5, 139.162.69.5, 139.162.70.5, 139.162.71.5, 139.162.72.5, 139.162.73.5, 139.162.74.5, 139.162.75.5","ipv6":"2400:8902::3, 2400:8902::6, 2400:8902::c, 2400:8902::4, 2400:8902::2, 2400:8902::8, 2400:8902::7, 2400:8902::5, 2400:8902::b, 2400:8902::9"}},{"id": "id-cgk","label": "Jakarta, ID","country": "id","capabilities": ["Linodes","NodeBalancers", "Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Premium Plans"],"status": "ok","resolvers": {"ipv4": "172.232.224.23, 172.232.224.32, 172.232.224.26, 172.232.224.27, 172.232.224.21, 172.232.224.24, 172.232.224.22, 172.232.224.20, 172.232.224.31, 172.232.224.28","ipv6": "2600:3c0c::f03c:93ff:feed:a90b, 2600:3c0c::f03c:93ff:feed:a9a5, 2600:3c0c::f03c:93ff:feed:a935, 2600:3c0c::f03c:93ff:feed:a930, 2600:3c0c::f03c:93ff:feed:a95c, 2600:3c0c::f03c:93ff:feed:a9ad, 2600:3c0c::f03c:93ff:feed:a9f2, 2600:3c0c::f03c:93ff:feed:a9ff, 2600:3c0c::f03c:93ff:feed:a9c8, 2600:3c0c::f03c:93ff:feed:a96b"}}, {"id": "br-gru","label": "Sao Paulo, BR","country": "br","capabilities": ["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Premium Plans"],"status": "ok","resolvers": {"ipv4": "172.233.0.4, 172.233.0.9, 172.233.0.7, 172.233.0.12, 172.233.0.5, 172.233.0.13, 172.233.0.10, 172.233.0.6, 172.233.0.8, 172.233.0.11","ipv6": "2600:3c0d::f03c:93ff:fe3d:51cb, 2600:3c0d::f03c:93ff:fe3d:51a7, 2600:3c0d::f03c:93ff:fe3d:51a9, 2600:3c0d::f03c:93ff:fe3d:5119, 2600:3c0d::f03c:93ff:fe3d:51fe, 2600:3c0d::f03c:93ff:fe3d:517c, 2600:3c0d::f03c:93ff:fe3d:5144, 2600:3c0d::f03c:93ff:fe3d:5170, 2600:3c0d::f03c:93ff:fe3d:51cc, 2600:3c0d::f03c:93ff:fe3d:516c"}}],"page":1,"pages":1,"results":14} \ No newline at end of file +{"data":[{"id":"ap-west","label":"Mumbai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.34.5, 172.105.35.5, 172.105.36.5, 172.105.37.5, 172.105.38.5, 172.105.39.5, 172.105.40.5, 172.105.41.5, 172.105.42.5, 172.105.43.5","ipv6":"2400:8904::f03c:91ff:fea5:659, 2400:8904::f03c:91ff:fea5:9282, 2400:8904::f03c:91ff:fea5:b9b3, 2400:8904::f03c:91ff:fea5:925a, 2400:8904::f03c:91ff:fea5:22cb, 2400:8904::f03c:91ff:fea5:227a, 2400:8904::f03c:91ff:fea5:924c, 2400:8904::f03c:91ff:fea5:f7e2, 2400:8904::f03c:91ff:fea5:2205, 2400:8904::f03c:91ff:fea5:9207"}},{"id":"ca-central","label":"Toronto, CA","country":"ca","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.0.5, 172.105.3.5, 172.105.4.5, 172.105.5.5, 172.105.6.5, 172.105.7.5, 172.105.8.5, 172.105.9.5, 172.105.10.5, 172.105.11.5","ipv6":"2600:3c04::f03c:91ff:fea9:f63, 2600:3c04::f03c:91ff:fea9:f6d, 2600:3c04::f03c:91ff:fea9:f80, 2600:3c04::f03c:91ff:fea9:f0f, 2600:3c04::f03c:91ff:fea9:f99, 2600:3c04::f03c:91ff:fea9:fbd, 2600:3c04::f03c:91ff:fea9:fdd, 2600:3c04::f03c:91ff:fea9:fe2, 2600:3c04::f03c:91ff:fea9:f68, 2600:3c04::f03c:91ff:fea9:f4a"}},{"id":"ap-southeast","label":"Sydney, AU","country":"au","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.166.5, 172.105.169.5, 172.105.168.5, 172.105.172.5, 172.105.162.5, 172.105.170.5, 172.105.167.5, 172.105.171.5, 172.105.181.5, 172.105.161.5","ipv6":"2400:8907::f03c:92ff:fe6e:ec8, 2400:8907::f03c:92ff:fe6e:98e4, 2400:8907::f03c:92ff:fe6e:1c58, 2400:8907::f03c:92ff:fe6e:c299, 2400:8907::f03c:92ff:fe6e:c210, 2400:8907::f03c:92ff:fe6e:c219, 2400:8907::f03c:92ff:fe6e:1c5c, 2400:8907::f03c:92ff:fe6e:c24e, 2400:8907::f03c:92ff:fe6e:e6b, 2400:8907::f03c:92ff:fe6e:e3d"}},{"id":"us-iad","label":"Washington, DC","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"139.144.192.62, 139.144.192.60, 139.144.192.61, 139.144.192.53, 139.144.192.54, 139.144.192.67, 139.144.192.69, 139.144.192.66, 139.144.192.52, 139.144.192.68","ipv6":"2600:3c05::f03c:93ff:feb6:43b6, 2600:3c05::f03c:93ff:feb6:4365, 2600:3c05::f03c:93ff:feb6:43c2, 2600:3c05::f03c:93ff:feb6:e441, 2600:3c05::f03c:93ff:feb6:94ef, 2600:3c05::f03c:93ff:feb6:94ba, 2600:3c05::f03c:93ff:feb6:94a8, 2600:3c05::f03c:93ff:feb6:9413, 2600:3c05::f03c:93ff:feb6:9443, 2600:3c05::f03c:93ff:feb6:94e0"}},{"id":"us-ord","label":"Chicago, IL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.0.17, 172.232.0.16, 172.232.0.21, 172.232.0.13, 172.232.0.22, 172.232.0.9, 172.232.0.19, 172.232.0.20, 172.232.0.15, 172.232.0.18","ipv6":"2600:3c06::f03c:93ff:fed0:e5fc, 2600:3c06::f03c:93ff:fed0:e54b, 2600:3c06::f03c:93ff:fed0:e572, 2600:3c06::f03c:93ff:fed0:e530, 2600:3c06::f03c:93ff:fed0:e597, 2600:3c06::f03c:93ff:fed0:e511, 2600:3c06::f03c:93ff:fed0:e5f2, 2600:3c06::f03c:93ff:fed0:e5bf, 2600:3c06::f03c:93ff:fed0:e529, 2600:3c06::f03c:93ff:fed0:e5a3"}},{"id":"fr-par","label":"Paris, FR","country":"fr","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.32.21, 172.232.32.23, 172.232.32.17, 172.232.32.18, 172.232.32.16, 172.232.32.22, 172.232.32.20, 172.232.32.14, 172.232.32.11, 172.232.32.12","ipv6":"2600:3c07::f03c:93ff:fef2:2e63, 2600:3c07::f03c:93ff:fef2:2ec7, 2600:3c07::f03c:93ff:fef2:0dee, 2600:3c07::f03c:93ff:fef2:0d25, 2600:3c07::f03c:93ff:fef2:0de0, 2600:3c07::f03c:93ff:fef2:2e29, 2600:3c07::f03c:93ff:fef2:0dda, 2600:3c07::f03c:93ff:fef2:0d82, 2600:3c07::f03c:93ff:fef2:b3ac, 2600:3c07::f03c:93ff:fef2:b3a8"}},{"id":"us-sea","label":"Seattle, WA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.160.19, 172.232.160.21, 172.232.160.17, 172.232.160.15, 172.232.160.18, 172.232.160.8, 172.232.160.12, 172.232.160.11, 172.232.160.14, 172.232.160.16","ipv6":"2600:3c0a::f03c:93ff:fe54:c6da, 2600:3c0a::f03c:93ff:fe54:c691, 2600:3c0a::f03c:93ff:fe54:c68d, 2600:3c0a::f03c:93ff:fe54:c61e, 2600:3c0a::f03c:93ff:fe54:c653, 2600:3c0a::f03c:93ff:fe54:c64c, 2600:3c0a::f03c:93ff:fe54:c68a, 2600:3c0a::f03c:93ff:fe54:c697, 2600:3c0a::f03c:93ff:fe54:c60f, 2600:3c0a::f03c:93ff:fe54:c6a0"}},{"id":"br-gru","label":"Sao Paulo, BR","country":"br","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.0.4, 172.233.0.9, 172.233.0.7, 172.233.0.12, 172.233.0.5, 172.233.0.13, 172.233.0.10, 172.233.0.6, 172.233.0.8, 172.233.0.11","ipv6":"2600:3c0d::f03c:93ff:fe3d:51cb, 2600:3c0d::f03c:93ff:fe3d:51a7, 2600:3c0d::f03c:93ff:fe3d:51a9, 2600:3c0d::f03c:93ff:fe3d:5119, 2600:3c0d::f03c:93ff:fe3d:51fe, 2600:3c0d::f03c:93ff:fe3d:517c, 2600:3c0d::f03c:93ff:fe3d:5144, 2600:3c0d::f03c:93ff:fe3d:5170, 2600:3c0d::f03c:93ff:fe3d:51cc, 2600:3c0d::f03c:93ff:fe3d:516c"}},{"id":"nl-ams","label":"Amsterdam, NL","country":"nl","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.33.36, 172.233.33.38, 172.233.33.35, 172.233.33.39, 172.233.33.34, 172.233.33.33, 172.233.33.31, 172.233.33.30, 172.233.33.37, 172.233.33.32","ipv6":"2600:3c0e::f03c:93ff:fe9d:2d10, 2600:3c0e::f03c:93ff:fe9d:2d89, 2600:3c0e::f03c:93ff:fe9d:2d79, 2600:3c0e::f03c:93ff:fe9d:2d96, 2600:3c0e::f03c:93ff:fe9d:2da5, 2600:3c0e::f03c:93ff:fe9d:2d34, 2600:3c0e::f03c:93ff:fe9d:2d68, 2600:3c0e::f03c:93ff:fe9d:2d17, 2600:3c0e::f03c:93ff:fe9d:2d45, 2600:3c0e::f03c:93ff:fe9d:2d5c"}},{"id":"se-sto","label":"Stockholm, SE","country":"se","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.128.24, 172.232.128.26, 172.232.128.20, 172.232.128.22, 172.232.128.25, 172.232.128.19, 172.232.128.23, 172.232.128.18, 172.232.128.21, 172.232.128.27","ipv6":"2600:3c09::f03c:93ff:fea9:4dbe, 2600:3c09::f03c:93ff:fea9:4d63, 2600:3c09::f03c:93ff:fea9:4dce, 2600:3c09::f03c:93ff:fea9:4dbb, 2600:3c09::f03c:93ff:fea9:4d99, 2600:3c09::f03c:93ff:fea9:4d26, 2600:3c09::f03c:93ff:fea9:4de0, 2600:3c09::f03c:93ff:fea9:4d69, 2600:3c09::f03c:93ff:fea9:4dbf, 2600:3c09::f03c:93ff:fea9:4da6"}},{"id":"in-maa","label":"Chennai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.96.17, 172.232.96.26, 172.232.96.19, 172.232.96.20, 172.232.96.25, 172.232.96.21, 172.232.96.18, 172.232.96.22, 172.232.96.23, 172.232.96.24","ipv6":"2600:3c08::f03c:93ff:fe7c:1135, 2600:3c08::f03c:93ff:fe7c:11f8, 2600:3c08::f03c:93ff:fe7c:11d2, 2600:3c08::f03c:93ff:fe7c:11a7, 2600:3c08::f03c:93ff:fe7c:11ad, 2600:3c08::f03c:93ff:fe7c:110a, 2600:3c08::f03c:93ff:fe7c:11f9, 2600:3c08::f03c:93ff:fe7c:1137, 2600:3c08::f03c:93ff:fe7c:11db, 2600:3c08::f03c:93ff:fe7c:1164"}},{"id":"jp-osa","label":"Osaka, JP","country":"jp","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.64.44, 172.233.64.43, 172.233.64.37, 172.233.64.40, 172.233.64.46, 172.233.64.41, 172.233.64.39, 172.233.64.42, 172.233.64.45, 172.233.64.38","ipv6":"2400:8905::f03c:93ff:fe9d:b085, 2400:8905::f03c:93ff:fe9d:b012, 2400:8905::f03c:93ff:fe9d:b09b, 2400:8905::f03c:93ff:fe9d:b0d8, 2400:8905::f03c:93ff:fe9d:259f, 2400:8905::f03c:93ff:fe9d:b006, 2400:8905::f03c:93ff:fe9d:b084, 2400:8905::f03c:93ff:fe9d:b0ce, 2400:8905::f03c:93ff:fe9d:25ea, 2400:8905::f03c:93ff:fe9d:b086"}},{"id":"it-mil","label":"Milan, IT","country":"it","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.192.19, 172.232.192.18, 172.232.192.16, 172.232.192.20, 172.232.192.24, 172.232.192.21, 172.232.192.22, 172.232.192.17, 172.232.192.15, 172.232.192.23","ipv6":"2600:3c0b::f03c:93ff:feba:d513, 2600:3c0b::f03c:93ff:feba:d5c3, 2600:3c0b::f03c:93ff:feba:d597, 2600:3c0b::f03c:93ff:feba:d5fb, 2600:3c0b::f03c:93ff:feba:d51f, 2600:3c0b::f03c:93ff:feba:d58e, 2600:3c0b::f03c:93ff:feba:d5d5, 2600:3c0b::f03c:93ff:feba:d534, 2600:3c0b::f03c:93ff:feba:d57c, 2600:3c0b::f03c:93ff:feba:d529"}},{"id":"us-mia","label":"Miami, FL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.160.34, 172.233.160.27, 172.233.160.30, 172.233.160.29, 172.233.160.32, 172.233.160.28, 172.233.160.33, 172.233.160.26, 172.233.160.25, 172.233.160.31","ipv6":"2a01:7e04::f03c:93ff:fead:d31f, 2a01:7e04::f03c:93ff:fead:d37f, 2a01:7e04::f03c:93ff:fead:d30c, 2a01:7e04::f03c:93ff:fead:d318, 2a01:7e04::f03c:93ff:fead:d316, 2a01:7e04::f03c:93ff:fead:d339, 2a01:7e04::f03c:93ff:fead:d367, 2a01:7e04::f03c:93ff:fead:d395, 2a01:7e04::f03c:93ff:fead:d3d0, 2a01:7e04::f03c:93ff:fead:d38e"}},{"id":"id-cgk","label":"Jakarta, ID","country":"id","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.224.23, 172.232.224.32, 172.232.224.26, 172.232.224.27, 172.232.224.21, 172.232.224.24, 172.232.224.22, 172.232.224.20, 172.232.224.31, 172.232.224.28","ipv6":"2600:3c0c::f03c:93ff:feed:a90b, 2600:3c0c::f03c:93ff:feed:a9a5, 2600:3c0c::f03c:93ff:feed:a935, 2600:3c0c::f03c:93ff:feed:a930, 2600:3c0c::f03c:93ff:feed:a95c, 2600:3c0c::f03c:93ff:feed:a9ad, 2600:3c0c::f03c:93ff:feed:a9f2, 2600:3c0c::f03c:93ff:feed:a9ff, 2600:3c0c::f03c:93ff:feed:a9c8, 2600:3c0c::f03c:93ff:feed:a96b"}},{"id":"us-lax","label":"Los Angeles, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.128.45, 172.233.128.38, 172.233.128.53, 172.233.128.37, 172.233.128.34, 172.233.128.36, 172.233.128.33, 172.233.128.39, 172.233.128.43, 172.233.128.44","ipv6":"2a01:7e03::f03c:93ff:feb1:b789, 2a01:7e03::f03c:93ff:feb1:b717, 2a01:7e03::f03c:93ff:feb1:b707, 2a01:7e03::f03c:93ff:feb1:b7ab, 2a01:7e03::f03c:93ff:feb1:b7e2, 2a01:7e03::f03c:93ff:feb1:b709, 2a01:7e03::f03c:93ff:feb1:b7a6, 2a01:7e03::f03c:93ff:feb1:b750, 2a01:7e03::f03c:93ff:feb1:b76e, 2a01:7e03::f03c:93ff:feb1:b7a2"}},{"id":"us-central","label":"Dallas, TX","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"72.14.179.5, 72.14.188.5, 173.255.199.5, 66.228.53.5, 96.126.122.5, 96.126.124.5, 96.126.127.5, 198.58.107.5, 198.58.111.5, 23.239.24.5","ipv6":"2600:3c00::2, 2600:3c00::9, 2600:3c00::7, 2600:3c00::5, 2600:3c00::3, 2600:3c00::8, 2600:3c00::6, 2600:3c00::4, 2600:3c00::c, 2600:3c00::b"}},{"id":"us-west","label":"Fremont, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"173.230.145.5, 173.230.147.5, 173.230.155.5, 173.255.212.5, 173.255.219.5, 173.255.241.5, 173.255.243.5, 173.255.244.5, 74.207.241.5, 74.207.242.5","ipv6":"2600:3c01::2, 2600:3c01::9, 2600:3c01::5, 2600:3c01::7, 2600:3c01::3, 2600:3c01::8, 2600:3c01::4, 2600:3c01::b, 2600:3c01::c, 2600:3c01::6"}},{"id":"us-southeast","label":"Atlanta, GA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"74.207.231.5, 173.230.128.5, 173.230.129.5, 173.230.136.5, 173.230.140.5, 66.228.59.5, 66.228.62.5, 50.116.35.5, 50.116.41.5, 23.239.18.5","ipv6":"2600:3c02::3, 2600:3c02::5, 2600:3c02::4, 2600:3c02::6, 2600:3c02::c, 2600:3c02::7, 2600:3c02::2, 2600:3c02::9, 2600:3c02::8, 2600:3c02::b"}},{"id":"us-east","label":"Newark, NJ","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Bare Metal","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"66.228.42.5, 96.126.106.5, 50.116.53.5, 50.116.58.5, 50.116.61.5, 50.116.62.5, 66.175.211.5, 97.107.133.4, 207.192.69.4, 207.192.69.5","ipv6":"2600:3c03::7, 2600:3c03::4, 2600:3c03::9, 2600:3c03::6, 2600:3c03::3, 2600:3c03::c, 2600:3c03::5, 2600:3c03::b, 2600:3c03::2, 2600:3c03::8"}},{"id":"eu-west","label":"London, UK","country":"gb","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"178.79.182.5, 176.58.107.5, 176.58.116.5, 176.58.121.5, 151.236.220.5, 212.71.252.5, 212.71.253.5, 109.74.192.20, 109.74.193.20, 109.74.194.20","ipv6":"2a01:7e00::9, 2a01:7e00::3, 2a01:7e00::c, 2a01:7e00::5, 2a01:7e00::6, 2a01:7e00::8, 2a01:7e00::b, 2a01:7e00::4, 2a01:7e00::7, 2a01:7e00::2"}},{"id":"ap-south","label":"Singapore, SG","country":"sg","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.11.5, 139.162.13.5, 139.162.14.5, 139.162.15.5, 139.162.16.5, 139.162.21.5, 139.162.27.5, 103.3.60.18, 103.3.60.19, 103.3.60.20","ipv6":"2400:8901::5, 2400:8901::4, 2400:8901::b, 2400:8901::3, 2400:8901::9, 2400:8901::2, 2400:8901::8, 2400:8901::7, 2400:8901::c, 2400:8901::6"}},{"id":"eu-central","label":"Frankfurt, DE","country":"de","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.130.5, 139.162.131.5, 139.162.132.5, 139.162.133.5, 139.162.134.5, 139.162.135.5, 139.162.136.5, 139.162.137.5, 139.162.138.5, 139.162.139.5","ipv6":"2a01:7e01::5, 2a01:7e01::9, 2a01:7e01::7, 2a01:7e01::c, 2a01:7e01::2, 2a01:7e01::4, 2a01:7e01::3, 2a01:7e01::6, 2a01:7e01::b, 2a01:7e01::8"}}],"page":1,"pages":1,"results":23} \ No newline at end of file diff --git a/packages/manager/src/cachedData/typesLegacy.json b/packages/manager/src/cachedData/typesLegacy.json index 5b57f35e381..2afeb52418e 100644 --- a/packages/manager/src/cachedData/typesLegacy.json +++ b/packages/manager/src/cachedData/typesLegacy.json @@ -1 +1 @@ -{"data":[{"id":"standard-1","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"addons":{"backups":{"price":{"hourly":0.008,"monthly":5}}},"memory":512,"disk":24576,"transfer":2000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-2"},{"id":"standard-2","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.054,"monthly":36},"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5}}},"memory":768,"disk":36864,"transfer":3000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-3-s"},{"id":"standard-3","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"addons":{"backups":{"price":{"hourly":0.015,"monthly":10}}},"memory":1024,"disk":49152,"transfer":4000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4"},{"id":"standard-4","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"addons":{"backups":{"price":{"hourly":0.024,"monthly":15}}},"memory":1536,"disk":73728,"transfer":6000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4-s"},{"id":"standard-5","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"addons":{"backups":{"price":{"hourly":0.03,"monthly":20}}},"memory":2048,"disk":98304,"transfer":8000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-6"},{"id":"standard-6","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"addons":{"backups":{"price":{"hourly":0.06,"monthly":40}}},"memory":4096,"disk":196608,"transfer":16000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-8"},{"id":"standard-7","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.576,"monthly":384},"addons":{"backups":{"price":{"hourly":0.12,"monthly":80}}},"memory":8192,"disk":393216,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-16"},{"id":"standard-8","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"addons":{"backups":{"price":{"hourly":0.18,"monthly":120}}},"memory":12288,"disk":589824,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20"},{"id":"standard-9","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"addons":{"backups":{"price":{"hourly":0.24,"monthly":160}}},"memory":16384,"disk":786432,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-24"},{"id":"standard-10","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"addons":{"backups":{"price":{"hourly":0.3,"monthly":200}}},"memory":20480,"disk":983040,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20-s"},{"id":"standard-46","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"addons":{"backups":{"price":{"hourly":0.008,"monthly":5}}},"memory":1024,"disk":24576,"transfer":2000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-2"},{"id":"standard-47","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.06,"monthly":36},"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5}}},"memory":1536,"disk":36864,"transfer":3000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-3-s"},{"id":"standard-48","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"addons":{"backups":{"price":{"hourly":0.015,"monthly":10}}},"memory":2048,"disk":49152,"transfer":4000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4"},{"id":"standard-49","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"addons":{"backups":{"price":{"hourly":0.024,"monthly":15}}},"memory":3072,"disk":73728,"transfer":6000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4-s"},{"id":"standard-50","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"addons":{"backups":{"price":{"hourly":0.03,"monthly":20}}},"memory":4096,"disk":98304,"transfer":8000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-6"},{"id":"standard-51","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"addons":{"backups":{"price":{"hourly":0.06,"monthly":40}}},"memory":8192,"disk":196608,"transfer":16000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-8"},{"id":"standard-52","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.6,"monthly":384},"addons":{"backups":{"price":{"hourly":0.12,"monthly":80}}},"memory":16384,"disk":393216,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-16"},{"id":"standard-53","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"addons":{"backups":{"price":{"hourly":0.18,"monthly":120}}},"memory":24576,"disk":589824,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20"},{"id":"standard-54","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"addons":{"backups":{"price":{"hourly":0.24,"monthly":160}}},"memory":32768,"disk":786432,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-24"},{"id":"standard-55","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"addons":{"backups":{"price":{"hourly":0.3,"monthly":200}}},"memory":40960,"disk":983040,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20-s"},{"id":"standard-92","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"addons":{"backups":{"price":{"hourly":0.008,"monthly":5}}},"memory":1024,"disk":49152,"transfer":2000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-2"},{"id":"standard-93","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.06,"monthly":36},"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5}}},"memory":1536,"disk":73728,"transfer":3000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-3-s"},{"id":"standard-94","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"addons":{"backups":{"price":{"hourly":0.015,"monthly":10}}},"memory":2048,"disk":98304,"transfer":4000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4"},{"id":"standard-95","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"addons":{"backups":{"price":{"hourly":0.024,"monthly":15}}},"memory":3072,"disk":147456,"transfer":6000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4-s"},{"id":"standard-96","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"addons":{"backups":{"price":{"hourly":0.03,"monthly":20}}},"memory":4096,"disk":196608,"transfer":8000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-6"},{"id":"standard-97","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"addons":{"backups":{"price":{"hourly":0.06,"monthly":40}}},"memory":8192,"disk":393216,"transfer":16000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-8"},{"id":"standard-98","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.576,"monthly":384},"addons":{"backups":{"price":{"hourly":0.12,"monthly":80}}},"memory":16384,"disk":786432,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-16"},{"id":"standard-99","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"addons":{"backups":{"price":{"hourly":0.18,"monthly":120}}},"memory":24576,"disk":1179648,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20"},{"id":"standard-100","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"addons":{"backups":{"price":{"hourly":0.24,"monthly":160}}},"memory":32768,"disk":1572864,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-24"},{"id":"standard-101","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"addons":{"backups":{"price":{"hourly":0.3,"monthly":200}}},"memory":40960,"disk":1966080,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20-s"},{"id":"g4-standard-1","label":"Linode 2GB (pending upgrade)","price":{"hourly":0.018,"monthly":12},"addons":{"backups":{"price":{"hourly":0.004,"monthly":2.5}}},"memory":1024,"disk":24576,"transfer":2000,"vcpus":1,"gpus":0,"network_out":125,"class":"standard","successor":"g6-standard-1"},{"id":"g4-standard-2","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"addons":{"backups":{"price":{"hourly":0.008,"monthly":5}}},"memory":2048,"disk":49152,"transfer":3000,"vcpus":2,"gpus":0,"network_out":250,"class":"standard","successor":"g6-standard-2"},{"id":"g4-standard-3-2","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.06,"monthly":36},"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5}}},"memory":3072,"disk":73728,"transfer":3000,"vcpus":3,"gpus":0,"network_out":375,"class":"standard","successor":"g6-standard-3-s"},{"id":"g4-standard-4","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"addons":{"backups":{"price":{"hourly":0.015,"monthly":10}}},"memory":4096,"disk":98304,"transfer":4000,"vcpus":4,"gpus":0,"network_out":500,"class":"standard","successor":"g6-standard-4"},{"id":"g4-standard-4-s","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"addons":{"backups":{"price":{"hourly":0.024,"monthly":15}}},"memory":6144,"disk":147456,"transfer":6000,"vcpus":4,"gpus":0,"network_out":750,"class":"standard","successor":"g6-standard-4-s"},{"id":"g4-standard-6","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"addons":{"backups":{"price":{"hourly":0.03,"monthly":20}}},"memory":8192,"disk":196608,"transfer":8000,"vcpus":6,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-6"},{"id":"g4-standard-8","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"addons":{"backups":{"price":{"hourly":0.06,"monthly":40}}},"memory":16384,"disk":393216,"transfer":16000,"vcpus":8,"gpus":0,"network_out":2000,"class":"standard","successor":"g6-standard-8"},{"id":"g4-standard-12","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.576,"monthly":384},"addons":{"backups":{"price":{"hourly":0.12,"monthly":80}}},"memory":32768,"disk":786432,"transfer":20000,"vcpus":12,"gpus":0,"network_out":4000,"class":"standard","successor":"g6-standard-16"},{"id":"g4-standard-16","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"addons":{"backups":{"price":{"hourly":0.18,"monthly":120}}},"memory":49152,"disk":1179648,"transfer":20000,"vcpus":16,"gpus":0,"network_out":6000,"class":"standard","successor":"g6-standard-20"},{"id":"g4-standard-20","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"addons":{"backups":{"price":{"hourly":0.24,"monthly":160}}},"memory":65536,"disk":1572864,"transfer":20000,"vcpus":20,"gpus":0,"network_out":8000,"class":"standard","successor":"g6-standard-24"},{"id":"g4-standard-20-s1","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"addons":{"backups":{"price":{"hourly":0.3,"monthly":200}}},"memory":81920,"disk":1966080,"transfer":20000,"vcpus":20,"gpus":0,"network_out":10000,"class":"standard","successor":"g6-standard-20-s"},{"id":"g4-standard-20-s2","label":"Linode 192GB (pending upgrade)","price":{"hourly":1.728,"monthly":1152},"addons":{"backups":{"price":{"hourly":0.3,"monthly":200}}},"memory":98304,"disk":1966080,"transfer":20000,"vcpus":20,"gpus":0,"network_out":10000,"class":"standard","successor":"g6-standard-32"},{"id":"g5-nanode-1","label":"Nanode 1GB (pending upgrade)","price":{"hourly":0.0075,"monthly":5},"addons":{"backups":{"price":{"hourly":0.003,"monthly":2}}},"memory":1024,"disk":20480,"transfer":1000,"vcpus":1,"gpus":0,"network_out":1000,"class":"nanode","successor":"g6-nanode-1"},{"id":"g5-standard-1","label":"Linode 2GB (pending upgrade)","price":{"hourly":0.018,"monthly":12},"addons":{"backups":{"price":{"hourly":0.004,"monthly":2.5}}},"memory":2048,"disk":30720,"transfer":2000,"vcpus":1,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-1"},{"id":"g5-standard-2","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"addons":{"backups":{"price":{"hourly":0.008,"monthly":5}}},"memory":4096,"disk":49152,"transfer":3000,"vcpus":2,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-2"},{"id":"g5-standard-3-s","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.06,"monthly":36},"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5}}},"memory":6144,"disk":73728,"transfer":3000,"vcpus":3,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-3-s"},{"id":"g5-standard-4","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"addons":{"backups":{"price":{"hourly":0.015,"monthly":10}}},"memory":8192,"disk":98304,"transfer":4000,"vcpus":4,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-4"},{"id":"g5-standard-4-s","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"addons":{"backups":{"price":{"hourly":0.024,"monthly":15}}},"memory":10240,"disk":147456,"transfer":6000,"vcpus":4,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-4-s"},{"id":"g5-standard-6","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"addons":{"backups":{"price":{"hourly":0.03,"monthly":20}}},"memory":12288,"disk":196608,"transfer":8000,"vcpus":6,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-6"},{"id":"g5-standard-8","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"addons":{"backups":{"price":{"hourly":0.06,"monthly":40}}},"memory":24576,"disk":393216,"transfer":16000,"vcpus":8,"gpus":0,"network_out":2000,"class":"standard","successor":"g6-standard-8"},{"id":"g5-standard-12","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.576,"monthly":384},"addons":{"backups":{"price":{"hourly":0.12,"monthly":80}}},"memory":49152,"disk":786432,"transfer":20000,"vcpus":12,"gpus":0,"network_out":4000,"class":"standard","successor":"g6-standard-16"},{"id":"g5-standard-16","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"addons":{"backups":{"price":{"hourly":0.18,"monthly":120}}},"memory":65536,"disk":1179648,"transfer":20000,"vcpus":16,"gpus":0,"network_out":6000,"class":"standard","successor":"g6-standard-20"},{"id":"g5-standard-20","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"addons":{"backups":{"price":{"hourly":0.24,"monthly":160}}},"memory":81920,"disk":1572864,"transfer":20000,"vcpus":20,"gpus":0,"network_out":8000,"class":"standard","successor":"g6-standard-24"},{"id":"g5-standard-20-s1","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"addons":{"backups":{"price":{"hourly":0.3,"monthly":200}}},"memory":102400,"disk":1966080,"transfer":20000,"vcpus":20,"gpus":0,"network_out":10000,"class":"standard","successor":"g6-standard-20-s"},{"id":"g5-standard-20-s2","label":"Linode 192GB (pending upgrade)","price":{"hourly":1.728,"monthly":1152},"addons":{"backups":{"price":{"hourly":0.3,"monthly":200}}},"memory":122880,"disk":1966080,"transfer":20000,"vcpus":20,"gpus":0,"network_out":10000,"class":"standard","successor":"g6-standard-32"},{"id":"g5-highmem-1","label":"Linode 24GB (pending upgrade)","price":{"hourly":0.09,"monthly":60},"addons":{"backups":{"price":{"hourly":0.008,"monthly":5}}},"memory":16384,"disk":20480,"transfer":5000,"vcpus":1,"gpus":0,"network_out":1000,"class":"highmem","successor":"g6-highmem-1"},{"id":"g5-highmem-2","label":"Linode 48GB (pending upgrade)","price":{"hourly":0.18,"monthly":120},"addons":{"backups":{"price":{"hourly":0.015,"monthly":10}}},"memory":32768,"disk":40960,"transfer":6000,"vcpus":2,"gpus":0,"network_out":1500,"class":"highmem","successor":"g6-highmem-2"},{"id":"g5-highmem-4","label":"Linode 90GB (pending upgrade)","price":{"hourly":0.36,"monthly":240},"addons":{"backups":{"price":{"hourly":0.03,"monthly":20}}},"memory":61440,"disk":92160,"transfer":7000,"vcpus":4,"gpus":0,"network_out":3000,"class":"highmem","successor":"g6-highmem-4"},{"id":"g5-highmem-8","label":"Linode 150GB (pending upgrade)","price":{"hourly":0.72,"monthly":480},"addons":{"backups":{"price":{"hourly":0.06,"monthly":40}}},"memory":102400,"disk":204800,"transfer":8000,"vcpus":8,"gpus":0,"network_out":6000,"class":"highmem","successor":"g6-highmem-8"},{"id":"g5-highmem-16","label":"Linode 300GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"addons":{"backups":{"price":{"hourly":0.09,"monthly":60}}},"memory":204800,"disk":348160,"transfer":9000,"vcpus":16,"gpus":0,"network_out":10000,"class":"highmem","successor":"g6-highmem-16"},{"id":"g6-highmem-1","label":"Linode 24GB (pending upgrade)","price":{"hourly":0.09,"monthly":60},"addons":{"backups":{"price":{"hourly":0.0075,"monthly":5}}},"memory":24576,"disk":20480,"transfer":5000,"vcpus":1,"gpus":0,"network_out":5000,"class":"highmem","successor":"g7-highmem-1"},{"id":"g6-highmem-2","label":"Linode 48GB (pending upgrade)","price":{"hourly":0.18,"monthly":120},"addons":{"backups":{"price":{"hourly":0.015,"monthly":10}}},"memory":49152,"disk":40960,"transfer":6000,"vcpus":2,"gpus":0,"network_out":6000,"class":"highmem","successor":"g7-highmem-2"},{"id":"g6-highmem-4","label":"Linode 90GB (pending upgrade)","price":{"hourly":0.36,"monthly":240},"addons":{"backups":{"price":{"hourly":0.03,"monthly":20}}},"memory":92160,"disk":92160,"transfer":7000,"vcpus":4,"gpus":0,"network_out":7000,"class":"highmem","successor":"g7-highmem-4"},{"id":"g6-highmem-8","label":"Linode 150GB (pending upgrade)","price":{"hourly":0.72,"monthly":480},"addons":{"backups":{"price":{"hourly":0.06,"monthly":40}}},"memory":153600,"disk":204800,"transfer":8000,"vcpus":8,"gpus":0,"network_out":8000,"class":"highmem","successor":"g7-highmem-8"},{"id":"g6-highmem-16","label":"Linode 300GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"addons":{"backups":{"price":{"hourly":0.12,"monthly":80}}},"memory":307200,"disk":348160,"transfer":9000,"vcpus":16,"gpus":0,"network_out":9000,"class":"highmem","successor":"g7-highmem-16"}],"page":1,"pages":1,"results":65} \ No newline at end of file +{"data":[{"id":"standard-1","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"region_prices":[{"id":"id-cgk","hourly":0.043,"monthly":29},{"id":"br-gru","hourly":0.05,"monthly":34}],"addons":{"backups":{"price":{"hourly":0.008,"monthly":5},"region_prices":[{"id":"id-cgk","hourly":0.009,"monthly":6},{"id":"br-gru","hourly":0.01,"monthly":7}]}},"memory":512,"disk":24576,"transfer":2000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-2"},{"id":"standard-2","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.054,"monthly":36},"region_prices":[{"id":"id-cgk","hourly":0.065,"monthly":43},{"id":"br-gru","hourly":0.076,"monthly":50}],"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5},"region_prices":[{"id":"id-cgk","hourly":0.013,"monthly":9},{"id":"br-gru","hourly":0.016,"monthly":11}]}},"memory":768,"disk":36864,"transfer":3000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-3-s"},{"id":"standard-3","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"region_prices":[{"id":"id-cgk","hourly":0.086,"monthly":58},{"id":"br-gru","hourly":0.101,"monthly":67}],"addons":{"backups":{"price":{"hourly":0.015,"monthly":10},"region_prices":[{"id":"id-cgk","hourly":0.018,"monthly":12},{"id":"br-gru","hourly":0.021,"monthly":14}]}},"memory":1024,"disk":49152,"transfer":4000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4"},{"id":"standard-4","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"region_prices":[{"id":"id-cgk","hourly":0.13,"monthly":86},{"id":"br-gru","hourly":0.151,"monthly":101}],"addons":{"backups":{"price":{"hourly":0.024,"monthly":15},"region_prices":[{"id":"id-cgk","hourly":0.027,"monthly":18},{"id":"br-gru","hourly":0.031,"monthly":21}]}},"memory":1536,"disk":73728,"transfer":6000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4-s"},{"id":"standard-5","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"region_prices":[{"id":"id-cgk","hourly":0.173,"monthly":115},{"id":"br-gru","hourly":0.202,"monthly":134}],"addons":{"backups":{"price":{"hourly":0.03,"monthly":20},"region_prices":[{"id":"id-cgk","hourly":0.036,"monthly":24},{"id":"br-gru","hourly":0.042,"monthly":28}]}},"memory":2048,"disk":98304,"transfer":8000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-6"},{"id":"standard-6","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"region_prices":[{"id":"id-cgk","hourly":0.346,"monthly":230},{"id":"br-gru","hourly":0.403,"monthly":269}],"addons":{"backups":{"price":{"hourly":0.06,"monthly":40},"region_prices":[{"id":"id-cgk","hourly":0.072,"monthly":48},{"id":"br-gru","hourly":0.084,"monthly":56}]}},"memory":4096,"disk":196608,"transfer":16000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-8"},{"id":"standard-7","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.576,"monthly":384},"region_prices":[{"id":"id-cgk","hourly":0.691,"monthly":461},{"id":"br-gru","hourly":0.806,"monthly":538}],"addons":{"backups":{"price":{"hourly":0.12,"monthly":80},"region_prices":[{"id":"id-cgk","hourly":0.144,"monthly":96},{"id":"br-gru","hourly":0.168,"monthly":112}]}},"memory":8192,"disk":393216,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-16"},{"id":"standard-8","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"region_prices":[{"id":"id-cgk","hourly":1.037,"monthly":691},{"id":"br-gru","hourly":1.21,"monthly":806}],"addons":{"backups":{"price":{"hourly":0.18,"monthly":120},"region_prices":[{"id":"id-cgk","hourly":0.216,"monthly":144},{"id":"br-gru","hourly":0.252,"monthly":168}]}},"memory":12288,"disk":589824,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20"},{"id":"standard-9","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"region_prices":[{"id":"id-cgk","hourly":1.382,"monthly":922},{"id":"br-gru","hourly":1.613,"monthly":1075}],"addons":{"backups":{"price":{"hourly":0.24,"monthly":160},"region_prices":[{"id":"id-cgk","hourly":0.288,"monthly":192},{"id":"br-gru","hourly":0.336,"monthly":224}]}},"memory":16384,"disk":786432,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-24"},{"id":"standard-10","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"region_prices":[{"id":"id-cgk","hourly":1.728,"monthly":1152},{"id":"br-gru","hourly":2.02,"monthly":1344}],"addons":{"backups":{"price":{"hourly":0.3,"monthly":200},"region_prices":[{"id":"id-cgk","hourly":0.36,"monthly":240},{"id":"br-gru","hourly":0.42,"monthly":280}]}},"memory":20480,"disk":983040,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20-s"},{"id":"standard-46","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"region_prices":[{"id":"id-cgk","hourly":0.043,"monthly":28.8},{"id":"br-gru","hourly":0.05,"monthly":34}],"addons":{"backups":{"price":{"hourly":0.008,"monthly":5},"region_prices":[{"id":"id-cgk","hourly":0.009,"monthly":6},{"id":"br-gru","hourly":0.01,"monthly":7}]}},"memory":1024,"disk":24576,"transfer":2000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-2"},{"id":"standard-47","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.06,"monthly":36},"region_prices":[{"id":"id-cgk","hourly":0.065,"monthly":43.2},{"id":"br-gru","hourly":0.076,"monthly":50}],"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5},"region_prices":[{"id":"id-cgk","hourly":0.013,"monthly":9},{"id":"br-gru","hourly":0.016,"monthly":10.5}]}},"memory":1536,"disk":36864,"transfer":3000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-3-s"},{"id":"standard-48","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"region_prices":[{"id":"id-cgk","hourly":0.086,"monthly":57.6},{"id":"br-gru","hourly":0.101,"monthly":67}],"addons":{"backups":{"price":{"hourly":0.015,"monthly":10},"region_prices":[{"id":"id-cgk","hourly":0.018,"monthly":12},{"id":"br-gru","hourly":0.021,"monthly":14}]}},"memory":2048,"disk":49152,"transfer":4000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4"},{"id":"standard-49","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"region_prices":[{"id":"id-cgk","hourly":0.13,"monthly":86.4},{"id":"br-gru","hourly":0.151,"monthly":101}],"addons":{"backups":{"price":{"hourly":0.024,"monthly":15},"region_prices":[{"id":"id-cgk","hourly":0.027,"monthly":18},{"id":"br-gru","hourly":0.031,"monthly":21}]}},"memory":3072,"disk":73728,"transfer":6000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4-s"},{"id":"standard-50","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"region_prices":[{"id":"id-cgk","hourly":0.173,"monthly":115.2},{"id":"br-gru","hourly":0.202,"monthly":134}],"addons":{"backups":{"price":{"hourly":0.03,"monthly":20},"region_prices":[{"id":"id-cgk","hourly":0.036,"monthly":24},{"id":"br-gru","hourly":0.042,"monthly":28}]}},"memory":4096,"disk":98304,"transfer":8000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-6"},{"id":"standard-51","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"region_prices":[{"id":"id-cgk","hourly":0.346,"monthly":230.4},{"id":"br-gru","hourly":0.403,"monthly":269}],"addons":{"backups":{"price":{"hourly":0.06,"monthly":40},"region_prices":[{"id":"id-cgk","hourly":0.072,"monthly":48},{"id":"br-gru","hourly":0.084,"monthly":56}]}},"memory":8192,"disk":196608,"transfer":16000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-8"},{"id":"standard-52","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.6,"monthly":384},"region_prices":[{"id":"id-cgk","hourly":0.691,"monthly":460.8},{"id":"br-gru","hourly":0.806,"monthly":538}],"addons":{"backups":{"price":{"hourly":0.12,"monthly":80},"region_prices":[{"id":"id-cgk","hourly":0.144,"monthly":96},{"id":"br-gru","hourly":0.168,"monthly":112}]}},"memory":16384,"disk":393216,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-16"},{"id":"standard-53","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"region_prices":[{"id":"id-cgk","hourly":1.037,"monthly":691.2},{"id":"br-gru","hourly":1.21,"monthly":806}],"addons":{"backups":{"price":{"hourly":0.18,"monthly":120},"region_prices":[{"id":"id-cgk","hourly":0.216,"monthly":144},{"id":"br-gru","hourly":0.252,"monthly":168}]}},"memory":24576,"disk":589824,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20"},{"id":"standard-54","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"region_prices":[{"id":"id-cgk","hourly":1.382,"monthly":921.6},{"id":"br-gru","hourly":1.613,"monthly":1075}],"addons":{"backups":{"price":{"hourly":0.24,"monthly":160},"region_prices":[{"id":"id-cgk","hourly":0.288,"monthly":192},{"id":"br-gru","hourly":0.336,"monthly":224}]}},"memory":32768,"disk":786432,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-24"},{"id":"standard-55","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"region_prices":[{"id":"id-cgk","hourly":1.728,"monthly":1152},{"id":"br-gru","hourly":2.016,"monthly":1344}],"addons":{"backups":{"price":{"hourly":0.3,"monthly":200},"region_prices":[{"id":"id-cgk","hourly":0.36,"monthly":240},{"id":"br-gru","hourly":0.42,"monthly":280}]}},"memory":40960,"disk":983040,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20-s"},{"id":"standard-92","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"region_prices":[{"id":"id-cgk","hourly":0.043,"monthly":28.8},{"id":"br-gru","hourly":0.05,"monthly":33.6}],"addons":{"backups":{"price":{"hourly":0.008,"monthly":5},"region_prices":[{"id":"id-cgk","hourly":0.009,"monthly":6},{"id":"br-gru","hourly":0.01,"monthly":7}]}},"memory":1024,"disk":49152,"transfer":2000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-2"},{"id":"standard-93","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.06,"monthly":36},"region_prices":[{"id":"id-cgk","hourly":0.065,"monthly":43.2},{"id":"br-gru","hourly":0.076,"monthly":50.4}],"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5},"region_prices":[{"id":"id-cgk","hourly":0.013,"monthly":9},{"id":"br-gru","hourly":0.016,"monthly":10.5}]}},"memory":1536,"disk":73728,"transfer":3000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-3-s"},{"id":"standard-94","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"region_prices":[{"id":"id-cgk","hourly":0.086,"monthly":57.6},{"id":"br-gru","hourly":0.101,"monthly":67.2}],"addons":{"backups":{"price":{"hourly":0.015,"monthly":10},"region_prices":[{"id":"id-cgk","hourly":0.018,"monthly":12},{"id":"br-gru","hourly":0.021,"monthly":14}]}},"memory":2048,"disk":98304,"transfer":4000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4"},{"id":"standard-95","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"region_prices":[{"id":"id-cgk","hourly":0.13,"monthly":86.4},{"id":"br-gru","hourly":0.151,"monthly":100.8}],"addons":{"backups":{"price":{"hourly":0.024,"monthly":15},"region_prices":[{"id":"id-cgk","hourly":0.027,"monthly":18},{"id":"br-gru","hourly":0.031,"monthly":21}]}},"memory":3072,"disk":147456,"transfer":6000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-4-s"},{"id":"standard-96","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"region_prices":[{"id":"id-cgk","hourly":0.173,"monthly":115.2},{"id":"br-gru","hourly":0.202,"monthly":134.4}],"addons":{"backups":{"price":{"hourly":0.03,"monthly":20},"region_prices":[{"id":"id-cgk","hourly":0.036,"monthly":24},{"id":"br-gru","hourly":0.042,"monthly":28}]}},"memory":4096,"disk":196608,"transfer":8000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-6"},{"id":"standard-97","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"region_prices":[{"id":"id-cgk","hourly":0.346,"monthly":230.4},{"id":"br-gru","hourly":0.403,"monthly":268.8}],"addons":{"backups":{"price":{"hourly":0.06,"monthly":40},"region_prices":[{"id":"id-cgk","hourly":0.072,"monthly":48},{"id":"br-gru","hourly":0.084,"monthly":56}]}},"memory":8192,"disk":393216,"transfer":16000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-8"},{"id":"standard-98","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.576,"monthly":384},"region_prices":[{"id":"id-cgk","hourly":0.691,"monthly":460.8},{"id":"br-gru","hourly":0.806,"monthly":537.6}],"addons":{"backups":{"price":{"hourly":0.12,"monthly":80},"region_prices":[{"id":"id-cgk","hourly":0.144,"monthly":96},{"id":"br-gru","hourly":0.168,"monthly":112}]}},"memory":16384,"disk":786432,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-16"},{"id":"standard-99","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"region_prices":[{"id":"id-cgk","hourly":1.037,"monthly":691.2},{"id":"br-gru","hourly":1.21,"monthly":806.4}],"addons":{"backups":{"price":{"hourly":0.18,"monthly":120},"region_prices":[{"id":"id-cgk","hourly":0.216,"monthly":144},{"id":"br-gru","hourly":0.252,"monthly":168}]}},"memory":24576,"disk":1179648,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20"},{"id":"standard-100","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"region_prices":[{"id":"id-cgk","hourly":1.382,"monthly":921.6},{"id":"br-gru","hourly":1.613,"monthly":1075.2}],"addons":{"backups":{"price":{"hourly":0.24,"monthly":160},"region_prices":[{"id":"id-cgk","hourly":0.288,"monthly":192},{"id":"br-gru","hourly":0.336,"monthly":224}]}},"memory":32768,"disk":1572864,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-24"},{"id":"standard-101","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"region_prices":[{"id":"id-cgk","hourly":1.728,"monthly":1152},{"id":"br-gru","hourly":2.016,"monthly":1344}],"addons":{"backups":{"price":{"hourly":0.3,"monthly":200},"region_prices":[{"id":"id-cgk","hourly":0.36,"monthly":240},{"id":"br-gru","hourly":0.42,"monthly":280}]}},"memory":40960,"disk":1966080,"transfer":20000,"vcpus":8,"gpus":0,"network_out":250,"class":null,"successor":"g6-standard-20-s"},{"id":"g4-standard-1","label":"Linode 2GB (pending upgrade)","price":{"hourly":0.018,"monthly":12},"region_prices":[{"id":"id-cgk","hourly":0.022,"monthly":14.4},{"id":"br-gru","hourly":0.025,"monthly":16.8}],"addons":{"backups":{"price":{"hourly":0.004,"monthly":2.5},"region_prices":[{"id":"id-cgk","hourly":0.004,"monthly":3},{"id":"br-gru","hourly":0.005,"monthly":3.5}]}},"memory":1024,"disk":24576,"transfer":2000,"vcpus":1,"gpus":0,"network_out":125,"class":"standard","successor":"g6-standard-1"},{"id":"g4-standard-2","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"region_prices":[{"id":"id-cgk","hourly":0.043,"monthly":28.8},{"id":"br-gru","hourly":0.05,"monthly":33.6}],"addons":{"backups":{"price":{"hourly":0.008,"monthly":5},"region_prices":[{"id":"id-cgk","hourly":0.009,"monthly":6},{"id":"br-gru","hourly":0.01,"monthly":7}]}},"memory":2048,"disk":49152,"transfer":3000,"vcpus":2,"gpus":0,"network_out":250,"class":"standard","successor":"g6-standard-2"},{"id":"g4-standard-3-2","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.06,"monthly":36},"region_prices":[{"id":"id-cgk","hourly":0.065,"monthly":43.2},{"id":"br-gru","hourly":0.076,"monthly":50.4}],"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5},"region_prices":[{"id":"id-cgk","hourly":0.013,"monthly":9},{"id":"br-gru","hourly":0.016,"monthly":10.5}]}},"memory":3072,"disk":73728,"transfer":3000,"vcpus":3,"gpus":0,"network_out":375,"class":"standard","successor":"g6-standard-3-s"},{"id":"g4-standard-4","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"region_prices":[{"id":"id-cgk","hourly":0.086,"monthly":57.6},{"id":"br-gru","hourly":0.101,"monthly":67.2}],"addons":{"backups":{"price":{"hourly":0.015,"monthly":10},"region_prices":[{"id":"id-cgk","hourly":0.018,"monthly":12},{"id":"br-gru","hourly":0.021,"monthly":14}]}},"memory":4096,"disk":98304,"transfer":4000,"vcpus":4,"gpus":0,"network_out":500,"class":"standard","successor":"g6-standard-4"},{"id":"g4-standard-4-s","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"region_prices":[{"id":"id-cgk","hourly":0.13,"monthly":86.4},{"id":"br-gru","hourly":0.151,"monthly":101}],"addons":{"backups":{"price":{"hourly":0.024,"monthly":15},"region_prices":[{"id":"id-cgk","hourly":0.027,"monthly":18},{"id":"br-gru","hourly":0.031,"monthly":21}]}},"memory":6144,"disk":147456,"transfer":6000,"vcpus":4,"gpus":0,"network_out":750,"class":"standard","successor":"g6-standard-4-s"},{"id":"g4-standard-6","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"region_prices":[{"id":"id-cgk","hourly":0.173,"monthly":115.2},{"id":"br-gru","hourly":0.202,"monthly":134.4}],"addons":{"backups":{"price":{"hourly":0.03,"monthly":20},"region_prices":[{"id":"id-cgk","hourly":0.036,"monthly":24},{"id":"br-gru","hourly":0.042,"monthly":28}]}},"memory":8192,"disk":196608,"transfer":8000,"vcpus":6,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-6"},{"id":"g4-standard-8","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"region_prices":[{"id":"id-cgk","hourly":0.346,"monthly":230.4},{"id":"br-gru","hourly":0.403,"monthly":268.8}],"addons":{"backups":{"price":{"hourly":0.06,"monthly":40},"region_prices":[{"id":"id-cgk","hourly":0.072,"monthly":48},{"id":"br-gru","hourly":0.084,"monthly":56}]}},"memory":16384,"disk":393216,"transfer":16000,"vcpus":8,"gpus":0,"network_out":2000,"class":"standard","successor":"g6-standard-8"},{"id":"g4-standard-12","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.576,"monthly":384},"region_prices":[{"id":"id-cgk","hourly":0.691,"monthly":460.8},{"id":"br-gru","hourly":0.806,"monthly":537.6}],"addons":{"backups":{"price":{"hourly":0.12,"monthly":80},"region_prices":[{"id":"id-cgk","hourly":0.144,"monthly":96},{"id":"br-gru","hourly":0.168,"monthly":112}]}},"memory":32768,"disk":786432,"transfer":20000,"vcpus":12,"gpus":0,"network_out":4000,"class":"standard","successor":"g6-standard-16"},{"id":"g4-standard-16","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"region_prices":[{"id":"id-cgk","hourly":1.037,"monthly":691.2},{"id":"br-gru","hourly":1.21,"monthly":806.4}],"addons":{"backups":{"price":{"hourly":0.18,"monthly":120},"region_prices":[{"id":"id-cgk","hourly":0.216,"monthly":144},{"id":"br-gru","hourly":0.252,"monthly":168}]}},"memory":49152,"disk":1179648,"transfer":20000,"vcpus":16,"gpus":0,"network_out":6000,"class":"standard","successor":"g6-standard-20"},{"id":"g4-standard-20","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"region_prices":[{"id":"id-cgk","hourly":1.382,"monthly":921.6},{"id":"br-gru","hourly":1.613,"monthly":1075.2}],"addons":{"backups":{"price":{"hourly":0.24,"monthly":160},"region_prices":[{"id":"id-cgk","hourly":0.288,"monthly":192},{"id":"br-gru","hourly":0.336,"monthly":224}]}},"memory":65536,"disk":1572864,"transfer":20000,"vcpus":20,"gpus":0,"network_out":8000,"class":"standard","successor":"g6-standard-24"},{"id":"g4-standard-20-s1","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"region_prices":[{"id":"id-cgk","hourly":1.728,"monthly":1152},{"id":"br-gru","hourly":2.016,"monthly":1344}],"addons":{"backups":{"price":{"hourly":0.3,"monthly":200},"region_prices":[{"id":"id-cgk","hourly":0.36,"monthly":240},{"id":"br-gru","hourly":0.42,"monthly":280}]}},"memory":81920,"disk":1966080,"transfer":20000,"vcpus":20,"gpus":0,"network_out":10000,"class":"standard","successor":"g6-standard-20-s"},{"id":"g4-standard-20-s2","label":"Linode 192GB (pending upgrade)","price":{"hourly":1.728,"monthly":1152},"region_prices":[{"id":"id-cgk","hourly":2.074,"monthly":1382.4},{"id":"br-gru","hourly":2.419,"monthly":1612.8}],"addons":{"backups":{"price":{"hourly":0.3,"monthly":200},"region_prices":[{"id":"id-cgk","hourly":0.36,"monthly":240},{"id":"br-gru","hourly":0.42,"monthly":280}]}},"memory":98304,"disk":1966080,"transfer":20000,"vcpus":20,"gpus":0,"network_out":10000,"class":"standard","successor":"g6-standard-32"},{"id":"g5-nanode-1","label":"Nanode 1GB (pending upgrade)","price":{"hourly":0.0075,"monthly":5},"region_prices":[{"id":"id-cgk","hourly":0.009,"monthly":6},{"id":"br-gru","hourly":0.0105,"monthly":7}],"addons":{"backups":{"price":{"hourly":0.003,"monthly":2},"region_prices":[{"id":"id-cgk","hourly":0.004,"monthly":2.4},{"id":"br-gru","hourly":0.004,"monthly":2.8}]}},"memory":1024,"disk":20480,"transfer":1000,"vcpus":1,"gpus":0,"network_out":1000,"class":"nanode","successor":"g6-nanode-1"},{"id":"g5-standard-1","label":"Linode 2GB (pending upgrade)","price":{"hourly":0.018,"monthly":12},"region_prices":[{"id":"id-cgk","hourly":0.022,"monthly":14.4},{"id":"br-gru","hourly":0.025,"monthly":16.8}],"addons":{"backups":{"price":{"hourly":0.004,"monthly":2.5},"region_prices":[{"id":"id-cgk","hourly":0.004,"monthly":3},{"id":"br-gru","hourly":0.005,"monthly":3.5}]}},"memory":2048,"disk":30720,"transfer":2000,"vcpus":1,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-1"},{"id":"g5-standard-2","label":"Linode 4GB (pending upgrade)","price":{"hourly":0.036,"monthly":24},"region_prices":[{"id":"id-cgk","hourly":0.043,"monthly":28.8},{"id":"br-gru","hourly":0.05,"monthly":33.6}],"addons":{"backups":{"price":{"hourly":0.008,"monthly":5},"region_prices":[{"id":"id-cgk","hourly":0.009,"monthly":6},{"id":"br-gru","hourly":0.01,"monthly":7}]}},"memory":4096,"disk":49152,"transfer":3000,"vcpus":2,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-2"},{"id":"g5-standard-3-s","label":"Linode 6GB (pending upgrade)","price":{"hourly":0.06,"monthly":36},"region_prices":[{"id":"id-cgk","hourly":0.065,"monthly":43.2},{"id":"br-gru","hourly":0.076,"monthly":50.4}],"addons":{"backups":{"price":{"hourly":0.012,"monthly":7.5},"region_prices":[{"id":"id-cgk","hourly":0.013,"monthly":9},{"id":"br-gru","hourly":0.016,"monthly":10.5}]}},"memory":6144,"disk":73728,"transfer":3000,"vcpus":3,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-3-s"},{"id":"g5-standard-4","label":"Linode 8GB (pending upgrade)","price":{"hourly":0.072,"monthly":48},"region_prices":[{"id":"id-cgk","hourly":0.086,"monthly":57.6},{"id":"br-gru","hourly":0.101,"monthly":67.2}],"addons":{"backups":{"price":{"hourly":0.015,"monthly":10},"region_prices":[{"id":"id-cgk","hourly":0.018,"monthly":12},{"id":"br-gru","hourly":0.021,"monthly":14}]}},"memory":8192,"disk":98304,"transfer":4000,"vcpus":4,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-4"},{"id":"g5-standard-4-s","label":"Linode 10GB (pending upgrade)","price":{"hourly":0.108,"monthly":72},"region_prices":[{"id":"id-cgk","hourly":0.13,"monthly":86.4},{"id":"br-gru","hourly":0.151,"monthly":100.8}],"addons":{"backups":{"price":{"hourly":0.024,"monthly":15},"region_prices":[{"id":"id-cgk","hourly":0.027,"monthly":18},{"id":"br-gru","hourly":0.031,"monthly":21}]}},"memory":10240,"disk":147456,"transfer":6000,"vcpus":4,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-4-s"},{"id":"g5-standard-6","label":"Linode 16GB (pending upgrade)","price":{"hourly":0.144,"monthly":96},"region_prices":[{"id":"id-cgk","hourly":0.173,"monthly":115.2},{"id":"br-gru","hourly":0.202,"monthly":134.4}],"addons":{"backups":{"price":{"hourly":0.03,"monthly":20},"region_prices":[{"id":"id-cgk","hourly":0.036,"monthly":24},{"id":"br-gru","hourly":0.042,"monthly":28}]}},"memory":12288,"disk":196608,"transfer":8000,"vcpus":6,"gpus":0,"network_out":1000,"class":"standard","successor":"g6-standard-6"},{"id":"g5-standard-8","label":"Linode 32GB (pending upgrade)","price":{"hourly":0.288,"monthly":192},"region_prices":[{"id":"id-cgk","hourly":0.346,"monthly":230.4},{"id":"br-gru","hourly":0.403,"monthly":268.8}],"addons":{"backups":{"price":{"hourly":0.06,"monthly":40},"region_prices":[{"id":"id-cgk","hourly":0.072,"monthly":48},{"id":"br-gru","hourly":0.084,"monthly":56}]}},"memory":24576,"disk":393216,"transfer":16000,"vcpus":8,"gpus":0,"network_out":2000,"class":"standard","successor":"g6-standard-8"},{"id":"g5-standard-12","label":"Linode 64GB (pending upgrade)","price":{"hourly":0.576,"monthly":384},"region_prices":[{"id":"id-cgk","hourly":0.691,"monthly":460.8},{"id":"br-gru","hourly":0.806,"monthly":537.6}],"addons":{"backups":{"price":{"hourly":0.12,"monthly":80},"region_prices":[{"id":"id-cgk","hourly":0.144,"monthly":96},{"id":"br-gru","hourly":0.168,"monthly":112}]}},"memory":49152,"disk":786432,"transfer":20000,"vcpus":12,"gpus":0,"network_out":4000,"class":"standard","successor":"g6-standard-16"},{"id":"g5-standard-16","label":"Linode 96GB (pending upgrade)","price":{"hourly":0.864,"monthly":576},"region_prices":[{"id":"id-cgk","hourly":1.037,"monthly":691.2},{"id":"br-gru","hourly":1.21,"monthly":806.4}],"addons":{"backups":{"price":{"hourly":0.18,"monthly":120},"region_prices":[{"id":"id-cgk","hourly":0.216,"monthly":144},{"id":"br-gru","hourly":0.252,"monthly":168}]}},"memory":65536,"disk":1179648,"transfer":20000,"vcpus":16,"gpus":0,"network_out":6000,"class":"standard","successor":"g6-standard-20"},{"id":"g5-standard-20","label":"Linode 128GB (pending upgrade)","price":{"hourly":1.152,"monthly":768},"region_prices":[{"id":"id-cgk","hourly":1.382,"monthly":921.6},{"id":"br-gru","hourly":1.613,"monthly":1075.2}],"addons":{"backups":{"price":{"hourly":0.24,"monthly":160},"region_prices":[{"id":"id-cgk","hourly":0.288,"monthly":192},{"id":"br-gru","hourly":0.336,"monthly":224}]}},"memory":81920,"disk":1572864,"transfer":20000,"vcpus":20,"gpus":0,"network_out":8000,"class":"standard","successor":"g6-standard-24"},{"id":"g5-standard-20-s1","label":"Linode 160GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"region_prices":[{"id":"id-cgk","hourly":1.728,"monthly":1152},{"id":"br-gru","hourly":2.016,"monthly":1344}],"addons":{"backups":{"price":{"hourly":0.3,"monthly":200},"region_prices":[{"id":"id-cgk","hourly":0.36,"monthly":240},{"id":"br-gru","hourly":0.42,"monthly":280}]}},"memory":102400,"disk":1966080,"transfer":20000,"vcpus":20,"gpus":0,"network_out":10000,"class":"standard","successor":"g6-standard-20-s"},{"id":"g5-standard-20-s2","label":"Linode 192GB (pending upgrade)","price":{"hourly":1.728,"monthly":1152},"region_prices":[{"id":"id-cgk","hourly":2.074,"monthly":1382.4},{"id":"br-gru","hourly":2.419,"monthly":1612.8}],"addons":{"backups":{"price":{"hourly":0.3,"monthly":200},"region_prices":[{"id":"id-cgk","hourly":0.36,"monthly":240},{"id":"br-gru","hourly":0.42,"monthly":280}]}},"memory":122880,"disk":1966080,"transfer":20000,"vcpus":20,"gpus":0,"network_out":10000,"class":"standard","successor":"g6-standard-32"},{"id":"g5-highmem-1","label":"Linode 24GB (pending upgrade)","price":{"hourly":0.09,"monthly":60},"region_prices":[{"id":"id-cgk","hourly":0.108,"monthly":72},{"id":"br-gru","hourly":0.126,"monthly":84}],"addons":{"backups":{"price":{"hourly":0.008,"monthly":5},"region_prices":[{"id":"id-cgk","hourly":0.009,"monthly":6},{"id":"br-gru","hourly":0.01,"monthly":7}]}},"memory":16384,"disk":20480,"transfer":5000,"vcpus":1,"gpus":0,"network_out":1000,"class":"highmem","successor":"g6-highmem-1"},{"id":"g5-highmem-2","label":"Linode 48GB (pending upgrade)","price":{"hourly":0.18,"monthly":120},"region_prices":[{"id":"id-cgk","hourly":0.216,"monthly":144},{"id":"br-gru","hourly":0.252,"monthly":168}],"addons":{"backups":{"price":{"hourly":0.015,"monthly":10},"region_prices":[{"id":"id-cgk","hourly":0.018,"monthly":12},{"id":"br-gru","hourly":0.021,"monthly":14}]}},"memory":32768,"disk":40960,"transfer":6000,"vcpus":2,"gpus":0,"network_out":1500,"class":"highmem","successor":"g6-highmem-2"},{"id":"g5-highmem-4","label":"Linode 90GB (pending upgrade)","price":{"hourly":0.36,"monthly":240},"region_prices":[{"id":"id-cgk","hourly":0.432,"monthly":288},{"id":"br-gru","hourly":0.504,"monthly":336}],"addons":{"backups":{"price":{"hourly":0.03,"monthly":20},"region_prices":[{"id":"id-cgk","hourly":0.036,"monthly":24},{"id":"br-gru","hourly":0.042,"monthly":28}]}},"memory":61440,"disk":92160,"transfer":7000,"vcpus":4,"gpus":0,"network_out":3000,"class":"highmem","successor":"g6-highmem-4"},{"id":"g5-highmem-8","label":"Linode 150GB (pending upgrade)","price":{"hourly":0.72,"monthly":480},"region_prices":[{"id":"id-cgk","hourly":0.864,"monthly":576},{"id":"br-gru","hourly":1.008,"monthly":672}],"addons":{"backups":{"price":{"hourly":0.06,"monthly":40},"region_prices":[{"id":"id-cgk","hourly":0.072,"monthly":48},{"id":"br-gru","hourly":0.084,"monthly":56}]}},"memory":102400,"disk":204800,"transfer":8000,"vcpus":8,"gpus":0,"network_out":6000,"class":"highmem","successor":"g6-highmem-8"},{"id":"g5-highmem-16","label":"Linode 300GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"region_prices":[{"id":"id-cgk","hourly":1.728,"monthly":1152},{"id":"br-gru","hourly":2.016,"monthly":1344}],"addons":{"backups":{"price":{"hourly":0.09,"monthly":60},"region_prices":[{"id":"id-cgk","hourly":0.108,"monthly":72},{"id":"br-gru","hourly":0.126,"monthly":84}]}},"memory":204800,"disk":348160,"transfer":9000,"vcpus":16,"gpus":0,"network_out":10000,"class":"highmem","successor":"g6-highmem-16"},{"id":"g6-highmem-1","label":"Linode 24GB (pending upgrade)","price":{"hourly":0.09,"monthly":60},"region_prices":[{"id":"id-cgk","hourly":0.108,"monthly":72},{"id":"br-gru","hourly":0.126,"monthly":84}],"addons":{"backups":{"price":{"hourly":0.0075,"monthly":5},"region_prices":[{"id":"id-cgk","hourly":0.009,"monthly":6},{"id":"br-gru","hourly":0.0105,"monthly":7}]}},"memory":24576,"disk":20480,"transfer":5000,"vcpus":1,"gpus":0,"network_out":5000,"class":"highmem","successor":"g7-highmem-1"},{"id":"g6-highmem-2","label":"Linode 48GB (pending upgrade)","price":{"hourly":0.18,"monthly":120},"region_prices":[{"id":"id-cgk","hourly":0.216,"monthly":144},{"id":"br-gru","hourly":0.252,"monthly":168}],"addons":{"backups":{"price":{"hourly":0.015,"monthly":10},"region_prices":[{"id":"id-cgk","hourly":0.018,"monthly":12},{"id":"br-gru","hourly":0.021,"monthly":14}]}},"memory":49152,"disk":40960,"transfer":6000,"vcpus":2,"gpus":0,"network_out":6000,"class":"highmem","successor":"g7-highmem-2"},{"id":"g6-highmem-4","label":"Linode 90GB (pending upgrade)","price":{"hourly":0.36,"monthly":240},"region_prices":[{"id":"id-cgk","hourly":0.432,"monthly":288},{"id":"br-gru","hourly":0.504,"monthly":336}],"addons":{"backups":{"price":{"hourly":0.03,"monthly":20},"region_prices":[{"id":"id-cgk","hourly":0.036,"monthly":24},{"id":"br-gru","hourly":0.042,"monthly":28}]}},"memory":92160,"disk":92160,"transfer":7000,"vcpus":4,"gpus":0,"network_out":7000,"class":"highmem","successor":"g7-highmem-4"},{"id":"g6-highmem-8","label":"Linode 150GB (pending upgrade)","price":{"hourly":0.72,"monthly":480},"region_prices":[{"id":"id-cgk","hourly":0.864,"monthly":576},{"id":"br-gru","hourly":1.008,"monthly":672}],"addons":{"backups":{"price":{"hourly":0.06,"monthly":40},"region_prices":[{"id":"id-cgk","hourly":0.072,"monthly":48},{"id":"br-gru","hourly":0.084,"monthly":56}]}},"memory":153600,"disk":204800,"transfer":8000,"vcpus":8,"gpus":0,"network_out":8000,"class":"highmem","successor":"g7-highmem-8"},{"id":"g6-highmem-16","label":"Linode 300GB (pending upgrade)","price":{"hourly":1.44,"monthly":960},"region_prices":[{"id":"id-cgk","hourly":1.728,"monthly":1152},{"id":"br-gru","hourly":2.016,"monthly":1344}],"addons":{"backups":{"price":{"hourly":0.12,"monthly":80},"region_prices":[{"id":"id-cgk","hourly":0.144,"monthly":96},{"id":"br-gru","hourly":0.168,"monthly":112}]}},"memory":307200,"disk":348160,"transfer":9000,"vcpus":16,"gpus":0,"network_out":9000,"class":"highmem","successor":"g7-highmem-16"}],"page":1,"pages":1,"results":65} \ No newline at end of file diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 3455dcf4a0b..c7b68e8e8d0 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -1,4 +1,4 @@ -import { Buttons, Colors } from '@linode/design-language-system/cloudmanager'; +import { Button, Colors } from '@linode/design-language-system'; import { ThemeOptions } from '@mui/material/styles'; import { breakpoints } from 'src/foundations/breakpoints'; @@ -376,17 +376,17 @@ export const lightTheme: ThemeOptions = { backgroundColor: primaryColors.text, }, '&:active': { - backgroundColor: Buttons.Primary.Hover.Background, // TODO: We need an active token + backgroundColor: Button.Primary.Pressed.Background, }, '&:disabled': { - backgroundColor: Buttons.Primary.Disabled.Background, - color: Buttons.Primary.Disabled.Text, + backgroundColor: Button.Primary.Disabled.Background, + color: Button.Primary.Disabled.Text, }, '&:hover, &:focus': { - backgroundColor: Buttons.Primary.Hover.Background, + backgroundColor: Button.Primary.Hover.Background, }, - backgroundColor: Buttons.Primary.Default.Background, - color: Buttons.Primary.Default.Text, + backgroundColor: Button.Primary.Default.Background, + color: Button.Primary.Default.Text, padding: '2px 20px', }, containedSecondary: { @@ -396,20 +396,20 @@ export const lightTheme: ThemeOptions = { }, '&:active': { backgroundColor: 'transparent', - borderColor: Buttons.Secondary.Hover.Text, // TODO: We need an ACTIVE token - color: Buttons.Secondary.Hover.Text, // TODO: We need an ACTIVE token + borderColor: Button.Secondary.Pressed.Text, + color: Button.Secondary.Pressed.Text, }, '&:disabled': { backgroundColor: 'transparent', - borderColor: Buttons.Secondary.Disabled.Text, - color: Buttons.Secondary.Disabled.Text, + borderColor: Button.Secondary.Disabled.Text, + color: Button.Secondary.Disabled.Text, }, '&:hover, &:focus': { backgroundColor: 'transparent', - color: Buttons.Secondary.Hover.Text, + color: Button.Secondary.Hover.Text, }, backgroundColor: 'transparent', - color: Buttons.Secondary.Default.Text, + color: Button.Secondary.Default.Text, }, outlined: { '&:hover, &:focus': { diff --git a/yarn.lock b/yarn.lock index b6645803d60..2197a6283cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2560,10 +2560,10 @@ resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919" integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== -"@linode/design-language-system@^0.0.11": - version "0.0.11" - resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-0.0.11.tgz#9b7a5ef48e9f234d0035fec55cd5a4216bcf74db" - integrity sha512-x6ha8lTSu1UNiqqg5jh6tj6m8VZiPXblbfGc/mjUy9ptixDm1ctBIgOO1366jb6rEJnesh/015yOq3Eqo3P8sA== +"@linode/design-language-system@^0.0.12": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-0.0.12.tgz#d85029df89e294558b1dce46b8709baa3c012cc8" + integrity sha512-mBtoi2xc9OaiIFYJSjKJsROAoeUwI78P23BKaFy0vQ4T7OOr50Rz+IWY9QOskOEL/Y2OtGB5w8nlOEbUDB71Sg== dependencies: style-dictionary "^3.7.2" From bfaaf0443a3c1dced30a43e3813f9d80b4307b9e Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Wed, 15 Nov 2023 21:13:56 -0500 Subject: [PATCH 04/42] Saving... --- packages/manager/src/foundations/themes/light.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index c7b68e8e8d0..b9ddf03908a 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -17,7 +17,7 @@ export const bg = { mainContentBanner: Colors.Neutrals[100], offWhite: Colors.Neutrals[5], primaryNavPaper: Colors.Neutrals[100], - tableHeader: Colors.Neutrals.White, // TODO: We need to ask CDS team about this 'Colors.Neutrals[5]' doesn't work... + tableHeader: Colors.Neutrals[10], // TODO: We need to ask CDS team about this 'Colors.Neutrals[5]' doesn't work... white: Colors.Neutrals.White, } as const; From 27c0a58711c88c9b182cdc253307f2cc57a00bb0 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Tue, 21 Nov 2023 12:04:24 -0500 Subject: [PATCH 05/42] Version 14 --- packages/manager/package.json | 2 +- packages/manager/src/foundations/themes/light.ts | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index bd6aba3b189..159eb7deb07 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -16,7 +16,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@linode/api-v4": "*", - "@linode/design-language-system": "^0.0.12", + "@linode/design-language-system": "^0.0.14", "@linode/validation": "*", "@mui/icons-material": "^5.14.7", "@mui/material": "^5.14.7", diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index b9ddf03908a..2f594045b45 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -17,7 +17,7 @@ export const bg = { mainContentBanner: Colors.Neutrals[100], offWhite: Colors.Neutrals[5], primaryNavPaper: Colors.Neutrals[100], - tableHeader: Colors.Neutrals[10], // TODO: We need to ask CDS team about this 'Colors.Neutrals[5]' doesn't work... + tableHeader: Colors.Neutrals[10], white: Colors.Neutrals.White, } as const; diff --git a/yarn.lock b/yarn.lock index 2197a6283cf..4e43ef8432a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2560,10 +2560,10 @@ resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919" integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== -"@linode/design-language-system@^0.0.12": - version "0.0.12" - resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-0.0.12.tgz#d85029df89e294558b1dce46b8709baa3c012cc8" - integrity sha512-mBtoi2xc9OaiIFYJSjKJsROAoeUwI78P23BKaFy0vQ4T7OOr50Rz+IWY9QOskOEL/Y2OtGB5w8nlOEbUDB71Sg== +"@linode/design-language-system@^0.0.14": + version "0.0.14" + resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-0.0.14.tgz#965c8adf95b1bcd248991f606cf9b68224e0226c" + integrity sha512-wSmICRUFKVStY6MCS0Sk3/TgYz4UJAswS54nwDjqv74v8DayuduR9g2cmTm8Cp0VNmC4lE+qC56+mUbeFGmUQQ== dependencies: style-dictionary "^3.7.2" From 945d4fade62c785c81cabf6d29e8c9a2d90e89f8 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Wed, 27 Dec 2023 13:31:10 -0500 Subject: [PATCH 06/42] Update version to v1.0.0 --- packages/manager/package.json | 2 +- yarn.lock | 232 +++++++++++++++++++++++++++++++++- 2 files changed, 231 insertions(+), 3 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index d517bb28894..0f39f2525f6 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -17,7 +17,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@linode/api-v4": "*", - "@linode/design-language-system": "^0.0.14", + "@linode/design-language-system": "^1.0.0", "@linode/validation": "*", "@mui/icons-material": "^5.14.7", "@mui/material": "^5.14.7", diff --git a/yarn.lock b/yarn.lock index 07eb43cbe00..94fe57c2097 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2528,6 +2528,14 @@ resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919" integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== +"@linode/design-language-system@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-1.0.0.tgz#df3617d140ede6190faaae47c2df310c5141594a" + integrity sha512-vNj2HGFttyrBEExvyWsv82xCoRUHjRcLNo4XSfJfSSLU9hgZDWI4cDXWslCdzZbAqyM4ODqltYGdrC/eu5vApQ== + dependencies: + "@tokens-studio/sd-transforms" "^0.12.2" + style-dictionary "^3.7.2" + "@linode/eslint-plugin-cloud-manager@^0.0.3": version "0.0.3" resolved "https://registry.yarnpkg.com/@linode/eslint-plugin-cloud-manager/-/eslint-plugin-cloud-manager-0.0.3.tgz#dcb78ab36065bf0fb71106a586c1f3f88dbf840a" @@ -4200,6 +4208,25 @@ dependencies: "@babel/runtime" "^7.12.5" +"@tokens-studio/sd-transforms@^0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@tokens-studio/sd-transforms/-/sd-transforms-0.12.2.tgz#b0512e163d2a0d46f75426b6c4f431cda6c4f9e2" + integrity sha512-ugiAOuem35yQ9BZ87bSkG4zz0xUzrdZLOenSn6/gRrGwDW8x1sWJ8AZ1OZXqIxZIOEGyjmUofSBkhulgKE70JA== + dependencies: + "@tokens-studio/types" "^0.2.4" + color2k "^2.0.1" + colorjs.io "^0.4.3" + deepmerge "^4.3.1" + expr-eval "^2.0.2" + is-mergeable-object "^1.1.1" + postcss-calc-ast-parser "^0.1.4" + style-dictionary "^3.8.0" + +"@tokens-studio/types@^0.2.4": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@tokens-studio/types/-/types-0.2.5.tgz#fbddad1d0040f1316ee74dbd42a389f2f3d2fcbc" + integrity sha512-pJ0zWxGnEjca4dznFIHC9/oXuovu3DKHUhLDNJVzTRZEVXhWkIRIUbjDwIRihxBr39c776W+3thYvWMgChT0Rw== + "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" @@ -6197,6 +6224,14 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +camel-case@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" + integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== + dependencies: + pascal-case "^3.1.2" + tslib "^2.0.3" + camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -6241,6 +6276,15 @@ canvg@^3.0.6: stackblur-canvas "^2.0.0" svg-pathdata "^6.0.3" +capital-case@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" + integrity sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + upper-case-first "^2.0.2" + card-validator@8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/card-validator/-/card-validator-8.1.1.tgz#418f5f32435553fb9ca2a02634ad413bb38697a9" @@ -6313,6 +6357,24 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +change-case@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-4.1.2.tgz#fedfc5f136045e2398c0410ee441f95704641e12" + integrity sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A== + dependencies: + camel-case "^4.1.2" + capital-case "^1.0.4" + constant-case "^3.0.4" + dot-case "^3.0.4" + header-case "^2.0.4" + no-case "^3.0.4" + param-case "^3.0.4" + pascal-case "^3.1.2" + path-case "^3.0.4" + sentence-case "^3.0.4" + snake-case "^3.0.4" + tslib "^2.0.3" + change-emitter@^0.1.2: version "0.1.6" resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515" @@ -6565,11 +6627,21 @@ color-name@^1.0.0, color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color2k@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/color2k/-/color2k-2.0.3.tgz#a771244f6b6285541c82aa65ff0a0c624046e533" + integrity sha512-zW190nQTIoXcGCaU08DvVNFTmQhUpnJfVuAKfWqUQkflXKpaDdpaYoM0iluLS9lgJNHyBF58KKA2FBEwkD7wog== + colorette@^2.0.16, colorette@^2.0.19: version "2.0.19" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== +colorjs.io@^0.4.3: + version "0.4.5" + resolved "https://registry.yarnpkg.com/colorjs.io/-/colorjs.io-0.4.5.tgz#7775f787ff90aca7a38f6edb7b7c0f8cce1e6418" + integrity sha512-yCtUNCmge7llyfd/Wou19PMAcf5yC3XXhgFoAh6zsO2pGswhUPBaaUh8jzgHnXtXuZyFKzXZNAnyF5i+apICow== + combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -6597,6 +6669,11 @@ commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== +commander@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + common-tags@^1.8.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -6662,6 +6739,15 @@ concurrently@^4.1.1: resolved "https://registry.yarnpkg.com/consolidated-events/-/consolidated-events-2.0.2.tgz#da8d8f8c2b232831413d9e190dc11669c79f4a91" integrity sha512-2/uRVMdRypf5z/TW/ncD/66l75P5hH2vM/GR8Jf8HLc2xnfJtmina6F6du8+v4Z2vTrMo7jC+W1tmEEuuELgkQ== +constant-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-3.0.4.tgz#3b84a9aeaf4cf31ec45e6bf5de91bdfb0589faf1" + integrity sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + upper-case "^2.0.2" + content-disposition@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" @@ -7168,6 +7254,11 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.0.tgz#65491893ec47756d44719ae520e0e2609233b59b" integrity sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og== +deepmerge@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + default-browser-id@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" @@ -7363,6 +7454,14 @@ domutils@^3.0.1: domelementtype "^2.3.0" domhandler "^5.0.1" +dot-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" + integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + dotenv-expand@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37" @@ -8194,6 +8293,11 @@ expect@^29.0.0: jest-message-util "^29.4.3" jest-util "^29.4.3" +expr-eval@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expr-eval/-/expr-eval-2.0.2.tgz#fa6f044a7b0c93fde830954eb9c5b0f7fbc7e201" + integrity sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg== + express@^4.17.3: version "4.18.2" resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" @@ -8669,6 +8773,15 @@ fs-extra@>=5, fs-extra@^11.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^9.0.0, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -8891,7 +9004,7 @@ glob@>=7: minimatch "^5.0.1" once "^1.3.0" -glob@^10.0.0: +glob@^10.0.0, glob@^10.3.10: version "10.3.10" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== @@ -9079,6 +9192,14 @@ he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +header-case@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/header-case/-/header-case-2.0.4.tgz#5a42e63b55177349cf405beb8d775acabb92c063" + integrity sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q== + dependencies: + capital-case "^1.0.4" + tslib "^2.0.3" + headers-polyfill@3.2.5: version "3.2.5" resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.2.5.tgz#6e67d392c9d113d37448fe45014e0afdd168faed" @@ -9624,6 +9745,11 @@ is-map@^2.0.1, is-map@^2.0.2: resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-mergeable-object@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-mergeable-object/-/is-mergeable-object-1.1.1.tgz#faaa3ed1cfce87d6f7d2f5885e92cc30af3e2ebf" + integrity sha512-CPduJfuGg8h8vW74WOxHtHmtQutyQBzR+3MjQ6iDHIYdbOnm1YC7jv43SqCoU8OPGTJD4nibmiryA4kmogbGrA== + is-nan@^1.2.1, is-nan@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" @@ -10172,7 +10298,7 @@ json5@^2.2.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonc-parser@^3.2.0: +jsonc-parser@^3.0.0, jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== @@ -10537,6 +10663,13 @@ loupe@^2.3.6, loupe@^2.3.7: dependencies: get-func-name "^2.0.1" +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -11025,6 +11158,14 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + node-dir@^0.1.17: version "0.1.17" resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" @@ -11405,6 +11546,14 @@ pako@~0.2.0: resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" integrity sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA== +param-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" + integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -11455,6 +11604,14 @@ parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +pascal-case@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" + integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + patch-package@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-7.0.0.tgz#5c646b6b4b4bf37e5184a6950777b21dea6bb66e" @@ -11475,6 +11632,14 @@ patch-package@^7.0.0: tmp "^0.0.33" yaml "^2.2.2" +path-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-3.0.4.tgz#9168645334eb942658375c56f80b4c0cb5f82c6f" + integrity sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -11683,6 +11848,13 @@ polished@^4.2.2: dependencies: "@babel/runtime" "^7.17.8" +postcss-calc-ast-parser@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/postcss-calc-ast-parser/-/postcss-calc-ast-parser-0.1.4.tgz#9aeee3650a91c0b2902789689bc044c9f83bc447" + integrity sha512-CebpbHc96zgFjGgdQ6BqBy6XIUgRx1xXWCAAk6oke02RZ5nxwo9KQejTg8y7uYEeI9kv8jKQPYjoe6REsY23vw== + dependencies: + postcss-value-parser "^3.3.1" + postcss-load-config@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.1.tgz#152383f481c2758274404e4962743191d73875bd" @@ -11691,6 +11863,11 @@ postcss-load-config@^4.0.1: lilconfig "^2.0.5" yaml "^2.1.1" +postcss-value-parser@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + postcss@^8.3.11: version "8.4.31" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" @@ -12952,6 +13129,15 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" +sentence-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-3.0.4.tgz#3645a7b8c117c787fde8702056225bb62a45131f" + integrity sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + upper-case-first "^2.0.2" + serve-handler@6.1.5: version "6.1.5" resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.5.tgz#a4a0964f5c55c7e37a02a633232b6f0d6f068375" @@ -13153,6 +13339,14 @@ slice-ansi@^5.0.0: ansi-styles "^6.0.0" is-fullwidth-code-point "^4.0.0" +snake-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" + integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" @@ -13523,6 +13717,21 @@ strip-literal@^1.3.0: dependencies: acorn "^8.10.0" +style-dictionary@^3.7.2, style-dictionary@^3.8.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/style-dictionary/-/style-dictionary-3.9.1.tgz#4cd1d426eb6918eca32291130eecebb14ef98a08" + integrity sha512-odyTC7wMYE4B3VOhc3LW1g0PCz9g+0WZZt5qp8KpWP9POlhw0+8MYiPQYwYfBmu4MEs1qbZ+GHySu4TTjQPH9A== + dependencies: + chalk "^4.0.0" + change-case "^4.1.2" + commander "^8.3.0" + fs-extra "^10.0.0" + glob "^10.3.10" + json5 "^2.2.2" + jsonc-parser "^3.0.0" + lodash "^4.17.15" + tinycolor2 "^1.4.1" + stylis@4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7" @@ -13761,6 +13970,11 @@ tinybench@^2.5.1: resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.5.1.tgz#3408f6552125e53a5a48adee31261686fd71587e" integrity sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg== +tinycolor2@^1.4.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.6.0.tgz#f98007460169b0263b97072c5ae92484ce02d09e" + integrity sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw== + tinypool@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.8.1.tgz#b6c4e4972ede3e3e5cda74a3da1679303d386b03" @@ -14169,6 +14383,20 @@ update-check@1.5.4: registry-auth-token "3.3.2" registry-url "3.1.0" +upper-case-first@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-2.0.2.tgz#992c3273f882abd19d1e02894cc147117f844324" + integrity sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg== + dependencies: + tslib "^2.0.3" + +upper-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-2.0.2.tgz#d89810823faab1df1549b7d97a76f8662bae6f7a" + integrity sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg== + dependencies: + tslib "^2.0.3" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" From 489b955969a92a53e0b7f5fb45c1900831c8a0f8 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Wed, 27 Dec 2023 13:53:25 -0500 Subject: [PATCH 07/42] Added changeset: Added Design Tokens (CDS 2.0) --- packages/manager/.changeset/pr-10022-added-1703703204947.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/manager/.changeset/pr-10022-added-1703703204947.md diff --git a/packages/manager/.changeset/pr-10022-added-1703703204947.md b/packages/manager/.changeset/pr-10022-added-1703703204947.md new file mode 100644 index 00000000000..1a6769e2894 --- /dev/null +++ b/packages/manager/.changeset/pr-10022-added-1703703204947.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Added +--- + +Added Design Tokens (CDS 2.0) ([#10022](https://github.com/linode/manager/pull/10022)) From 54400110944c3245dab41f767d35544e942707eb Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Thu, 28 Dec 2023 15:10:18 -0500 Subject: [PATCH 08/42] Update to latest version --- packages/manager/package.json | 2 +- .../manager/src/cachedData/marketplace.json | 2 +- packages/manager/src/cachedData/regions.json | 2 +- .../manager/src/foundations/themes/light.ts | 240 +++++++++--------- 4 files changed, 123 insertions(+), 123 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index 0f39f2525f6..9796cf09def 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -17,7 +17,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@linode/api-v4": "*", - "@linode/design-language-system": "^1.0.0", + "@linode/design-language-system": "^1.1.0", "@linode/validation": "*", "@mui/icons-material": "^5.14.7", "@mui/material": "^5.14.7", diff --git a/packages/manager/src/cachedData/marketplace.json b/packages/manager/src/cachedData/marketplace.json index 05f9e9284d7..883cf532ff2 100644 --- a/packages/manager/src/cachedData/marketplace.json +++ b/packages/manager/src/cachedData/marketplace.json @@ -1 +1 @@ -{"data":[{"id":1146319,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster Null One-Click","description":"MongoDB Cluster Null One-Click\r\nNull stackscript for 1067004","ordinal":0,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":38,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-03-23T14:00:01","updated":"2023-10-18T12:38:31","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1146324,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster Null One-Click","description":"Galera Cluster Null One-Click\r\nNull Stackscript for 1088136","ordinal":0,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":148,"deployments_active":15,"is_public":true,"mine":false,"created":"2023-03-23T14:19:14","updated":"2023-12-08T19:36:03","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1142293,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Redis Sentinel Cluster Null One-Click","description":"Redis Sentinel Cluster Null One-Click\r\nNull stackscript for 1132204","ordinal":0,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":171,"deployments_active":8,"is_public":true,"mine":false,"created":"2023-03-16T14:20:59","updated":"2023-11-29T17:28:24","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1146322,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster Null One-Click","description":"PostgreSQL Cluster Null One-Click\r\nNull Stackscript for 1068726","ordinal":0,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":215,"deployments_active":6,"is_public":true,"mine":false,"created":"2023-03-23T14:17:07","updated":"2023-12-12T10:46:19","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1226546,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Null One-Click","description":"Nomad Cluster Null One-Click","ordinal":0,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":378,"deployments_active":12,"is_public":true,"mine":false,"created":"2023-08-25T19:08:21","updated":"2023-11-29T10:42:40","rev_note":"","script":"#!/bin/bash/","user_defined_fields":[]},{"id":1226547,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Clients Null One-Click","description":"Nomad Cluster Clients One-Click","ordinal":0,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":407,"deployments_active":18,"is_public":true,"mine":false,"created":"2023-08-25T19:08:57","updated":"2023-11-29T10:45:14","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":401697,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WordPress One-Click","description":"Wordpress One Click App","ordinal":1,"logo_url":"assets/WordPress.svg","images":["linode/ubuntu22.04"],"deployments_total":65125,"deployments_active":4799,"is_public":true,"mine":false,"created":"2019-03-08T21:04:07","updated":"2023-12-12T15:12:42","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-wordpress\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":632758,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Nextcloud One-Click","description":"One Click App - Nextcloud","ordinal":2,"logo_url":"assets/nextcloud.svg","images":["linode/ubuntu22.04"],"deployments_total":19114,"deployments_active":843,"is_public":true,"mine":false,"created":"2020-02-18T16:40:45","updated":"2023-12-12T16:02:03","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n\n# Install docker\ncurl -fsSL https://get.docker.com | sudo sh\n\n# Adjust permissions\nsudo mkdir -p /mnt/ncdata\nsudo chown -R 33:0 /mnt/ncdata\n\n# Install Nextcloud\nsudo docker run -d \\\n--init \\\n--name nextcloud-aio-mastercontainer \\\n--restart always \\\n-p 80:80 \\\n-p 8080:8080 \\\n-p 8443:8443 \\\n-e NEXTCLOUD_MOUNT=/mnt/ \\\n-e NEXTCLOUD_DATADIR=/mnt/ncdata \\\n--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \\\n--volume /var/run/docker.sock:/var/run/docker.sock:ro \\\nnextcloud/all-in-one:latest\n\n# Some Info\ncat << EOF > /etc/motd\n # # ###### # # ##### #### # #### # # #####\n ## # # # # # # # # # # # # # #\n # # # ##### ## # # # # # # # # #\n # # # # ## # # # # # # # # #\n # ## # # # # # # # # # # # # #\n # # ###### # # # #### ###### #### #### #####\nIf you point a domain to this server ($(hostname -I | cut -f1 -d' ')), you can open the admin interface at https://yourdomain.com:8443\nOtherwise you can open the admin interface at https://$(hostname -I | cut -f1 -d' '):8080\n \nFurther documentation is available here: https://github.com/nextcloud/all-in-one\nEOF\n\n# Install unattended upgrades\nsudo apt-get install unattended-upgrades -y\n\n# firewall\nufw allow 80\nufw allow 443\nufw allow 8080\nufw allow 8443\nufw allow 3478\n\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA email address","default":""}]},{"id":1017300,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kali Linux One-Click","description":"Kali Linux One-Click","ordinal":3,"logo_url":"assets/kalilinux.svg","images":["linode/kali"],"deployments_total":16968,"deployments_active":485,"is_public":true,"mine":false,"created":"2022-06-21T14:38:37","updated":"2023-12-12T15:23:22","rev_note":"","script":"#!/bin/bash\n## Kali\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction headlessoreverything {\n if [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"Yes\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $EVERYTHING == \"Yes\" ] && [ $HEADLESS == \"No\" ]; then\n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"No\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-headless -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"No\" ] && [ $EVERYTHING == \"No\" ]; then \n echo \"No Package Selected\"\n fi\n}\n\nfunction vncsetup {\n if [ $VNC == \"Yes\" ]; then \n ## XFCE & VNC Config\n apt-get install xfce4 xfce4-goodies dbus-x11 tigervnc-standalone-server expect -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n\n readonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\n sleep 2\n killvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\n kill $killvncprocess\n touch /etc/systemd/system/vncserver@.service\n cat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start vncserver@1.service\n systemctl enable vncserver@1.service\n\n cat < /etc/motd\n###################################\n# VNC SSH Tunnel Instructions #\n###################################\n\n* Ensure you have a VNC Client installed on your local machine\n* Run the command below to start the SSH tunnel for VNC \n\n ssh -L 61000:localhost:5901 -N -l $USERNAME $FQDN\n\n* For more Detailed documentation please visit the offical Documentation below\n\n https://www.linode.com/docs/products/tools/marketplace/guides/kalilinux\n\n### To remove this message, you can edit the /etc/motd file ###\nEOF\n fi\n}\n\nfunction main {\n headlessoreverything\n vncsetup\n stackscript_cleanup\n}\n\nmain","user_defined_fields":[{"name":"everything","label":"Would you like to Install the Kali Everything Package?","oneof":"Yes,No","default":"Yes"},{"name":"headless","label":"Would you like to Install the Kali Headless Package?","oneof":"Yes,No","default":"No"},{"name":"vnc","label":"Would you like to setup VNC to access Kali XFCE Desktop","oneof":"Yes,No","default":"Yes"},{"name":"username","label":"The VNC user to be created for the Linode. The username accepts only lowercase letters, numbers, dashes (-) and underscores (_)"},{"name":"password","label":"The password for the limited VNC user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA records (Requires API token)","default":""}]},{"id":593835,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plesk One-Click","description":"Plesk is the leading secure WordPress and website management platform. This Stackscript installs the latest publicly available Plesk, activates a trial license, installs essential extensions, and sets up and configures the firewall. Please allow the script around 15 minutes to finish.","ordinal":4,"logo_url":"assets/plesk.svg","images":["linode/centos7","linode/ubuntu20.04"],"deployments_total":10526,"deployments_active":482,"is_public":true,"mine":false,"created":"2019-09-26T17:34:17","updated":"2023-12-12T10:41:10","rev_note":"updated wording","script":"#!/bin/bash\n# This block defines the variables the user of the script needs to input\n# when deploying using this script.\n#\n## Enable logging\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction pleskautoinstall {\n echo \"Downloading Plesk Auto-Installer\"\n sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)\n echo \"turning on http2\"\n /usr/sbin/plesk bin http2_pref --enable\n}\n\nfunction firewall {\n echo \"Setting Firewall to allow proper ports.\"\n if [ \"${detected_distro[distro]}\" = 'centos' ]; then \n iptables -I INPUT -p tcp --dport 21 -j ACCEPT\n iptables -I INPUT -p tcp --dport 22 -j ACCEPT\n iptables -I INPUT -p tcp --dport 25 -j ACCEPT\n iptables -I INPUT -p tcp --dport 80 -j ACCEPT\n iptables -I INPUT -p tcp --dport 110 -j ACCEPT\n iptables -I INPUT -p tcp --dport 143 -j ACCEPT\n iptables -I INPUT -p tcp --dport 443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 465 -j ACCEPT\n iptables -I INPUT -p tcp --dport 993 -j ACCEPT\n iptables -I INPUT -p tcp --dport 995 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8447 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8880 -j ACCEPT\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n ufw allow 21\n ufw allow 22\n ufw allow 25\n ufw allow 80\n ufw allow 110\n ufw allow 143\n ufw allow 443\n ufw allow 465\n ufw allow 993\n ufw allow 995\n ufw allow 8443\n ufw allow 8447\n ufw allow 8880\nelse \necho \"Distro Not supported\"\nfi\n}\n\nfunction main {\n pleskautoinstall\n firewall\n}\n\n# Execute script\nsystem_update\nmain\nstackscript_cleanup","user_defined_fields":[]},{"id":595742,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"cPanel One-Click","description":"cPanel One-Click","ordinal":5,"logo_url":"assets/cpanel.svg","images":["linode/ubuntu20.04","linode/almalinux8","linode/rocky8"],"deployments_total":28203,"deployments_active":995,"is_public":true,"mine":false,"created":"2019-09-30T20:17:52","updated":"2023-12-12T13:47:10","rev_note":"","script":"#!/bin/bash\nset -e\n\n# Commit: fde6587e08ea95321ce010e52a9c1b8d02455a97\n# Commit date: 2023-02-13 17:00:46 -0600\n# Generated: 2023-02-17 11:00:28 -0600\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\necho $(date +%Y%m%d%H%M%S) >> /tmp/cpdebug.log\n\n# Linode's Weblish console will truncate lines unless you do this tput smam. This\n# instructs the terminal to wrap your lines, which is especially important so that\n# the WHM login URL that gets printed at the end can be copied.\ntput smam\n\nsource /etc/os-release\n\nis_os_and_version_id_prefix() {\n [[ $ID == $1 ]] && [[ $VERSION_ID =~ ^$2 ]]\n}\n\nis_almalinux8() {\n is_os_and_version_id_prefix almalinux 8\n}\n\nis_centos7() {\n is_os_and_version_id_prefix centos 7\n}\n\nis_cloudlinux7() {\n is_os_and_version_id_prefix cloudlinux 7\n}\n\nis_cloudlinux8() {\n is_os_and_version_id_prefix cloudlinux 8\n}\n\nis_rocky8() {\n is_os_and_version_id_prefix rocky 8\n}\n\nis_ubuntu20() {\n is_os_and_version_id_prefix ubuntu 20.04\n}\n\nis_supported_os() {\n is_almalinux8 || \\\n is_centos7 || \\\n is_cloudlinux7 || \\\n is_cloudlinux8 || \\\n is_rocky8 || \\\n is_ubuntu20\n}\n\nhas_yum() {\n which yum >/dev/null 2>&1\n}\n\nhas_dnf() {\n which dnf >/dev/null 2>&1\n}\n\nhas_apt() {\n which apt >/dev/null 2>&1\n}\n\nis_networkmanager_enabled() {\n systemctl is-enabled NetworkManager.service > /dev/null 2>&1\n}\n\n# cPanel & WHM is incompatible with NetworkManager\nif is_networkmanager_enabled; then\n systemctl stop NetworkManager.service\n systemctl disable NetworkManager.service\n if has_dnf; then\n dnf -y remove NetworkManager\n elif has_yum; then\n yum -y remove NetworkManager\n fi\nfi\n\nhostnamectl set-hostname server.hostname.tld\n\ncd /home && curl -so installer -L https://securedownloads.cpanel.net/latest\n\nif is_supported_os; then\n if is_ubuntu20; then\n apt-get -o Acquire::ForceIPv4=true update -y\n DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\n sh installer --skiplicensecheck --skip-cloudlinux\n else\n sh installer --skiplicensecheck\n fi\nelse\n echo \"Your distribution is not supported by this StackScript.\"\n install -d -v -m 711 /var/cpanel\n touch /var/cpanel/cpinit.failed\nfi\n\nrm -f /etc/cpupdate.conf\ncat > /root/.bash_profile <<'END_OF_BASH_PROFILE'\n# .bash_profile\n# Get the aliases and functions\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n# User specific environment and startup programs\nPATH=$PATH:$HOME/bin\nexport PATH\nbash /etc/motd.sh\nif [ -t 0 ]; then\n URL=`whmlogin --nowait 2> /dev/null`\n WHMLOGIN_RETURN=$?\n if [ $WHMLOGIN_RETURN == 1 ]; then\n # whmlogin doesn't support --nowait. Output a URL and hope it's accurate.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n whmlogin\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n if [ $WHMLOGIN_RETURN == 2 ]; then\n # whmlogin indicates that cpinit hasn't updated the IP/hostname yet.\n echo \"To log in to WHM as the root user, run the command 'whmlogin' to get a web address for your browser.\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n # whmlogin returned a valid URL to use.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n echo \"$URL\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n fi\n fi\nfi\nEND_OF_BASH_PROFILE\n\ncat > /etc/motd.sh <<'END_OF_MOTD'\n#!/bin/bash\nsource /etc/os-release\necho \"\n ____ _ ___ __ ___ _ __ __\n ___| _ \\ __ _ _ __ ___| | ( _ ) \\ \\ / / | | | \\/ |\n / __| |_) / _. | ._ \\ / _ \\ | / _ \\/\\ \\ \\ /\\ / /| |_| | |\\/| |\n| (__| __/ (_| | | | | __/ | | (_> < \\ V V / | _ | | | |\n \\___|_| \\__._|_| |_|\\___|_| \\___/\\/ \\_/\\_/ |_| |_|_| |_|\n\"\necho \"Welcome to cPanel & WHM `/usr/local/cpanel/cpanel -V`\"\necho \"\"\necho \"Running $PRETTY_NAME\"\necho \"\"\necho \"For our full cPanel & WHM documentation: https://go.cpanel.net/docs\"\necho \"\"\necho \"For information on how to quickly set up a website in cPanel & WHM: https://go.cpanel.net/buildasite\"\necho \"\" # This new line makes output from bash_profiles easier to read\nEND_OF_MOTD\ntouch /var/cpanel/cpinit.done","user_defined_fields":[]},{"id":691621,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Cloudron One-Click","description":"Cloudron One-Click","ordinal":6,"logo_url":"assets/cloudron.svg","images":["linode/ubuntu20.04"],"deployments_total":13796,"deployments_active":629,"is_public":true,"mine":false,"created":"2020-11-30T21:21:45","updated":"2023-12-12T08:21:34","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\nwget https://cloudron.io/cloudron-setup\nchmod +x cloudron-setup\n./cloudron-setup --provider linode-mp\n\necho All finished! Rebooting...\n(sleep 5; reboot) &","user_defined_fields":[]},{"id":692092,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Secure Your Server One-Click","description":"Secure Your Server One-Click","ordinal":7,"logo_url":"assets/secureyourserver.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":4687,"deployments_active":717,"is_public":true,"mine":false,"created":"2020-12-03T10:01:28","updated":"2023-12-12T08:01:50","rev_note":"","script":"#!/usr/bin/env bash\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n#\n\n## Block Storage\n#\n#\n\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source Linode Helpers\nsource \nsource \nsource \nsource \n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode. (lower case only)"},{"name":"password","label":"The password for the limited sudo user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode"},{"name":"disable_root","label":"Would you like to disable root login over SSH?","oneof":"Yes,No"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address. This is used for creating DNS records and website VirtualHost configuration.","default":""},{"name":"send_email","label":"Would you like to be able to send email from this domain? (Requires domain)","oneof":"Yes,No","default":"No"},{"name":"volume","label":"To use a Block Storage volume, enter its name here.","default":""},{"name":"volume_size","label":"If creating a new Block Storage volume, enter its size in GB (NOTE: This creates a billable resource at $0.10/month per GB).","default":""}]},{"id":925722,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pritunl One-Click","description":"Pritunl One-Click","ordinal":8,"logo_url":"assets/pritunl.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":1170,"deployments_active":81,"is_public":true,"mine":false,"created":"2021-10-26T15:23:37","updated":"2023-12-12T15:30:26","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nfail2ban_install\n\n# Mongo Install\napt-get install -y wget gnupg dirmngr \nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Pritunl\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv E162F504A20CDF15827F718D4B7C549A058F8B6B\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.pritunl.com/stable/apt buster main\" | tee /etc/apt/sources.list.d/pritunl.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb http://repo.pritunl.com/stable/apt focal main\" | tee /etc/apt/sources.list.d/pritunl.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\n\napt update -y\napt install -y pritunl\n\nsystemctl enable pritunl.service\nsystemctl start pritunl.service\n\n# Performance tune\necho \"* hard nofile 64000\" >> /etc/security/limits.conf\necho \"* soft nofile 64000\" >> /etc/security/limits.conf\necho \"root hard nofile 64000\" >> /etc/security/limits.conf\necho \"root soft nofile 64000\" >> /etc/security/limits.conf\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA record","default":""}]},{"id":741206,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CyberPanel One-Click","description":"CyberPanel One-Click","ordinal":9,"logo_url":"assets/cyberpanel.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":11157,"deployments_active":596,"is_public":true,"mine":false,"created":"2021-01-27T02:46:19","updated":"2023-12-12T14:07:19","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### Install cyberpanel\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/cybersetup.sh )\n\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401709,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Minecraft: Java Edition One-Click","description":"Minecraft OCA","ordinal":10,"logo_url":"assets/Minecraft.svg","images":["linode/ubuntu20.04"],"deployments_total":20418,"deployments_active":345,"is_public":true,"mine":false,"created":"2019-03-08T21:13:32","updated":"2023-12-12T16:04:12","rev_note":"remove maxplayers hard coded options [oca-707]","script":"#!/usr/bin/env bash\n# Game config options:\n# https://minecraft.gamepedia.com/Server.properties\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n## Linode/SSH Security Settings - Required\n#\n#\n## Linode/SSH Settings - Optional\n#\n#\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n# Difficulty\n[[ \"$DIFFICULTY\" = \"Peaceful\" ]] && DIFFICULTY=0\n[[ \"$DIFFICULTY\" = \"Easy\" ]] && DIFFICULTY=1\n[[ \"$DIFFICULTY\" = \"Normal\" ]] && DIFFICULTY=2\n[[ \"$DIFFICULTY\" = \"Hard\" ]] && DIFFICULTY=3\n\n# Gamemode\n[[ \"$GAMEMODE\" = \"Survival\" ]] && GAMEMODE=0\n[[ \"$GAMEMODE\" = \"Creative\" ]] && GAMEMODE=1\n[[ \"$GAMEMODE\" = \"Adventure\" ]] && GAMEMODE=2\n[[ \"$GAMEMODE\" = \"Spectator\" ]] && GAMEMODE=3\n\n# Player Idle Timeout\n[[ \"$PLAYERIDLETIMEOUT\" = \"Disabled\" ]] && PLAYERIDLETIMEOUT=0\n\n# Minecraft-specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\nsystem_install_package mailutils postfix curl netcat wget file bzip2 \\\n gzip unzip bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux openjdk-17-jre dirmngr software-properties-common\n\n# Install LinuxGSM and Minecraft and enable the 'mcserver' service\nreadonly GAMESERVER='mcserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Minecraft configurations\nsed -i s/server-ip=/server-ip=\"$IP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Customer config\nsed -i s/allow-flight=false/allow-flight=\"$ALLOWFLIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/allow-nether=true/allow-nether=\"$ALLOWNETHER\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/announce-player-achievements=true/announce-player-achievements=\"$ANNOUNCEPLAYERACHIEVEMENTS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/difficulty=1/difficulty=\"$DIFFICULTY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-command-block=false/enable-command-block=\"$ENABLECOMMANDBLOCK\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-query=true/enable-query=\"$ENABLEQUERY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/force-gamemode=false/force-gamemode=\"$FORCEGAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/gamemode=0/gamemode=\"$GAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/generate-structures=true/generate-structures=\"$GENERATESTRUCTURES\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/hardcore=false/hardcore=\"$HARDCORE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-name=world/level-name=\"$LEVELNAME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-seed=/level-seed=\"$LEVELSEED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-type=DEFAULT/level-type=\"$LEVELTYPE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-build-height=256/max-build-height=\"$MAXBUILDHEIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-players=20/max-players=\"$MAXPLAYERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-tick-time=60000/max-tick-time=\"$MAXTICKTIME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-world-size=29999984/max-world-size=\"$MAXWORLDSIZE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/motd=.*/motd=\"$MOTD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/network-compression-threshold=256/network-compression-threshold=\"$NETWORKCOMPRESSIONTHRESHOLD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/op-permission-level=4/op-permission-level=\"$OPPERMISSIONLEVEL\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/player-idle-timeout=0/player-idle-timeout=\"$PLAYERIDLETIMEOUT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/pvp=true/pvp=\"$PVP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/resource-pack-sha1=/resource-pack-sha1=\"$RESOURCEPACKSHA1\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/server-port=25565/server-port=\"$PORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/snooper-enabled=true/snooper-enabled=\"$SNOOPERENABLED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-animals=true/spawn-animals=\"$SPAWNANIMALS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-monsters=true/spawn-monsters=\"$SPAWNMONSTERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-npcs=true/spawn-npcs=\"$SPAWNNPCS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/use-native-transport=true/use-native-transport=\"$USENATIVETRANSPORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/view-distance=10/view-distance=\"$VIEWDISTANCE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/rcon.password=*/rcon.password=\"\\\"$RCONPASSWORD\\\"\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-rcon=false/enable-rcon=true/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Start the service and setup firewall\nufw allow \"$PORT\"\nufw allow \"25575\"\n\n# Start and enable the Minecraft service\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"levelname","label":"World Name","default":"world"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"allowflight","label":"Flight Enabled","oneof":"true,false","default":"false"},{"name":"allownether","label":"Nether World Enabled","oneof":"true,false","default":"true"},{"name":"announceplayerachievements","label":"Player Achievements Enabled","oneof":"true,false","default":"true"},{"name":"maxplayers","label":"Maximum Players","default":"25"},{"name":"playeridletimeout","label":"Player Idle Timeout Limit","oneof":"Disabled,15,30,45,60","default":"Disabled"},{"name":"difficulty","label":"Difficulty Level","oneof":"Peaceful,Easy,Normal,Hard","default":"Easy"},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"true,false","default":"false"},{"name":"pvp","label":"PvP Enabled","oneof":"true,false","default":"true"},{"name":"forcegamemode","label":"Force Game Mode Enabled","oneof":"true,false","default":"false"},{"name":"leveltype","label":"World Type","oneof":"DEFAULT,AMPLIFIED,FLAT,LEGACY","default":"DEFAULT"},{"name":"levelseed","label":"World Seed","default":""},{"name":"spawnanimals","label":"Spawn Animals Enabled","oneof":"true,false","default":"true"},{"name":"spawnmonsters","label":"Spawn Monsters Enabled","oneof":"true,false","default":"true"},{"name":"spawnnpcs","label":"Spawn NPCs Enabled","oneof":"true,false","default":"true"},{"name":"gamemode","label":"Game Mode","oneof":"Survival,Creative,Adventure,Spectator","default":"Survival"},{"name":"generatestructures","label":"Structure Generation Enabled","oneof":"true,false","default":"true"},{"name":"maxbuildheight","label":"Maximum Build Height","oneof":"50,100,200,256","default":"256"},{"name":"maxworldsize","label":"Maximum World Size","oneof":"100,1000,10000,100000,1000000,10000000,29999984","default":"29999984"},{"name":"viewdistance","label":"View Distance","oneof":"2,5,10,15,25,32","default":"10"},{"name":"enablecommandblock","label":"Command Block Enabled","oneof":"true,false","default":"false"},{"name":"enablequery","label":"Querying Enabled","oneof":"true,false","default":"true"},{"name":"enablercon","label":"Enable RCON","oneof":"true,false","default":"false"},{"name":"rconpassword","label":"RCON Password","default":""},{"name":"rconport","label":"RCON Port","default":"25575"},{"name":"maxticktime","label":"Maximum Tick Time","default":"60000"},{"name":"networkcompressionthreshold","label":"Network Compression Threshold","default":"256"},{"name":"oppermissionlevel","label":"Op-permission Level","oneof":"1,2,3,4","default":"4"},{"name":"port","label":"Port Number","default":"25565"},{"name":"snooperenabled","label":"Snooper Enabled","oneof":"true,false","default":"true"},{"name":"usenativetransport","label":"Use Native Transport Enabled","oneof":"true,false","default":"true"},{"name":"username","label":"The username for the Linode's non-root admin/SSH user(must be lowercase)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's non-root admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":869129,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"aaPanel One-Click","description":"aaPanel One-Click","ordinal":11,"logo_url":"assets/aapanel.svg","images":["linode/centos7"],"deployments_total":5389,"deployments_active":320,"is_public":true,"mine":false,"created":"2021-07-20T18:50:46","updated":"2023-12-12T14:34:45","rev_note":"","script":"#!/bin/bash\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Yum Update\nyum update -y\n\n# Install aapanel\nyum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && echo y|bash install.sh aapanel\n\n# Log aaPanel login information\nbt default > /root/.aapanel_info\n\n# Stackscript Cleanup\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[]},{"id":923033,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Akaunting One-Click","description":"Akaunting One-Click","ordinal":12,"logo_url":"assets/akaunting.svg","images":["linode/ubuntu22.04"],"deployments_total":638,"deployments_active":23,"is_public":true,"mine":false,"created":"2021-10-18T01:01:19","updated":"2023-12-09T12:28:31","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# \n# \n# \n# \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nDEBIAN_FRONTEND=noninteractive apt-get update -qq >/dev/null\n\n###########################################################\n# Install NGINX\n###########################################################\napt-get install -y nginx\n\ncat <<'END' >/var/www/html/index.html\n\n \n \n \n \n \n\n Installing Akaunting\n\n \n \n\n \n \n\n \n
\n
\n \n
\n\n
\n \n
\n
\n

Installing...

Get back after 3 minutes!

\n
\n
\n \n\nEND\n\nchown www-data:www-data /var/www/html/index.html\nchmod 644 /var/www/html/index.html\n\n###########################################################\n# MySQL\n###########################################################\napt install -y mariadb-server expect\n\nfunction mysql_secure_install {\n # $1 - required - Root password for the MySQL database\n [ ! -n \"$1\" ] && {\n printf \"mysql_secure_install() requires the MySQL database root password as its only argument\\n\"\n return 1;\n }\n local -r db_root_password=\"$1\"\n local -r secure_mysql=$(\nexpect -c \"\nset timeout 10\nspawn mysql_secure_installation\nexpect \\\"Enter current password for root (enter for none):\\\"\nsend \\\"$db_root_password\\r\\\"\nexpect \\\"Change the root password?\\\"\nsend \\\"n\\r\\\"\nexpect \\\"Remove anonymous users?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Disallow root login remotely?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Remove test database and access to it?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Reload privilege tables now?\\\"\nsend \\\"y\\r\\\"\nexpect eof\n\")\n printf \"$secure_mysql\\n\"\n}\n\n# Set DB root password\necho \"mysql-server mysql-server/root_password password ${DB_PASSWORD}\" | debconf-set-selections\necho \"mysql-server mysql-server/root_password_again password ${DB_PASSWORD}\" | debconf-set-selections\n\nmysql_secure_install \"$DB_PASSWORD\"\n\n# Create DB\necho \"CREATE DATABASE ${DB_NAME};\" | mysql -u root -p\"$DB_PASSWORD\"\n\n# create DB user with password\necho \"CREATE USER '$DBUSER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\" | mysql -u root -p\"$DB_PASSWORD\"\n\necho \"GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DBUSER'@'localhost';\" | mysql -u root -p\"$DB_PASSWORD\"\necho \"FLUSH PRIVILEGES;\" | mysql -u root -p\"$DB_PASSWORD\"\n\n\n###########################################################\n# Install PHP \n###########################################################\napt-get install -y zip unzip php-mbstring php-zip php-gd php-cli php-curl php-intl php-imap php-xml php-xsl php-tokenizer php-sqlite3 php-pgsql php-opcache php-simplexml php-fpm php-bcmath php-ctype php-json php-pdo php-mysql\n\n###########################################################\n# Akaunting\n###########################################################\nmkdir -p /var/www/akaunting \\\n && curl -Lo /tmp/akaunting.zip 'https://akaunting.com/download.php?version=latest&utm_source=linode&utm_campaign=developers' \\\n && unzip /tmp/akaunting.zip -d /var/www/html \\\n && rm -f /tmp/akaunting.zip\n\ncat </var/www/html/.env\nAPP_NAME=Akaunting\nAPP_ENV=production\nAPP_LOCALE=en-GB\nAPP_INSTALLED=false\nAPP_KEY=\nAPP_DEBUG=false\nAPP_SCHEDULE_TIME=\"09:00\"\nAPP_URL=\n\nDB_CONNECTION=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_DATABASE=${DB_NAME}\nDB_USERNAME=${DBUSER}\nDB_PASSWORD=${DBUSER_PASSWORD}\nDB_PREFIX=\n\nBROADCAST_DRIVER=log\nCACHE_DRIVER=file\nSESSION_DRIVER=file\nQUEUE_CONNECTION=sync\nLOG_CHANNEL=stack\n\nMAIL_MAILER=mail\nMAIL_HOST=localhost\nMAIL_PORT=2525\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_NAME=null\nMAIL_FROM_ADDRESS=null\n\nFIREWALL_ENABLED=false\nEND\n\ncd /var/www/html && php artisan key:generate\n\n# Install Akaunting\nphp /var/www/html/artisan install --db-host=\"localhost\" --db-name=\"$DB_NAME\" --db-username=\"$DBUSER\" --db-password=\"$DBUSER_PASSWORD\" --company-name=\"$COMPANY_NAME\" --company-email=\"$COMPANY_EMAIL\" --admin-email=\"$ADMIN_EMAIL\" --admin-password=\"$ADMIN_PASSWORD\"\n\n# Fix permissions\nchown -Rf www-data:www-data /var/www/html\nfind /var/www/html/ -type d -exec chmod 755 {} \\;\nfind /var/www/html/ -type f -exec chmod 644 {} \\;\n\n###########################################################\n# Configure NGINX\n###########################################################\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat << END > /etc/nginx/nginx.conf\n# Generic startup file.\nuser www-data;\n\n#usually equal to number of CPUs you have. run command \"grep processor /proc/cpuinfo | wc -l\" to find it\nworker_processes auto;\nworker_cpu_affinity auto;\n\nerror_log /var/log/nginx/error.log;\npid /var/run/nginx.pid;\n\n# Keeps the logs free of messages about not being able to bind().\n#daemon off;\n\nevents {\nworker_connections 1024;\n}\n\nhttp {\n# rewrite_log on;\n\ninclude mime.types;\ndefault_type application/octet-stream;\naccess_log /var/log/nginx/access.log;\nsendfile on;\n# tcp_nopush on;\nkeepalive_timeout 64;\n# tcp_nodelay on;\n# gzip on;\n #php max upload limit cannot be larger than this \nclient_max_body_size 13m;\nindex index.php index.html index.htm;\n\n# Upstream to abstract backend connection(s) for PHP.\nupstream php {\n #this should match value of \"listen\" directive in php-fpm pool\n server unix:/run/php/php$PHP_VERSION-fpm.sock;\n server 127.0.0.1:9000;\n}\n\nserver {\n listen 80 default_server;\n\n server_name _;\n\n root /var/www/html;\n\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Content-Type-Options \"nosniff\";\n\n index index.html index.htm index.php;\n\n charset utf-8;\n\n location / {\n try_files \\$uri \\$uri/ /index.php?\\$query_string;\n }\n\n # Prevent Direct Access To Protected Files\n location ~ \\.(env|log) {\n deny all;\n }\n\n # Prevent Direct Access To Protected Folders\n location ~ ^/(^app$|bootstrap|config|database|overrides|resources|routes|storage|tests|artisan) {\n deny all;\n }\n\n # Prevent Direct Access To modules/vendor Folders Except Assets\n location ~ ^/(modules|vendor)\\/(.*)\\.((?!ico|gif|jpg|jpeg|png|js\\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ {\n deny all;\n }\n\n error_page 404 /index.php;\n\n # Pass PHP Scripts To FastCGI Server\n location ~ \\.php$ {\n fastcgi_split_path_info ^(.+\\.php)(/.+)\\$;\n fastcgi_pass php;\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n include fastcgi_params;\n }\n\n location ~ /\\.(?!well-known).* {\n deny all;\n }\n}\n}\nEND\n\n# Remove installation screen\nrm -f /var/www/html/index.html\n\nservice nginx reload\n\n###########################################################\n# Firewall\n###########################################################\napt-get install ufw -y\nufw limit ssh\nufw allow http\nufw allow https\n\nufw --force enable\n\n###########################################################\n# Stackscript cleanup\n###########################################################\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"company_name","label":"Company Name","example":"My Company"},{"name":"company_email","label":"Company Email","example":"my@company.com"},{"name":"admin_email","label":"Admin Email","example":"my@company.com"},{"name":"admin_password","label":"Admin Password","example":"s3cur39a55w0r0"},{"name":"db_name","label":"MySQL Database Name","example":"akaunting"},{"name":"db_password","label":"MySQL root Password","example":"s3cur39a55w0r0"},{"name":"dbuser","label":"MySQL Username","example":"akaunting"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur39a55w0r0"}]},{"id":985374,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Enterprise Edition One-Click","description":"Ant Media Enterprise Edition One-Click","ordinal":13,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":1375,"deployments_active":63,"is_public":true,"mine":false,"created":"2022-03-08T17:39:39","updated":"2023-12-11T20:31:23","rev_note":"","script":"#!/usr/bin/env bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\nZIP_FILE=\"https://antmedia.io/linode/antmedia_2.5.3.zip\"\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":804144,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Community Edition One-Click","description":"Ant Media Server One-Click","ordinal":14,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":5639,"deployments_active":466,"is_public":true,"mine":false,"created":"2021-04-01T12:50:57","updated":"2023-12-12T15:11:24","rev_note":"","script":"#!/usr/bin/env bash \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nZIP_FILE=\"https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.5.3/ant-media-server-community-2.5.3.zip\"\n\n\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":1102900,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Apache Airflow One-Click","description":"Apache Airflow One-Click App","ordinal":15,"logo_url":"assets/apacheairflow.svg","images":["linode/ubuntu20.04"],"deployments_total":127,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-12-20T17:32:08","updated":"2023-11-28T13:38:46","rev_note":"","script":"#!/bin/bash\n#\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n# install depends\nexport DEBIAN_FRONTEND=noninteractive\nsudo apt update\n#sudo apt -y upgrade\nsudo apt install -y python3-pip\nsudo apt install -y build-essential libssl-dev libffi-dev python3-dev\nsudo apt install -y python3-venv # One of the Airflow examples requires virtual environments\n\nexport AIRFLOW_HOME=~/airflow\n\n# Install Airflow using the constraints file\nAIRFLOW_VERSION=2.4.1\nPYTHON_VERSION=\"$(python3 --version | cut -d \" \" -f 2 | cut -d \".\" -f 1-2)\"\n# For example: 3.7\nCONSTRAINT_URL=\"https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt\"\n# For example: https://raw.githubusercontent.com/apache/airflow/constraints-2.4.1/constraints-3.7.txt\npip install \"apache-airflow==${AIRFLOW_VERSION}\" --constraint \"${CONSTRAINT_URL}\"\n\n# The Standalone command will initialise the database, make a user,\n# and start all components for you.\nairflow standalone &\n\n###\n# \n# systemd unit file and per component settings go here\n# \n### \n\n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${DEFAULT_RDNS};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http \nufw allow https \nsystemctl enable ufw\n\nsleep 60 \n\n## install SSL certs. required \npip install pyOpenSSL --upgrade\napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n\n## write some login details\nexport ADMIN_PASS=$(cat /root/airflow/standalone_admin_password.txt)\ncat < /etc/motd \nThe installation of Apache Airflow is now complete, and the application is running in standalone mode.\n#\nYou can log into the Airflow GUI at ${ABS_DOMAIN}\nWith the credentials: \nUsername: admin\nPassword: ${ADMIN_PASS}\n#\nStandalone mode is not recommended for production.\nEND\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1160820,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Appwrite One-Click","description":"Appwrite One-Click ","ordinal":16,"logo_url":"assets/appwrite.svg","images":["linode/ubuntu22.04"],"deployments_total":177,"deployments_active":11,"is_public":true,"mine":false,"created":"2023-04-21T13:09:13","updated":"2023-12-10T01:42:24","rev_note":"","script":"#!/bin/bash\n### linode \n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nbash ./get-docker.sh\n\n# install haveged\nsudo apt-get install -y haveged\n\n# Install Appwrite\n# Grab latest version\nappversion=$(curl -s https://api.github.com/repos/appwrite/appwrite/releases/latest | grep -oP '\"tag_name\": \"\\K.*?(?=\")')\n\ndocker run --rm \\\n --volume /var/run/docker.sock:/var/run/docker.sock \\\n --volume \"$(pwd)\"/appwrite:/usr/src/code/appwrite:rw \\\n appwrite/appwrite:$appversion sh -c \"install --httpPort=80 --httpsPort=443 --interactive=N\"\n\necho \"Installation complete!\"","user_defined_fields":[]},{"id":401699,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ark One-Click","description":"Ark - Latest One-Click","ordinal":17,"logo_url":"assets/Ark@1x.svg","images":["linode/debian11"],"deployments_total":1145,"deployments_active":3,"is_public":true,"mine":false,"created":"2019-03-08T21:05:54","updated":"2023-12-05T18:43:30","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"arkserver\"\n\nset_hostname\napt_setup_update\n\n\n# ARK specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc-s1 libstdc++6 libstdc++6:i386 \n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install ARK\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\nsed -i s/XPMultiplier=.*/XPMultiplier=\"$XPMULTIPLIER\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPassword=.*/ServerPassword=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerHardcore=.*/ServerHardcore=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPVE=.*/ServerPVE=\"$SERVERPVE\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/Message=.*/Message=\"$MOTD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/SessionName=.*/SessionName=\"$SESSIONNAME\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerAdminPassword=.*/ServerAdminPassword=\"\\\"$RCONPASSWORD\\\"\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015/udp\nufw allow 7777:7778/udp\nufw allow 27020/tcp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rconpassword","label":"RCON password"},{"name":"sessionname","label":"Server Name","default":"Ark Server"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"serverpassword","label":"Server Password","default":""},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"True,False","default":"False"},{"name":"xpmultiplier","label":"XP Multiplier","oneof":"1,1.5,2,5,10,20","default":"2"},{"name":"serverpve","label":"Server PvE","oneof":"True,False","default":"False"}]},{"id":662118,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Azuracast One-Click","description":"AzuraCast One-Click","ordinal":18,"logo_url":"assets/azuracast.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":2704,"deployments_active":191,"is_public":true,"mine":false,"created":"2020-08-12T15:50:09","updated":"2023-12-12T06:14:05","rev_note":"","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, apt configuration and update/upgrade\nset_hostname\napt_setup_update\n\n# Install GIT\napt-get update && apt-get install -q -y git\n# Cloning AzuraCast and install\nmkdir -p /var/azuracast\ncd /var/azuracast\ncurl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh > docker.sh\nchmod a+x docker.sh\nyes 'Y' | ./docker.sh setup-release\nyes '' | ./docker.sh install\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":913277,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BeEF One-Click","description":"BeEF One-Click","ordinal":19,"logo_url":"assets/beef.svg","images":["linode/ubuntu22.04"],"deployments_total":30530,"deployments_active":1166,"is_public":true,"mine":false,"created":"2021-09-30T18:28:58","updated":"2023-12-12T15:52:32","rev_note":"","script":"#!/bin/bash\n#\n# Script to install BEEF on Linode\n# \n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \nbeef_config=\"/home/beef/config.yaml\"\nkey=\"privkey.pem\"\ncert=\"fullchain.pem\"\n# System Update\napt_setup_update\n# UFW\nufw allow 80\nufw allow 443\nufw allow 3000\nfunction configure_nginx {\n apt install git nginx ruby-dev -y\n # NGINX\n mkdir -p /var/www/certs/.well-known\n chown -R www-data:www-data /var/www/certs/\n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\nfunction configure_ssl {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\nfunction create_beef_user {\n function create_beef {\n groupadd --system beef\n useradd -s /sbin/nologin --system -g beef beef\n }\n grep beef /etc/passwd\n if [ $? -eq 1 ];then\n create_beef\n else\n echo \"[INFO] beef already on the system. Deleting user\"\n deluser --remove-home beef\n create_beef\n fi\n}\nfunction configure_beef {\n git clone https://github.com/beefproject/beef.git /home/beef\n chown -R beef: /home/beef\n cd /home/beef\n cp /etc/letsencrypt/live/$FQDN/$key .\n cp /etc/letsencrypt/live/$FQDN/$cert .\n # get line number to replace\n get_https_enable=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"enable:\" | awk -F \"-\" {'print $1'})\n get_https_public_enabled=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"public_enabled:\" | awk -F \"-\" {'print $1'})\n # replacing line numebr\n sed -i \"\"$get_https_enable\"s/enable: false/enable: true/\" $beef_config\n sed -i \"\"$get_https_public_enabled\"s/public_enabled: false/public_enabled: true/\" $beef_config\n sed -i \"/key:/c\\ key: \\\"$key\\\"\" $beef_config\n sed -i \"/cert:/c\\ cert: \\\"$cert\\\"\" $beef_config\n # creds\n #sed -i \"/user:/c\\ user: \\\"beef\\\"\" $beef_config\n sed -i \"/passwd:/c\\ passwd: \\\"$BEEFPASSWORD\\\"\" $beef_config\n # install local copy of beef\n # install deps\n apt install curl git build-essential openssl libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison nodejs libcurl4-openssl-dev ruby-dev -y\n su - -s /bin/bash beef\n bundle3.0 config set --local path /home/beef/.gem\n bundle3.0 install\n gem install --user-install xmlrpc\n \n}\nfunction beef_startup {\n cat < /home/beef/start_beef\n#!/bin/bash\nfunction start_beef {\n cd /home/beef\n echo no | ./beef\n}\nstart_beef\nEOF\n chown -R beef:beef /home/beef\n chmod +x /home/beef/start_beef\n}\n \nfunction beef_job {\n cat < /etc/systemd/system/beef.service\n[Unit]\nDescription=Browser Exploitation Framework\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=beef\nGroup=beef\nExecStart=/home/beef/start_beef\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start beef\n systemctl enable beef\n}\nfunction ssl_renew_cron {\n cat </root/certbot-beef-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & BeEf\n# Debug\n# set -xo pipefail\nexport BEEF_FULL=/home/beef/fullchain.pem\nexport BEEF_PRIVKEY=/home/beef/privkey.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat \\$FULLCHAIN > \\$BEEF_FULL\ncat \\$PRIVKEY > \\$BEEF_PRIVKEY\nservice beef reload\nEND\n chmod +x /root/certbot-beef-renewal.sh\n# Setup Cron\n crontab -l > cron\n echo \"* 1 * * 1 bash /root/certbot-beef-renewal.sh\" >> cron\n crontab cron\n rm cron\n}\nfunction install_complete {\n cat < /root/beef.info\n##############################\n# BEEF INSTALLATION COMPLETE #\n##############################\nEndpoint: https://$FQDN:3000/ui/panel\nCredentials can be found here:\n/home/beef/config.yaml\nHappy hunting!\nEOF\n}\nfunction main {\n create_beef_user\n configure_nginx\n configure_ssl\n configure_beef\n beef_startup\n beef_job\n ssl_renew_cron\n install_complete\n}\nmain\n# Clean up\nstackscript_cleanup\ncat /root/beef.info","user_defined_fields":[{"name":"beefpassword","label":"BEEF Password"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode. The username cannot contain any spaces or capitol letters. For this application the username 'beef' is reserved for the application, so please choose an alternative username for this deployment.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BitNinja One-Click","description":"BitNinja One-Click","ordinal":20,"logo_url":"assets/bitninja.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":35,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T01:03:02","updated":"2023-11-28T09:18:11","rev_note":"","script":"#!bin/bash\n\n# \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nwget -qO- https://get.bitninja.io/install.sh | /bin/bash -s - --license_key=\"$license_key\" -y","user_defined_fields":[{"name":"license_key","label":"License Key"}]},{"id":1037036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Budibase One-Click","description":"Budibase One Click App","ordinal":21,"logo_url":"assets/budibase.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":438,"deployments_active":26,"is_public":true,"mine":false,"created":"2022-08-02T18:42:41","updated":"2023-12-12T01:21:50","rev_note":"","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker.io\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Install Docker Compose\ncurl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\ndocker-compose --version\n\necho \"Creating passwords for /opt/budibase/.env\"\nVAR_JWT_SECRET=$(pwgen 16)\nVAR_MINIO_ACCESS_KEY=$(pwgen 16)\nVAR_MINIO_SECRET_KEY=$(pwgen 16)\nVAR_COUCH_DB_PASSWORD=$(pwgen 16)\nVAR_REDIS_PASSWORD=$(pwgen 16)\nVAR_INTERNAL_API_KEY=$(pwgen 16)\nIP=`hostname -I | awk '{print$1}'`\n\nmkdir -p /opt/budibase\ncd /opt/budibase\necho \"Fetch budibase docker compose file\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/docker-compose.yaml -o /opt/budibase/docker-compose.yml\necho \"Fetch budibase .env template\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/.env -o /opt/budibase/.env\necho \"Set passwords in /opt/budibase/.env\"\nsed -i \"s/JWT_SECRET=testsecret/JWT_SECRET=$VAR_JWT_SECRET/\" /opt/budibase/.env\nsed -i \"s/MINIO_ACCESS_KEY=budibase/MINIO_ACCESS_KEY=$VAR_MINIO_ACCESS_KEY/\" /opt/budibase/.env\nsed -i \"s/MINIO_SECRET_KEY=budibase/MINIO_SECRET_KEY=$VAR_MINIO_SECRET_KEY/\" /opt/budibase/.env\nsed -i \"s/COUCH_DB_PASSWORD=budibase/COUCH_DB_PASSWORD=$VAR_COUCH_DB_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/REDIS_PASSWORD=budibase/REDIS_PASSWORD=$VAR_REDIS_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/INTERNAL_API_KEY=budibase/INTERNAL_API_KEY=$VAR_INTERNAL_API_KEY/\" /opt/budibase/.env\nsed -i \"s/MAIN_PORT=10000/MAIN_PORT=$BBPORT/\" /opt/budibase/.env\ndocker-compose up -d\n\ncat </etc/profile.d/budibase_welcome.sh\n#!/bin/sh\n#\nIP=$(hostname -I | awk '{print$1}')\necho \"\n********************************************************************************\nWelcome to Budibase!\nTo help keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH) and the Web UI port $BBPORT.\n********************************************************************************\n # Budibase UI: http://$IP:$BBPORT/\n # Website: https://budibase.com\n # Documentation: https://docs.budibase.com\n # Github: https://github.com/Budibase/budibase\n # Community Support: https://github.com/Budibase/budibase/discussions\n # Restart Budibase: cd /opt/budibase; docker-compose down; docker-compose up -d\n # Budibase config: /etc/budibase/.env\n\"\nEND\nchmod +x /etc/profile.d/budibase_welcome.sh\n# Enable UFW and add some rules to it\nufw enable\nufw limit ssh/tcp comment 'Rate limit the SSH port'\nufw allow $BBPORT/tcp comment \"TCP Listen port for Budibase\"\nufw --force enable\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"BBPORT","label":"Budibase Port","example":"Default: 80","default":"80"}]},{"id":869155,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Chevereto One-Click","description":"Chevereto One-Click","ordinal":22,"logo_url":"assets/chevereto.svg","images":["linode/ubuntu20.04"],"deployments_total":236,"deployments_active":6,"is_public":true,"mine":false,"created":"2021-07-20T19:07:56","updated":"2023-10-30T19:52:12","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/chevereto/linode-marketplace\n\nset -e\n\nCHEVERETO_INSTALLER_TAG=\"3.1.0\"\nWORKING_DIR=\"/var/www/html\"\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php\napt install -y mysql-server\napt install -y php\napt install -y php-{common,cli,curl,fileinfo,gd,imagick,intl,json,mbstring,mysql,opcache,pdo,pdo-mysql,xml,xmlrpc,zip}\napt install -y python3-certbot-apache software-properties-common unzip\n\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\n\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Chevereto at http://\\$myip/installer.php\n * Secure your database by running:\n > mysql_secure_installation\n * Setup email delivery at http://\\$myip/dashboard/settings/email\nFor help and more information visit https://chevereto.com\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\n\ncat >/etc/cron.d/chevereto </etc/php/7.4/apache2/conf.d/chevereto.ini <>/var/log/per-instance.log\n\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\n\nCHEVERETO_DB_HOST=localhost\nCHEVERETO_DB_PORT=3306\nCHEVERETO_DB_NAME=chevereto\nCHEVERETO_DB_USER=chevereto\nCHEVERETO_DB_PASS=$(openssl rand -hex 16)\n\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\n\necho \"[OK] Chevereto Installer $CHEVERETO_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":869158,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ClusterControl One-Click","description":"ClusterControl One-Click","ordinal":23,"logo_url":"assets/clustercontrol.svg","images":["linode/ubuntu20.04"],"deployments_total":174,"deployments_active":4,"is_public":true,"mine":false,"created":"2021-07-20T19:13:44","updated":"2023-12-09T22:12:37","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Severalnines settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\nworkdir=/tmp\nIP=`hostname -I | awk '{print$1}'`\n# if command -v dig &>/dev/null; then\n# echo -e \"\\nDetermining network interfaces.\" \n# ext_ip=$(dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null)\n# [[ ! -z $ext_ip ]] && IP=${ext_ip}\n# fi\nlog_progress() {\n\n echo \"$1\" >> /root/cc_install.log\n}\n\ninstall_cc() {\n export HOME=/root\n export USER=root\n wget --no-check-certificate https://severalnines.com/downloads/cmon/install-cc\n chmod +x install-cc\n echo \"mysql cmon password = $CMONUSER_PASSWORD\" >> /root/.cc_passwords\n echo \"mysql root password = $DBROOT_PASSWORD\" >> /root/.cc_passwords\n SEND_DIAGNOSTICS=0 S9S_CMON_PASSWORD=$CMONUSER_PASSWORD S9S_ROOT_PASSWORD=$DBROOT_PASSWORD INNODB_BUFFER_POOL_SIZE=256 ./install-cc\n}\n\nfirstboot() {\n hostnamectl set-hostname clustercontrol\n\n ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N \"\"\n ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub\n SSH_KEY=$(cat /root/.ssh/id_rsa.pub)\n\n cat < /etc/update-motd.d/99-cc-motd \n#!/bin/sh\necho \"###\"\necho \"\"\necho \"Welcome to Severalnines Database Monitoring and Management Application - ClusterControl\"\necho \"Open your web browser to http://${IP}/clustercontrol to access ClusterControl's web application\"\necho \"\"\necho \"The public SSH key (root) is:\"\necho \"$SSH_KEY\"\necho \"\"\necho \"###\"\nEND\n\n chmod +x /etc/update-motd.d/99-cc-motd\n}\n\nenable_fw() {\n ufw default deny incoming\n ufw default allow outgoing\n ufw allow ssh\n ufw allow http\n ufw allow https\n ufw allow 9999\n ufw allow 9501\n}\n\ncleanup() {\n rm -rf /tmp/* /var/tmp/* /root/scripts\n history -c\n cat /dev/null > /root/.bash_history\n unset HISTFILE\n\n apt-get -y autoremove\n apt-get -y autoclean\n\n cat /dev/null > /var/log/lastlog; cat /dev/null > /var/log/wtmp; cat /dev/null > /var/log/auth.log\n\n ufw enable\n ufw status\n\n touch /.cc-provisioned\n}\n\nlog_progress \"** Installing ClusterControl, this could take several minutes. Please wait ...\"\ninstall_cc\nlog_progress \"** Setting motd ...\"\nfirstboot\nlog_progress \"** Enabling firewall ...\"\nenable_fw\nif [[ \"$SSL\" == \"Yes\" ]]; then\n log_progress \"** Enabling Let's Encrypt SSL ...\"\n python --version | grep -q 3.\n [[ $? -eq 0 ]] && PYTHON3=1\n if [[ -n $PYTHON3 ]]; then\n apt install -y certbot python3-certbot-apache\n else\n apt install -y certbot python-certbot-apache\n fi\n\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\ncleanup\n\n# Clean up\nlog_progress \"** Stackscript cleanup please wait ...\"\nstackscript_cleanup\n\nlog_progress \"** Installation successful...\"\n/etc/update-motd.d/99-cc-motd | tee -a /root/cc_install.log\n\nsystemctl restart sshd","user_defined_fields":[{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"cmonuser_password","label":"CMON user password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above)","oneof":"Yes,No","default":"Yes"}]},{"id":401700,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CS:GO One-Click","description":"CS:GO - Latest One-Click","ordinal":24,"logo_url":"assets/CSGO2.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":2142,"deployments_active":6,"is_public":true,"mine":false,"created":"2019-03-08T21:06:26","updated":"2023-11-02T20:39:58","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"csgoserver\"\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\n#Buyanywhere\nif [[ \"$BUYANYWHERE\" = \"Enabled\" ]]; then\n BUYANYWHERE=1\nelif [[ \"$BUYANYWHERE\" = \"Disabled\" ]]; then\n BUYANYWHERE=0\nelif [[ \"$BUYANYWHERE\" = \"Terrorists Only\" ]]; then\n BUYANYWHERE=2\nelif [[ \"$BUYANYWHERE\" = \"Counter-Terrorists Only\" ]]; then\n BUYANYWHERE=3\nfi\n\n#friendlyfire\n\nif [[ \"$FRIENDLYFIRE\" = \"Enabled\" ]]; then\n FRIENDLYFIRE=1\nelif [[ \"$FRIENDLYFIRE\" = \"Disabled\" ]]; then\n FRIENDLYFIRE=0\nfi\n\nset_hostname\napt_setup_update\n\n\n# CSGO specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install CSGO\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\n> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\n\ncat <> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsv_contact \"\"\nsv_lan 0\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile 0\nsv_hibernate_when_empty 1\nsv_hibernate_ms 5\nhost_name_store 1\nhost_info_show 1\nhost_players_show 2\nexec banned_user.cfg\nexec banned_ip.cfg\nwriteid\nwriteip\nEND\n\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"hostname $SERVERNAME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_roundtime $ROUNDTIME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsed -i s/mp_buy_anywhere.*/mp_buy_anywhere\\ \"$BUYANYWHERE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_maxrounds.*/mp_maxrounds\\ \"$MAXROUNDS\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_friendlyfire.*/mp_friendlyfire\\ \"$FRIENDLYFIRE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"$MOTD\" > /home/csgoserver/serverfiles/csgo/motd.txt\n\n\nif [[ \"$FRIENDLYFIRE\" = \"1\" ]]; then\nsed -i s/ff_damage_reduction_bullets.*/ff_damage_reduction_bullets\\ 0\\.85/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade.*/ff_damage_reduction_gernade\\ 0\\.33/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade_self.*/ff_damage_reduction_gernade_self\\ 0\\.4/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_other.*/ff_damage_reduction_other\\ 1/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"sv_kick_ban_duration 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_disable_autokick 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nfi\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015\nufw allow 27020/udp\nufw allow 27005/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server."},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode CS:GO Server"},{"name":"rconpassword","label":"RCON password"},{"name":"svpassword","label":"CSGO server password","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"roundtime","label":"Round Time Limit","oneof":"5,10,15,20,60","default":"5"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,5,10,15,20","default":"10"},{"name":"buyanywhere","label":"Buy Anywhere ","oneof":"Disabled,Enabled,Counter-Terrorists Only, Terrorists Only","default":"Disabled"},{"name":"friendlyfire","label":"Friendly Fire Enabled","oneof":"Enabled,Disabled","default":"Disabled"}]},{"id":688891,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Discourse One-Click","description":"Discourse One-Click","ordinal":25,"logo_url":"assets/discourse.svg","images":["linode/ubuntu20.04"],"deployments_total":1214,"deployments_active":59,"is_public":true,"mine":false,"created":"2020-11-17T20:55:26","updated":"2023-12-12T07:15:54","rev_note":"","script":"#!/bin/bash\n\n## Discourse Settings\n\n#\n#\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n#Install dependencies needed for Discourse\napt install git apt-transport-https ca-certificates curl software-properties-common net-tools -y\n\n#Clone Discourse Docker repo for install and management\ngit clone https://github.com/discourse/discourse_docker.git /var/discourse\n#UFW Firewall Rules\nufw allow http\nufw allow https\nufw allow 25\nufw allow 465\nufw allow 587\nufw enable <\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Python & Django\napt-get install -y python3 python3-pip\npip3 install Django\n\n# Create & Setup Django APP\nmkdir /var/www/\ncd /var/www/\ndjango-admin startproject DjangoApp\ncd DjangoApp\npython3 manage.py migrate\necho \"from django.contrib.auth.models import User; User.objects.create_superuser('$DJANGOUSER', '$DJANGOUSEREMAIL', '$DJANGOUSERPASSWORD')\" | python3 manage.py shell\nsed -i \"s/ALLOWED_HOSTS = \\[\\]/ALLOWED_HOSTS = \\['$IP'\\]/g\" DjangoApp/settings.py\npython3 manage.py runserver 0.0.0.0:8000 &\n\n# Start Django app on reboot\ncrontab -l | { cat; echo \"@reboot cd /var/www/DjangoApp && python3 manage.py runserver 0.0.0.0:8000 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"djangouser","label":"Django USER","example":"user1"},{"name":"djangouserpassword","label":"Django Password","example":"s3cure_p4ssw0rd"},{"name":"djangouseremail","label":"Django USER email","example":"user@email.tld"}]},{"id":607433,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Docker One-Click","description":"Docker One Click App","ordinal":27,"logo_url":"assets/docker.svg","images":["linode/ubuntu22.04"],"deployments_total":36066,"deployments_active":1839,"is_public":true,"mine":false,"created":"2019-10-31T20:14:04","updated":"2023-12-12T15:57:24","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Docker Settings\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-docker\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":401698,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Drupal One-Click","description":"Drupal One-Click","ordinal":28,"logo_url":"assets/Drupal.svg","images":["linode/ubuntu22.04"],"deployments_total":1850,"deployments_active":79,"is_public":true,"mine":false,"created":"2019-03-08T21:04:47","updated":"2023-12-11T03:05:01","rev_note":"","script":"#!/usr/bin/env bash\n## Drupal Settings\n# \n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, apt configuration and update/upgrade\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Install/configure UFW\nufw allow http\nufw allow https\n\n# Install/configure MySQL\napt-get install mariadb-server -y\nsystemctl start mariadb\nsystemctl enable mariadb\nmysql_root_preinstall\nrun_mysql_secure_installation\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE drupaldb\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT ALL ON drupaldb.* TO 'drupal'@'localhost' IDENTIFIED BY '$DB_PASSWORD'\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\n# Install & Configure Apache\napt-get install -y apache2\ntouch /var/log/apache2/drupal-error_log /var/log/apache2/drupal-access_log\ncp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/drupal.conf\ncat < /etc/apache2/sites-available/drupal.conf\n\n DocumentRoot /var/www/drupal\n ServerName $FQDN\n ServerAlias www.$FQDN\n \n Options FollowSymLinks\n AllowOverride All\n Order allow,deny\n allow from all\n RewriteEngine on\n RewriteBase /\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteCond %{REQUEST_URI} !=/favicon.ico\n RewriteRule ^ index.php [L]\n\n ErrorLog /var/log/apache2/drupal-error_log\n CustomLog /var/log/apache2/drupal-access_log common\n\nEND\na2enmod rewrite\na2dissite 000-default.conf\na2ensite drupal.conf\nsed -ie \"s/KeepAlive Off/KeepAlive On/g\" /etc/apache2/apache2.conf\nsystemctl restart apache2\nsystemctl enable apache2\n\n# Install PHP 8.1\napt-get install php libapache2-mod-php php-mysql php-curl php-cgi php-gd php-mbstring php-xml php-xmlrpc -y\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat < /etc/php/$PHP_VERSION/apache2/php.ini\nerror_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR\nerror_log = /var/log/php/error.log\nmax_input_time = 30\nEND\nmkdir /var/log/php\nchown www-data /var/log/php\n\n# Install Drupal\nrm -r /var/www/html\ncd ~; wget -4 https://www.drupal.org/download-latest/tar.gz\ntar -xf tar.gz -C /var/www/ && mv /var/www/drupal* /var/www/drupal\nrm tar.gz\nmkdir /var/www/drupal/sites/default/files\nchmod a+w /var/www/drupal/sites/default/files\ncp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php\nchmod a+w /var/www/drupal/sites/default/settings.php\ncat <> /var/www/drupal/sites/default/settings.php\n\\$settings['trusted_host_patterns'] = [\n '^$FQDN\\$',\n];\nEND\n\n# Cleanup\nsystemctl restart apache2\nsystemctl restart mysql\n\n# SSL\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"dbroot_password","label":"MySQL root Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"db_password","label":"Database Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Drupal server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1008125,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Easypanel One-Click","description":"Easypanel One-Click","ordinal":29,"logo_url":"assets/easypanel.svg","images":["linode/ubuntu22.04"],"deployments_total":1424,"deployments_active":79,"is_public":true,"mine":false,"created":"2022-05-18T16:43:00","updated":"2023-12-11T07:40:49","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nsh get-docker.sh\n\n# setup easypanel\ndocker run --rm \\\n -v /etc/easypanel:/etc/easypanel \\\n -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n easypanel/easypanel setup","user_defined_fields":[]},{"id":691620,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"FileCloud One-Click","description":"FileCloud One-Click","ordinal":30,"logo_url":"assets/filecloud.svg","images":["linode/ubuntu20.04"],"deployments_total":790,"deployments_active":14,"is_public":true,"mine":false,"created":"2020-11-30T21:16:19","updated":"2023-12-12T10:31:20","rev_note":"","script":"#!/bin/bash \n\n## Domain Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source and run the New Linode Setup script for DNS configuration\n# This also sets some useful variables, like $IP and $FQDN\n\nsource \n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nset pipefail -o\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Allow traffic on ports 80 and 443\nufw allow 80\nufw allow 443\n\n# Installing Filecloud and Prequisites\nwget -qO - https://repo.filecloudlabs.com/static/pgp/filecloud.asc | sudo apt-key add -\nwget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\necho \"deb [ arch=amd64 ] https://repo.filecloudlabs.com/apt/ubuntu focal/filecloud/22.1 main\" | sudo tee /etc/apt/sources.list.d/filecloud.list\napt-get update -y\napt-get install apache2 mongodb-org -y\napt install -y --no-install-recommends php8.1*\nACCEPT_EULA=Y apt-get install filecloud -y\n\nif [[ \"$SSL\" == \"Yes\" ]]; then\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"ssl","label":"Would you like to use a free CertBot SSL certificate?","oneof":"Yes,No","default":"No"},{"name":"soa_email_address","label":"Email Address for Lets' Encrypt Certificate","default":""},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":609392,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Flask One-Click","description":"Flask One-Click","ordinal":31,"logo_url":"assets/flask.svg","images":["linode/debian10"],"deployments_total":2171,"deployments_active":136,"is_public":true,"mine":false,"created":"2019-11-07T06:24:17","updated":"2023-12-11T05:42:53","rev_note":"Initial import","script":"#!/bin/bash\n\n## Enable logging\nexec > /var/log/stackscript.log 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\nufw_install\nufw allow http\n\n# Install Prereq's & Flask APP\napt install -y git\ncd /home\ngit clone https://github.com/abalarin/Flask-on-Linode.git flask_app_project\n\n# Install & configure Nginx\napt install -y nginx\ncat < /etc/nginx/sites-enabled/flask_app\nserver {\n listen 80;\n server_name $IP;\n location / {\n proxy_pass http://127.0.0.1:8000;\n proxy_set_header Host \\$host;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\n\nunlink /etc/nginx/sites-enabled/default\nnginx -s reload\n\n# Install python & Packages\napt install -y python3 python3-pip\ncd /home/flask_app_project\npip3 install -r flask_app/requirements.txt\n\n# Configure Flask\ncat < /etc/config.json\n{\n \"SECRET_KEY\": \"$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)\",\n \"SQLALCHEMY_DATABASE_URI\": \"sqlite:///site.db\"\n}\nEND\n\ncat < /home/flask_app_project/flask_app/__init__.py\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_login import LoginManager\nimport json\nimport urllib3\napp = Flask(__name__)\nwith open('/etc/config.json') as config_file:\n config = json.load(config_file)\napp.config['SECRET_KEY'] = config.get('SECRET_KEY')\napp.config['SQLALCHEMY_DATABASE_URI'] = config.get('SQLALCHEMY_DATABASE_URI')\ndb = SQLAlchemy(app)\nlogin_manager = LoginManager()\nlogin_manager.init_app(app)\nfrom flask_app import routes\nEND\n\n# Install and Configure Gunicorn\napt install -y gunicorn3\ngunicorn3 --workers=3 flask_app:app &\n\n# Install and Configure Supervisor\napt install -y supervisor\ncat < /etc/supervisor/conf.d/flask_app.conf\n[program:flask_app]\ndirectory=/home/flask_app_project\ncommand=gunicorn3 --workers=3 flask_app:app\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/flask_app/flask_app.err.log\nstdout_logfile=/var/log/flask_app/flask_app.out.log\nEND\n\nmkdir /var/log/flask_app\ntouch /var/log/flask_app/flask_app.out.log\ntouch /var/log/flask_app/flask_app.err.log\nsupervisorctl reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":971045,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Focalboard One-Click","description":"Focalboard One-Click","ordinal":32,"logo_url":"assets/focalboard.svg","images":["linode/ubuntu22.04"],"deployments_total":480,"deployments_active":21,"is_public":true,"mine":false,"created":"2022-02-08T16:23:08","updated":"2023-12-09T17:50:19","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Focalboard Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-focalboard\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n #Focalboard vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1088136,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster One-Click","description":"Galera Cluster One-Click","ordinal":33,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":130,"deployments_active":9,"is_public":true,"mine":false,"created":"2022-11-15T20:41:27","updated":"2023-12-08T19:32:12","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/galera-occ\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/galera-occ\" ]; then\n rm -rf /tmp/galera-occ\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n export DEBIAN_FRONTEND=non-interactive\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # add private IP address\n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/galera-occ\n cd /tmp/galera-occ/\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip3 install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"cluster_name","label":"Cluster Name"},{"name":"token_password","label":"Your Linode API token"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Galera CA"},{"name":"common_name","label":"Common Name","default":"Galera Server"},{"name":"cluster_size","label":"Galera cluster size","default":"3","oneof":"3"}]},{"id":688911,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gitea One-Click","description":"Gitea One-Click","ordinal":34,"logo_url":"assets/gitea.svg","images":["linode/debian10"],"deployments_total":1016,"deployments_active":69,"is_public":true,"mine":false,"created":"2020-11-17T21:16:09","updated":"2023-12-12T13:07:22","rev_note":"","script":"#! /bin/bash\n\n## Database Settings\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n#assigns var for IP address\nreadonly ip=$(hostname -I | awk '{print$1}')\n\n#intall git\napt install -y git\n\n#install nginx\napt install -y nginx\n\n#install mysql and secure\nmysql_root_preinstall\napt-get install -y mariadb-server\nsystemctl start mariadb\nsystemctl enable mariadb\nrun_mysql_secure_installation\n\n#create mysql db and user\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE gitea;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE USER 'gitea'@'localhost' IDENTIFIED BY '$(printf '%q' \"$DB_PASSWORD\")';\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' WITH GRANT OPTION;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES;\"\n\n#create user for gitea\nadduser --system --disabled-password --group --shell /bin/bash --gecos 'Git Version Control' --home /home/git git\n\n#create directories for gitea\nmkdir -p /var/lib/gitea/{custom,data,log}\nchown -R git:git /var/lib/gitea/\nchmod -R 750 /var/lib/gitea/\nmkdir /etc/gitea\nchown root:git /etc/gitea\nchmod 770 /etc/gitea\n\n#pull down gitea binary\nwget -O gitea https://dl.gitea.io/gitea/1.13.0/gitea-1.13.0-linux-amd64\nchmod +x gitea\n\n#validate gpg\napt install gnupg -y\ngpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2\ngpg --verify gitea-1.13.0-linux-amd64.asc gitea-1.13.0-linux-amd64\n\n#copy gitea to global location\ncp gitea /usr/local/bin/gitea\n\n#download systemd file from gitea\nwget https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service -P /etc/systemd/system/\n\n#add requires mysql to the systemd file\nsed -i 's/#Requires=mariadb.service/Requires=mariadb.service/' /etc/systemd/system/gitea.service\n\n#start gitea as systemd service\nsystemctl daemon-reload\nsystemctl start gitea\nsystemctl enable gitea\n\n#configures ufw rules before nginx\nsystemctl start ufw\nufw allow http\nufw allow https\nufw enable\n\n#set absolute domain if any, otherwise use localhost\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=localhost\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:3000;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx\n\nsleep 60\n\n#sets certbot ssl\nif [[ $SSL = \"Yes\" ]]; then\n check_dns_propagation ${ABS_DOMAIN} ${ip}\n apt install python3-certbot-nginx -y\n certbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${EMAIL_ADDRESS} -w /var/www/html/\nfi\n\nstackscript_cleanup","user_defined_fields":[{"name":"dbroot_password","label":"MySQL root Password"},{"name":"db_password","label":"gitea Database Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records.","default":""},{"name":"subdomain","label":"The subdomain for your server (Domain required)","default":""},{"name":"domain","label":"Your domain (API Token required)","default":""},{"name":"soa_email_address","label":"SOA Email for your domain (Required for new domains)","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate for your domain?","oneof":"Yes,No","default":"No"},{"name":"email_address","label":"Admin Email for Let's Encrypt certificate","default":""}]},{"id":401707,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"GitLab One-Click","description":"GitLab One-Click","ordinal":35,"logo_url":"assets/GitLab.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":3270,"deployments_active":139,"is_public":true,"mine":false,"created":"2019-03-08T21:12:21","updated":"2023-12-09T12:02:06","rev_note":"Remove SSH Pubkey UDF","script":"#!/usr/bin/env bash\n\n## Gitlab Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction gitlab {\n # Install dependencies\n apt-get install curl ca-certificates apt-transport-https gnupg2 -y\n\n curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash\n apt-get update -y\n EXTERNAL_URL=\"https://$FQDN\" apt-get install gitlab-ce -y\n\n}\n\nfunction sslgitlab {\n # Taking advantage of Gitlab's Let's Encrypt cert capabilities\n sed -i \"s/# letsencrypt\\['enable'\\] = nil/letsencrypt\\['enable'\\] = true/g\" /etc/gitlab/gitlab.rb\n sed -i -E \"s/(# )(letsencrypt\\['auto_renew*)/\\2/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/letsencrypt['auto_renew_minute'] = nil/letsencrypt['auto_renew_minute'] = 0/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/# letsencrypt\\['contact_emails'\\] = \\[\\]/letsencrypt\\['contact_emails'\\] = \\['$SOA_EMAIL_ADDRESS']/g\" /etc/gitlab/gitlab.rb\n\n gitlab-ctl reconfigure\n}\n\nfunction firewallgitlab {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n gitlab\n firewallgitlab\n sslgitlab\n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Gitlab server's DNS records","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""}]},{"id":1102905,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gopaddle One-Click","description":"Gopaddle One-Click app","ordinal":36,"logo_url":"assets/gopaddle.svg","images":["linode/ubuntu22.04"],"deployments_total":46,"deployments_active":2,"is_public":true,"mine":false,"created":"2022-12-20T17:44:47","updated":"2023-12-09T22:36:44","rev_note":"","script":"#!/bin/bash\nexec >/var/log/stackscript.log 2>&1\n# Install Docker\napt-get update -y\napt-get install -y ca-certificates curl gnupg lsb-release\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\napt-get update -y\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get update -y\napt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\n\n# Install microk8s\napt-get install snapd -y \nsudo snap install core\nexport PATH=$PATH:/snap/bin\nsnap install microk8s --classic --channel=1.25\nsnap refresh microk8s --channel=1.25\nmicrok8s status --wait-ready\n\n\n# Install gopaddle\nmicrok8s addons repo add gp-lite https://github.com/gopaddle-io/microk8s-community-addons-gplite.git\nmicrok8s enable gopaddle-lite\n\necho Waiting for gopaddle services to move to running state ...\nmicrok8s.kubectl wait --for=condition=ready pod -l released-by=gopaddle -n gp-lite --timeout=15m\n\nRDNS=$(dnsdomainname -A | awk '{print $1}')\n\necho gopaddle-lite installation is complete ! You can now access the gopaddle dashboard @ http://$RDNS:30003/","user_defined_fields":[]},{"id":607256,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Grafana One-Click","description":"Grafana One Click App","ordinal":37,"logo_url":"assets/grafana.svg","images":["linode/debian11"],"deployments_total":835,"deployments_active":55,"is_public":true,"mine":false,"created":"2019-10-30T20:43:07","updated":"2023-12-10T22:50:48","rev_note":"","script":"#!/usr/bin/env bash\n\n### Grafana OCA\n\n## Grafana Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Source the Bash StackScript Library\nsource \n\n# Source and run the New Linode Setup script for SSH configuration\nsource \n\n# Install PreReqs\napt-get install -y apt-transport-https \\\nsoftware-properties-common \\\nwget \\\ngnupg2 \\\nsqlite3\n\nwget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\necho \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\napt-get -y update\napt-get -y install grafana\nsystemctl start grafana-server\nsystemctl enable grafana-server\n\n## reset Grafana admin password\n#grafana-cli --homepath \"/usr/share/grafana\" admin reset-admin-password $grafana_password. --not working -hmorris\necho \"Initializing DB.....\" && sleep 25\nsqlite3 /var/lib/grafana/grafana.db <\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction grav {\n apt-get install -y apache2 php libapache2-mod-php php-mysql mysql-server composer php-curl php-common php-gd php-json php-mbstring php-xml php-zip\n run_mysql_secure_installation_ubuntu20\n cd /var/www/html\n git clone https://github.com/getgrav/grav.git\n cd grav\n chown www-data:www-data -R .\n su -l www-data -s /bin/bash -c \"cd /var/www/html/grav && composer install --no-dev -o && bin/grav install && bin/gpm install admin\"\n chown www-data:www-data -R .\n}\n\nfunction apache_conf {\n cat < /etc/apache2/sites-available/grav.conf\n\nServerAdmin $SOA_EMAIL_ADDRESS\nDocumentRoot /var/www/html/grav/\nServerName $FQDN\nServerAlias www.$FQDN\n\nOptions FollowSymLinks\nAllowOverride All\nOrder allow,deny\nallow from all\n\nErrorLog /var/log/apache2/$FQDN-error_log\nCustomLog /var/log/apache2/$FQDN-access_log common\n\n\nEND\n a2enmod rewrite\n a2ensite grav.conf\n a2dissite 000-default.conf\n service apache2 restart\n}\n\nfunction ssl {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n firewall\n grav\n apache_conf\n ssl\n\n}\n\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":688914,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Guacamole One-Click","description":"Guacamole One-Click","ordinal":39,"logo_url":"assets/guacamole.svg","images":["linode/ubuntu22.04"],"deployments_total":4459,"deployments_active":63,"is_public":true,"mine":false,"created":"2020-11-17T21:28:05","updated":"2023-12-12T02:07:58","rev_note":"","script":"#!/usr/bin/env bash\n### Apache Guacamole OCA\n### Required UDFs\n## Guacamole Settings\n#\n#\n#\n#\n#\n### Optional UDFs\n## Linode/SSH Security Settings\n#\n#\n## Domain Settings\n#\n#\n#\n## Logging and other debugging helpers\n# Put bash into verbose mode\nset -o pipefail\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Imports\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n### Main Script\n## Open the needed firewall ports\nufw allow http\nufw allow https\n# Install dependencies\nsystem_install_package build-essential libcairo2-dev libpng-dev libtool-bin libossp-uuid-dev libvncserver-dev freerdp2-dev libssh2-1-dev \\\nlibtelnet-dev libwebsockets-dev libpulse-dev libvorbis-dev libwebp-dev \\\nlibssl-dev libpango1.0-dev libswscale-dev libavcodec-dev libavutil-dev \\\nlibavformat-dev\n# Download the Guacamole Server source code\n# Fetch the latest release page\nlatest_release_page=$(curl -sL https://guacamole.apache.org/releases/ | grep -m 1 -o 'href=\"/releases/[0-9.]\\+/\"')\n# Extract the version number from the release page URL\nlatest_version=$(echo $latest_release_page | grep -Eo '[0-9]\\.[0-9]+.[0-9]+')\n# Download the server component\nwget https://downloads.apache.org/guacamole/$latest_version/source/guacamole-server-$latest_version.tar.gz\ntar -xvf guacamole-server-$latest_version.tar.gz\ncd guacamole-server-$latest_version\n# Build Guacamole Server using the downloaded source code\n./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots\nmake\nmake install\n# Update installed library cache and reload systemd\nldconfig\nsystemctl daemon-reload\n# Start guacd\nsystemctl enable guacd\n## Install Guacamole Web App\n# Install Apache Tomcat\nsystem_install_package tomcat9 tomcat9-admin tomcat9-common tomcat9-user\n# Download and install the Guacamole Client\nwget https://downloads.apache.org/guacamole/$latest_version/binary/guacamole-$latest_version.war\nmv guacamole-$latest_version.war /var/lib/tomcat9/webapps/guacamole.war\nsystemctl restart tomcat9 guacd\n## Guacamole configs\nmkdir /etc/guacamole\nreadonly ENCRYPTED_GUACAMOLE_PASSWORD=\"$(echo -n \"$GUACAMOLE_PASSWORD\" | openssl md5 | awk '{print $2}')\"\ncat <> /etc/guacamole/user-mapping.xml\n\n \n \n \n \n vnc\n localhost\n 5901\n ${PASSWORD}\n \n \n\nEOF\ncat <> /etc/guacamole/guacd.conf\n[daemon]\npid_file = /var/run/guacd.pid\n#log_level = debug\n[server]\nbind_host = 127.0.0.1\nbind_port = 4822\nEOF\ncat <> /etc/guacamole/guacamole.properties\n# Hostname and port of guacamole proxy\nguacd-hostname: localhost\nguacd-port: 4822\nEOF\nsystemctl restart tomcat9 guacd\n## Install a desktop environment (XFCE) and VNC Server\n# Install XFCE & NVC\nsystem_install_package xfce4 xfce4-goodies tigervnc-standalone-server expect\n# Set the VNC Server password\nreadonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\nsystemctl restart tomcat9 guacd\nkillvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\nkill $killvncprocess\n# Create a systemd service for Tiger VNC\ntouch /etc/systemd/system/vncserver@.service\ncat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n# Start and enable the systemd service\nsystemctl start vncserver@1.service\nsystemctl enable vncserver@1.service\n## Reverse proxy for the Guacamole client\n# Install Apache\napache_install\na2enmod proxy proxy_http headers proxy_wstunnel\n# Create the VirtualHost for Guacamole\ncat < /etc/apache2/sites-available/guacamole.conf\n\n ServerName $FQDN\n ErrorLog ${APACHE_LOG_DIR}/guacamole_error.log\n CustomLog ${APACHE_LOG_DIR}/guacamole_access.log combined\n \n Require all granted\n ProxyPass http://localhost:8080/guacamole/ flushpackets=on\n ProxyPassReverse http://localhost:8080/guacamole/\n \n \n Require all granted\n ProxyPass ws://localhost:8080/guacamole/websocket-tunnel\n ProxyPassReverse ws://localhost:8080/guacamole/websocket-tunnel\n \n Header always unset X-Frame-Options\n\nEOF\n# Enable the VirtualHost\na2ensite guacamole.conf\nsystemctl restart apache2\n## HTTPS\nsystem_install_package python3-certbot-apache\ncertbot -n --apache --agree-tos --redirect --hsts --staple-ocsp --email \"$SOA_EMAIL_ADDRESS\" -d \"$FQDN\" \n## Cleanup after ourselves\nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo/VNC user to be created for the Linode"},{"name":"password","label":"The password for the limited sudo/VNC user"},{"name":"guacamole_user","label":"The username to be used with Guacamole"},{"name":"guacamole_password","label":"The password to be used with Guacamole"},{"name":"soa_email_address","label":"Email for SSL certificate"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required if filling out any of the domain-related fields.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record","default":""},{"name":"domain","label":"The domain for the Linode's DNS record","default":""}]},{"id":1102902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HaltDOS Community WAF One-Click","description":"HaltDOS Community WAF One-Click app","ordinal":40,"logo_url":"assets/haltdos.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":174,"deployments_active":8,"is_public":true,"mine":false,"created":"2022-12-20T17:34:20","updated":"2023-12-07T12:34:52","rev_note":"","script":"#!/bin/bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\necho -e \"\\n---------------HALTDOS COMMUNITY WAF SETUP---------------\"\n\nexport NEEDRESTART_SUSPEND=1\nip=`ip route get 8.8.8.8 | awk -F\"src \" 'NR==1{split($2,a,\" \");print a[1]}'`\necho -e \"Checking OS ...\"\nsource /etc/os-release > /dev/null 2>&1\narch=`uname -m`\nif [[ \"$ID\" == \"ubuntu\" || \"$ID\" == \"debian\" ]]; then\n if [[ \"$VERSION_ID\" == \"18.04\" || \"$VERSION_ID\" == \"20.04\" || \"$VERSION_ID\" == \"22.04\" || \"$VERSION_ID\" == \"11\" ]]; then\n if [ \"$arch\" != \"x86_64\" ]; then\n echo -e \"\\e[1;31m$arch is not yet supported. Supported System Architecture - x86_64 \\e[0m\"\n fi\n else\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported OS - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\n fi\nelse\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported Versions - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\nfi\n\necho -e \"Downloading dependencies ...\"\n\napt-get update &> /dev/null\n\napt-get install -y default-jdk default-jre &> /dev/null\necho \"JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/\" >> /etc/environment\nsource /etc/environment\n\necho -e \"Downloading latest binaries ...\"\n\nsource /etc/os-release > /dev/null 2>&1\nif [ \"$VERSION_ID\" == \"18.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null \n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-18/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"20.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-20/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"22.04\" ]; then\n apt-get install -y libmaxminddb-dev libmaxminddb0 mmdb-bin python2-dev python2 &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-22/hd-community-waf-x86_64.deb &> /dev/null\nelif [[ \"$ID\" == \"debian\" && \"$VERSION_ID\" == \"11\" ]]; then\n apt-get install -y sudo libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/debian-11/hd-community-waf-x86_64.deb &> /dev/null\nfi\n\napt-get install -y ./hd-community-waf.deb &> /dev/null\nrm hd-community-waf.deb\necho -e \"Haltdos Community WAF Installed\"\n\n\ncurl -s -k -o hd-community-controller.deb https://binary.haltdos.com/community/waf/gui/hd-community-controller-x86_64.deb &> /dev/null\napt-get install -y ./hd-community-controller.deb &> /dev/null\nrm hd-community-controller.deb\necho -e \"Haltdos Community Controller Installed\"\n\n\necho -e \"Haltdos Community WAF Setup Done\\n\"\necho -e \"Configure your WAF on https://$ip:9000\\n\"\nexport NEEDRESTART_SUSPEND=0","user_defined_fields":[]},{"id":912262,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Harbor One-Click","description":"Harbor One-Click","ordinal":41,"logo_url":"assets/harbor.svg","images":["linode/ubuntu22.04"],"deployments_total":290,"deployments_active":13,"is_public":true,"mine":false,"created":"2021-09-29T17:06:13","updated":"2023-12-12T10:54:07","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## harbor Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-harbor\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # harbor vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the Harbor server and Let's Encrypt SSL certificate"}]},{"id":1037037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad One-Click","description":"HashiCorp Nomad One Click App","ordinal":42,"logo_url":"assets/nomad.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":105,"deployments_active":3,"is_public":true,"mine":false,"created":"2022-08-02T18:46:19","updated":"2023-12-09T07:05:18","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## set some variables\nexport NOMAD_DIR=/usr/bin\nexport NOMAD_PATH=${NOMAD_DIR}/nomad\nexport NOMAD_CONFIG_DIR=/etc/nomad.d\nexport NOMAD_DATA_DIR=/opt/nomad/data\nexport NOMAD_TLS_DIR=/opt/nomad/tls\nexport NOMAD_ENV_VARS=${NOMAD_CONFIG_DIR}/nomad.conf\nexport IP=$(hostname -I | awk '{print$1}')\n\n\n## install gpg\napt-get install -y gpg\n\n## Install Nomad\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\nsudo apt update -y && sudo apt install -y nomad\n\n#echo \"Start Nomad in -server mode\"\nsudo tee ${NOMAD_ENV_VARS} > /dev/null < ${NOMAD_ENV_VARS}\n[Unit]\nDescription=Nomad Agent\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nRestart=on-failure\nEnvironmentFile=/etc/nomad.d/nomad.conf\nExecStart=/usr/local/bin/nomad agent -config /etc/nomad.d $FLAGS\nExecReload=/bin/kill -HUP $MAINPID\nKillSignal=SIGTERM\nUser=root\nGroup=root\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\n## enable and start nomad\nsystemctl enable nomad\nsystemctl start nomad\n\n## Install Docker\ncurl -fsSL get.docker.com | sudo sh\n\n## Configure nginx container\ncat << EOF > /root/nginx.conf\nevents {}\n\nhttp {\n server {\n location / {\n proxy_pass http://nomad-ws;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n\n # Nomad blocking queries will remain open for a default of 5 minutes.\n # Increase the proxy timeout to accommodate this timeout with an\n # additional grace period.\n proxy_read_timeout 310s;\n\n # Nomad log streaming uses streaming HTTP requests. In order to\n # synchronously stream logs from Nomad to NGINX to the browser\n # proxy buffering needs to be turned off.\n proxy_buffering off;\n\n # The Upgrade and Connection headers are used to establish\n # a WebSockets connection.\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n\n # The default Origin header will be the proxy address, which\n # will be rejected by Nomad. It must be rewritten to be the\n # host address instead.\n proxy_set_header Origin \"\\${scheme}://\\${proxy_host}\";\n }\n }\n\n # Since WebSockets are stateful connections but Nomad has multiple\n # server nodes, an upstream with ip_hash declared is required to ensure\n # that connections are always proxied to the same server node when possible.\n upstream nomad-ws {\n ip_hash;\n server host.docker.internal:4646;\n }\n}\nEOF\n\n## start docker container\ndocker run -d --publish=8080:80 --add-host=host.docker.internal:host-gateway \\\n --mount type=bind,source=$PWD/nginx.conf,target=/etc/nginx/nginx.conf \\\n nginx:latest\n\n## firewall\nufw allow 22\nufw allow 80\nufw allow 443\nufw allow 4646\nufw allow 8080\n\ncat << EOF > /etc/motd\n#################################\n The Nomad GUI is now available at HTTP://${IP}:8080\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Nomad configurations at https://www.nomadproject.io/docs/configuration\n#################################\nEOF\n\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1226544,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster One-Click","description":"Nomad Cluster One-Click","ordinal":43,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":97,"deployments_active":5,"is_public":true,"mine":false,"created":"2023-08-25T19:05:25","updated":"2023-12-03T16:18:47","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\ngit_username=\"akamai-compute-marketplace\"\nexport GIT_REPO_1=\"https://github.com/$git_username/nomad-occ.git\"\nexport GIT_REPO_2=\"https://github.com/$git_username/nomad-client-occ.git\"\nexport DEBIAN_FRONTEND=non-interactive\nexport UUID=$(uuidgen | awk -F - '{print $1}')\nexport CLUSTER_MODE='cluster'\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-server-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n REGION=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .region)\n export REGION=\"${REGION}\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${UUID}-${REGION}\\\"]}\" \\ \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO_1} /tmp/linode\n git clone ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n # clone one branch to test \n # git clone -b develop ${GIT_REPO_1} /tmp/linode\n # git clone -b develop ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Total instance count","default":"6","oneof":"6"},{"name":"servers","label":"Nomad Server count","default":"3","oneof":"3"},{"name":"clients","label":"Nomad client size","default":"3","oneof":"3"}]},{"id":1226545,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Clients Cluster One-Click","description":"Nomad Cluster Clients One-Click","ordinal":44,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":3,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-08-25T19:07:27","updated":"2023-11-14T15:53:47","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-client-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${CLUSTER_UUID}\\\"]}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=noninteractive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n # clone one branch to test \n # git clone -b develop ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Nomad Client Count","default":"3","oneof":"3,5,7"},{"name":"consul_nomad_autojoin_token_password","label":"consul_nomad_autojoin_token generated by Nomad Server OCC"},{"name":"cluster_uuid","label":"cluster_uuid tag for the Nomad Server OCC being joined to.","# git repogit_username":"akamai-compute-marketplace","export git_repo":"https://github.com/$git_username/nomad-client-occ.git"}]},{"id":1037038,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Vault One-Click","description":"HashiCorp Vault One Click App","ordinal":45,"logo_url":"assets/vault.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":217,"deployments_active":17,"is_public":true,"mine":false,"created":"2022-08-02T18:47:32","updated":"2023-12-12T08:52:30","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nexport IP=$(hostname -I | awk '{print$1}')\nexport VAULT_ADDR=\"http://${IP}:8200\"\n\n## install gpg\napt install -y gpg\n\n## add hashicorp gpg key and repo\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg >/dev/null\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\n\n## install vault\napt update && apt install -y vault\n\n## basic vault configs\nmkdir -p /vault/data\nchown -R vault:vault /vault\ncat << EOF > /etc/vault.d/vault.hcl\nstorage \"raft\" {\n path = \"/vault/data\"\n node_id = \"node1\"\n}\n\nlistener \"tcp\" {\n address = \"${IP}:8200\"\n tls_disable = \"true\"\n}\n\ndisable_mlock = true\n\napi_addr = \"http://127.0.0.1:8200\"\ncluster_addr = \"https://127.0.0.1:8201\"\nui = true\nEOF\n\n## systemd for vault\nsystemctl enable vault.service\n\n## Start vault server and stash the tokens\nsystemctl start vault.service\ntouch /root/.vault_tokens.txt\nsleep 20\nvault operator init | grep 'Token\\|Unseal' >> /root/.vault_tokens.txt\n\n## firewall\nufw allow 22\nufw allow 8200\n\n## config info and recommendations\ncat << EOF > /etc/motd\n#####################################\n The Vault server GUI is now available at ${VAULT_ADDR}\n The randomly generate Unseal Tokens and Initial Root Token are listed in /root/.vault_tokens.txt\n ** STORE THESE VALUES SOMEWHERE SAFE AND SECURE **\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Vault configurations at https://www.vaultproject.io/docs/configuration\n######################################\nEOF\n\nsleep 20\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1177605,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Illa Builder One-Click","description":"Illa Builder One-Click App","ordinal":46,"logo_url":"assets/illabuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":99,"deployments_active":3,"is_public":true,"mine":false,"created":"2023-05-17T14:22:00","updated":"2023-12-11T08:04:06","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Sources OCA helpers\nsource \nsource \nsource \nsource \n# Apt update/upgrade\nexport DEBIAN_FRONTEND=non-interactive\napt update && apt upgrade -y\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Env config\nILLA_HOME_DIR=~/illa\nPG_VOLUMN=${ILLA_HOME_DIR}/database\nDRIVE_VOLUMN=${ILLA_HOME_DIR}/drive\n\n\n# Init\nmkdir -p ${ILLA_HOME_DIR}\nmkdir -p ${PG_VOLUMN}\nmkdir -p ${DRIVE_VOLUMN}\n\n# Run\ndocker run -d \\\n --name illa_builder \\\n -v $PG_VOLUMN:/opt/illa/database \\\n -v $DRIVE_VOLUMN:/opt/illa/drive \\\n -p 80:2022 \\\n illasoft/illa-builder:latest\n\necho \"\n********************************************************************************\nWelcome to ILLA Builder!\n********************************************************************************\n # ILLA Builder: http://\"$FQDN\"\n # Website: https://www.illacloud.com\n # Documentation: https://www.illacloud.com/docs/about-illa\n # Github: https://github.com/illacloud\n # Community Support: https://github.com/orgs/illacloud/discussions\n\"","user_defined_fields":[]},{"id":607401,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jenkins One-Click","description":"Jenkins One-Click App","ordinal":47,"logo_url":"assets/jenkins.svg","images":["linode/debian11"],"deployments_total":2001,"deployments_active":133,"is_public":true,"mine":false,"created":"2019-10-31T15:29:54","updated":"2023-12-11T20:27:48","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prereq's & Jenkins\napt install -y default-jre wget gnupg2\nwget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -\nsh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'\napt_setup_update\napt install -y jenkins\nsystemctl enable --now jenkins\n\n# Cleanup \nstackscript_cleanup","user_defined_fields":[]},{"id":869623,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"JetBackup One-Click","description":"JetBackup One-Click","ordinal":48,"logo_url":"assets/jetbackup.svg","images":["linode/centos7","linode/almalinux8"],"deployments_total":102,"deployments_active":1,"is_public":true,"mine":false,"created":"2021-07-21T12:45:59","updated":"2023-11-21T02:29:13","rev_note":"","script":"#!/bin/bash\n\n# JetBackup StackScript UDF Variables\n# \n# \n#\n# The next line makes the Official cPanel StackScript available if cPanel/WHM is selected as the control panel. Do not remove this line.\n# source \n#\n# Log File Paths:\n# StackScript Log: /var/log/stackscript.log\n# cPanel/WHM installation: /var/log/stackscript-595742.log\n# Debugging: /var/log/stackscript-debug.log\n#\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>/var/log/stackscript-debug.log\necho \"PID: $$\"\nCONTROLPANEL=${CONTROLPANEL}\nRELEASE=${RELEASETIER}\nJBDIR=\"/usr/local/jetapps/etc/jetbackup5\"\n\nif [[ -z ${CONTROLPANEL} ]]; then\necho \"Error: No panel selected. Please select a panel to deploy JetBackup.\"\nexit 1\nelif [[ -d ${JBDIR} ]]; then\necho \"Error: JetBackup already installed. Aborting StackScript.\"\nexit 0\nfi\n\necho \"Installing JetApps Repository\"\nrpm --import http://repo.jetlicense.com/centOS/RPM-GPG-KEY-JETAPPS\nyum -y -q install http://repo.jetlicense.com/centOS/jetapps-repo-latest.rpm\nyum -y -q install jetapps --disablerepo=* --enablerepo=jetapps\necho \"JetApps Repository Successfully Installed.\"\n\ncpanelinstall() {\n\necho \"Running cPanel/WHM Marketplace StackScript. You can track the progress of cPanel/WHM with: tail -f /var/log/stackscript-595742.log \"\n(source /root/ssinclude-595742 >>/var/log/stackscript-595742.log 2>&1)\n\n}\n\n# JETBACKUP 5 FOR LINUX - STANDALONE INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"Linux\" ]; then\necho \"Installing JetBackup 5.\"\npackage='jetbackup5-linux'\njetapps --install $package $RELEASE\njbhostname=$(hostname)\njbhostname=\"https://${jbhostname}:3035\"\necho \"Adding a Firewall rule to open port 3035. Port 3035 must be open for access to the JetBackup 5 Linux UI.\"\nfirewall-cmd --permanent --add-port=3035/tcp\nfirewall-cmd --reload\necho \"To go to JetBackup and Accept the User Agreement, go to ${jbhostname} and enter your root login credentials.\"\necho \"To generate a one-time JetBackup 5 login URL after installation and acceptance of the EULA type the following command in the terminal:\"\necho \"jb5login\"\nfi\n\n# JETBACKUP 5 FOR CPANEL/WHM INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"cPanel/WHM\" ]; then\n\npackage='jetbackup5-cpanel'\ncpanelinstall\nsleep 2\necho \"Installing JetBackup 5.\"\njetapps --install $package $RELEASE\necho \"To log in to cPanel/WHM as root user, please enter the following command to generate a one-time login token:\"\necho \"\"\necho \"whmlogin\"\nfi\n\necho \"Review the JetBackup 5 Getting Started Guide at https://docs.jetbackup.com/v5.1/adminpanel/gettingStarted.html\"\ninstallVersion=\"$(jetbackup5 --version | cut -d ' ' -f 1,3,4 | sed \"2 d\")\"\necho \"${installVersion} Successfully Installed!\"\nrm /root/ssinclude-595742\nrm /root/StackScript\nexit 0","user_defined_fields":[{"name":"CONTROLPANEL","label":"Choose a Control Panel to use with JetBackup 5. cPanel/WHM or Linux (No Control Panel)","default":"cPanel/WHM","oneof":"cPanel/WHM,Linux"},{"name":"RELEASETIER","label":"Choose a JetBackup Release Tier.","default":"stable","oneof":"stable,beta,edge"}]},{"id":662121,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jitsi One-Click","description":"Jitsi One-Click","ordinal":49,"logo_url":"assets/jitsi.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":4521,"deployments_active":131,"is_public":true,"mine":false,"created":"2020-08-12T16:08:51","updated":"2023-12-12T15:23:16","rev_note":"","script":"#!/bin/bash\n\n## Jitsi Settings\n#\n\n## Domain Settings\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# dependencies\nexport DEBIAN_FRONTEND=noninteractive\napt install apt-transport-https gnupg2 curl wget -y\napt-add-repository universe\napt update -y\n\n#Install Jitisi dep Prosody\necho deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list\nwget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -\napt install lua5.2\n\n#Install Nginx\napt install -y nginx\nsystemctl start nginx\nsystemctl enable nginx\n\n#Install Jitsi Meet\ncurl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg'\necho 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null\n\n# update all package sources\napt update -y\necho \"jitsi-videobridge jitsi-videobridge/jvb-hostname string $FQDN\" | debconf-set-selections\necho \"jitsi-meet-web-config jitsi-meet/cert-choice select 'Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)'\" | debconf-set-selections\napt --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes install jitsi-meet\n\n# Firewall\nsudo ufw allow 80/tcp\nsudo ufw allow 443/tcp\nsudo ufw allow 10000/udp\nsudo ufw allow 22\nsudo ufw allow 3478/udp\nsudo ufw allow 5349/tcp\nsudo ufw enable\n\n# SSL \ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh <\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction lampjoomla {\n apt-get install apache2 mariadb-server php php-common libapache2-mod-php php-cli php-fpm php-mysql php-json php-opcache php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-zip -y\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cat < /etc/php/$PHP_VERSION/apache2/php.ini\nmemory_limit = 512M\nupload_max_filesize = 256M\npost_max_size = 256M \nmax_execution_time = 300\noutput_buffering = off\ndisplay_errors = off\nupload_tmp_dir = \"/var/www/html/joomla/tmp\"\nEND\n}\n\nfunction databaseconf {\n run_mysql_secure_installation\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE DATABASE joomla_db;\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER 'joomla'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla'@'localhost';\"\n}\n\nfunction apachejoomla {\n apt-get install wget unzip -y\n mkdir -p /var/www/html/joomla\n cd /tmp && wget https://downloads.joomla.org/cms/joomla4/4-1-0/Joomla_4-1-0-Stable-Full_Package.zip?format=zip\n unzip Joomla_4* -d /var/www/html/joomla\n chown -R www-data:www-data /var/www/html/joomla \n chmod -R 755 /var/www/html/joomla\n cat < /etc/apache2/sites-available/joomla.conf\n\n ServerAdmin $SOA_EMAIL_ADDRESS\n DocumentRoot /var/www/html/joomla\n ServerName $FQDN\n\n \n Options FollowSymlinks\n AllowOverride All\n Require all granted\n \n\n ErrorLog ${APACHE_LOG_DIR}/$FQDN_error.log\n CustomLog ${APACHE_LOG_DIR}/$FQDN_access.log combined\n\n\nEND\n a2ensite joomla.conf\n a2enmod rewrite\n a2enmod php$PHP_VERSION\n a2dissite 000-default.conf\n systemctl restart apache2\n\n ufw allow http\n ufw allow https\n}\nfunction ssljoomla {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\n\nfunction main {\n lampjoomla\n databaseconf\n apachejoomla\n ssljoomla\n stackscript_cleanup\n}\n# Execute script\nmain","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":985380,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Joplin One-Click","description":"Joplin One-Click","ordinal":51,"logo_url":"assets/joplin.svg","images":["linode/ubuntu20.04"],"deployments_total":424,"deployments_active":31,"is_public":true,"mine":false,"created":"2022-03-08T18:14:30","updated":"2023-12-09T22:04:54","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Joplin setup\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-joplin\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n \n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # Joplin vars\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n \n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":688912,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kepler Builder One-Click","description":"Kepler Builder One-Click","ordinal":52,"logo_url":"assets/keplerbuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":264,"deployments_active":4,"is_public":true,"mine":false,"created":"2020-11-17T21:17:33","updated":"2023-12-06T21:13:24","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-keplerbuilder\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401701,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LAMP One-Click","description":"LAMP One-Click","ordinal":53,"logo_url":"assets/LAMP.svg","images":["linode/ubuntu22.04"],"deployments_total":13746,"deployments_active":1111,"is_public":true,"mine":false,"created":"2019-03-09T02:07:09","updated":"2023-12-12T15:27:55","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LAMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-lamp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lamp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":606691,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LEMP One-Click","description":"LEMP Stack","ordinal":54,"logo_url":"assets/LEMP.svg","images":["linode/ubuntu22.04"],"deployments_total":4161,"deployments_active":314,"is_public":true,"mine":false,"created":"2019-10-27T15:29:04","updated":"2023-12-12T02:47:42","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LEMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-lemp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lemp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923032,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiteSpeed cPanel One-Click","description":"LiteSpeed cPanel One-Click","ordinal":55,"logo_url":"assets/litespeedcpanel.svg","images":["linode/almalinux8"],"deployments_total":1017,"deployments_active":21,"is_public":true,"mine":false,"created":"2021-10-18T00:57:12","updated":"2023-12-08T17:46:01","rev_note":"","script":"#!/bin/bash\n## Logging\nexec > /var/log/stackscript.log 2>&1\n## Install cPanel\nyum install -y kernel grub2\nsed -i -e \"s/GRUB_TIMEOUT=5/GRUB_TIMEOUT=10/\" /etc/default/grub\nsed -i -e \"s/crashkernel=auto rhgb console=ttyS0,19200n8/console=ttyS0,19200n8/\" /etc/default/grub\nmkdir /boot/grub\ngrub2-mkconfig -o /boot/grub/grub.cfg\nsystemctl stop firewalld.service\nsystemctl disable firewalld.service\nsystemctl stop NetworkManager\nsystemctl disable NetworkManager\nsystemctl enable network\nsystemctl start network\nyum remove NetworkManager -y\ncd /home \ncurl -o latest -L https://securedownloads.cpanel.net/latest && sh latest\nyum remove ea-apache24-mod_ruid2 -y\n## Install LSWS on cPanel\nADMIN_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo '')\ncat <>/home/lsws.options\n## 1 = enable, 0 = disable, 2 = user home directory\nphp_suexec=\"2\"\nport_offset=\"0\"\nadmin_user=\"admin\"\nadmin_pass=\"${ADMIN_PASS}\"\nadmin_email=\"root@localhost\"\neasyapache_integration=\"1\"\nauto_switch_to_lsws=\"1\"\ndeploy_lscwp=\"1\"\nEOT\nbash <( curl https://get.litespeed.sh ) TRIAL","user_defined_fields":[]},{"id":1008123,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiveSwitch One-Click","description":"LiveSwitch One-Click","ordinal":56,"logo_url":"assets/liveswitch.svg","images":["linode/ubuntu20.04"],"deployments_total":195,"deployments_active":1,"is_public":true,"mine":false,"created":"2022-05-18T16:41:37","updated":"2023-12-09T04:23:19","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\nsudo dpkg --configure -a\n\n# kill any background updater jobs\nsudo killall apt apt-get\n\n# helpers\nsudo apt-get install dialog apt-utils -y -q\n\nsudo DEBIAN_FRONTEND=noninteractive apt-get update -y\nsudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef -y\n\n# firewall\n# normal defaults\nsudo ufw default deny incoming\nsudo ufw default allow outgoing\n# ssh on\nsudo ufw allow ssh\n# dynamic inbound traffic\nsudo ufw allow 49152:65535/udp\n# TURN\nsudo ufw allow 3478/udp\n# TURN TCP\nsudo ufw allow 80/tcp\n# TURNS\nsudo ufw allow 443/tcp\n# admin (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 9090/tcp\nsudo ufw allow 9443/tcp\n# gateway (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 8080/tcp\nsudo ufw allow 8443/tcp\n\n# sip\n# sudo ufw allow 5061/udp\n# sudo ufw allow 5061/tcp\n\n# we will turn on the firewall at the end because it disconnects us\n\n# install docker\nsudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\napt-cache policy docker-ce\nsudo apt-get install -y docker-ce\n\n# entropy fix for docker\nsudo apt-get install -y haveged\n\n# install docker compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n\n# retrieve docker compose files\nmkdir -p /opt/liveswitch\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose-liveswitch.service\" -o /opt/liveswitch/docker-compose-liveswitch.service\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose.yml\" -o /opt/liveswitch/docker-compose.yml\n\n# install liveswitch docker compose\nsudo cp /opt/liveswitch/docker-compose-liveswitch.service /etc/systemd/system/\nsudo systemctl enable docker\nsudo systemctl enable docker-compose-liveswitch\nsudo systemctl start docker-compose-liveswitch\n\n# clean up some logs\nsudo rm -f /var/log/cloud-init-output.log\nsudo rm -f /var/log/dpkg.log\nsudo rm -f /var/log/kern.log\nsudo rm -f /var/log/ufw.log\n\n# turn on the firewall\nsudo ufw --force enable\nsudo reboot","user_defined_fields":[]},{"id":869159,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MagicSpam One-Click","description":"MagicSpam One-Click","ordinal":57,"logo_url":"assets/magicspam.svg","images":["linode/centos7"],"deployments_total":6,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-20T19:13:52","updated":"2023-12-11T15:26:23","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\n# source the stackscript for the selected control panel\nif [ \"$CONTROL_PANEL\" == \"cPanel\" ]; then\n # redirect ALL output to the stackscript log for future troubleshooting\n exec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n # cPanel Marketplace App install\n source \n\n # set the hostname to replicate Plesk stackscript for consistent behavior\n IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n echo $HOSTNAME > /etc/hostname\n hostname -F /etc/hostname\n echo $IPADDR $HOSTNAME >> /etc/hosts\nelif [ \"$CONTROL_PANEL\" == \"Plesk\" ]; then\n # Plesk Marketplace App install\n # NOTE: do not redirect output to the stackscript log to avoid duplicate log\n # lines as the Plesk stackscript already redirects to it\n source \nelse\n echo \"Invalid control panel option detected. Aborting...\"\n exit 1\nfi\n\n# install MagicSpam via the installer script\nwget https://www.magicspam.com/download/magicspam-installer.sh -O /root/magicspam-installer\nchmod +x /root/magicspam-installer\n/root/magicspam-installer -l \"$MS_LICENSE_KEY\"","user_defined_fields":[{"name":"control_panel","label":"The Control Panel to deploy alongside with MagicSpam. Make sure to select an Image supported by the selected Control Panel. For more information, please refer to the MagicSpam App Information Sidebar.","oneof":"cPanel,Plesk"},{"name":"ms_license_key","label":"The MagicSpam license key. Please make sure to use the appropriate license key for the selected Control Panel. For more information, please refer to the MagicSpam App information sidebar."},{"name":"hostname","label":"The server's hostname."}]},{"id":1243759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept FFmpeg Plugins Demo One-Click","description":"MainConcept FFmpeg Plugins","ordinal":58,"logo_url":"assets/mainconcept.svg","images":["linode/debian11"],"deployments_total":6,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-09-28T15:02:48","updated":"2023-12-06T21:14:38","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\n\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-ffmpeg-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""}]},{"id":1243760,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept Live Encoder Demo One-Click","description":"MainConcept Live Encoder\r\n\r\n","ordinal":59,"logo_url":"assets/mainconcept.svg","images":["linode/centos-stream9"],"deployments_total":20,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-09-28T15:04:08","updated":"2023-12-06T15:19:44","rev_note":"","script":"#!/bin/bash\n\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-live-encoder-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(dnsdomainname -A | awk '{print $1}')\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n yum install dnf -y\n dnf update -y\n dnf upgrade -y\n dnf install -y git python3 python3-pip\n\n dnf makecache\n dnf install epel-release -y\n dnf makecache\n dnf install ansible -y\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SSL Generation","default":""}]},{"id":1243762,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept P2 AVC ULTRA Transcoder Demo One-Click","description":"MainConcept P2 AVC ULTRA Transcoder","ordinal":60,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:01","updated":"2023-12-07T16:54:44","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept P2 AVC Ultra Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-p2-avc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept P2 AVC Ultra Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243763,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XAVC Transcoder Demo One-Click","description":"MainConcept XAVC Transcoder","ordinal":61,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":2,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:47","updated":"2023-12-06T21:20:30","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XAVC Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xavc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XAVC Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243764,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XDCAM Transcoder Demo One-Click","description":"MainConcept XDCAM Transcoder","ordinal":62,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:06:28","updated":"2023-12-06T21:21:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XDCAM Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xdcam-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n \n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XDCAM Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1096122,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mastodon One-Click","description":"Mastodon is an open-source and decentralized micro-blogging platform, supporting federation and public access to the server.","ordinal":63,"logo_url":"assets/mastodon.svg","images":["linode/debian11"],"deployments_total":1696,"deployments_active":62,"is_public":true,"mine":false,"created":"2022-12-05T15:57:04","updated":"2023-12-11T21:43:20","rev_note":"","script":"#!/bin/bash\nset -x\n## Mastodon Settings\n#\n#\n#\n#\n#\n#\n\n\n# git repo + workdirs\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/mastodon-oca.git\"\nexport WORK_DIR=\"/tmp/oca-deployment\"\nexport LINODE_API_TOKEN=\"${TOKEN_PASSWORD}\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nsource \n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction setup {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip python3-dev build-essential\n\n #clone repo and set up ansible environment\n mkdir -p ${WORK_DIR}\n cd ${WORK_DIR}\n git clone $GIT_REPO\n cd mastodon-oca\n\n # write udf vars\n cat < group_vars/mastodon/vars\n domain: ${DOMAIN}\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n owner_username: ${OWNER_USERNAME}\n owner_email: ${OWNER_EMAIL}\n single_user_mode: ${SINGLE_USER_MODE}\nEND\n\n #venv\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n}\n\nfunction run {\n# run playbooks\n ansible-playbook -v site.yml\n}\n\n# main\nsetup\nrun\ncleanup\necho \"Installation Complete!\"","user_defined_fields":[{"name":"domain","label":"Domain name for your Mastodon instance.","example":"domain.tld"},{"name":"token_password","label":"Your Linode API token"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"owner_username","label":"Username for Mastodon Owner","example":""},{"name":"owner_email","label":"Email address for Mastodon Owner","example":"owner@example.com"},{"name":"single_user_mode","label":"Do you want to start Mastodon in single-user mode?","oneof":"Yes,No"}]},{"id":611895,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MEAN One-Click","description":"MEAN One-Click","ordinal":64,"logo_url":"assets/mean.svg","images":["linode/ubuntu20.04"],"deployments_total":726,"deployments_active":36,"is_public":true,"mine":false,"created":"2019-11-14T04:49:44","updated":"2023-12-06T14:01:30","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MEAN Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction dependmean {\n apt-get install -y build-essential git fontconfig libpng-dev ruby ruby-dev wget gnupg\n gem install sass\n}\n\nfunction mongoinstall {\n cd && wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n echo \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\n\nfunction meaninstall {\n apt-get install -y curl software-properties-common\n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n apt-get install -y nodejs\n\n # MEAN APP CONFIGURATION\n cd && mkdir -p /opt/mean\n cd /opt/mean\n cat <> package.json\n{\n\"name\" : \"mean\",\n\"version\": \"0.0.1\"\n}\nEND\n npm install express --save\n npm install angular\n cat <> server.js\nvar express = require('express');\nvar app = express();\nvar port = 3000;\napp.get('/', function(req, res) {\nres.send('Hello World Powered By: Linode Marketplace');\n});\napp.listen(port, function(){\nconsole.log(\"Listening at port: \" + port);\n})\nEND\n # Start App on reboot\n cd && npm install pm2 -g\n pm2 start --name=\"MEAN_APP\" /opt/mean/server.js\n pm2 startup \n pm2 save\n}\n\nfunction nginxmean {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslmean {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallmean {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n dependmean\n firewallmean\n mongoinstall\n meaninstall\n nginxmean\n sslmean\n\n}\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401702,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MERN One-Click","description":"MERN One-Click","ordinal":65,"logo_url":"assets/MERN.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":1433,"deployments_active":58,"is_public":true,"mine":false,"created":"2019-03-08T21:07:40","updated":"2023-12-10T12:50:08","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3000\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install dependencies\napt-get install -y build-essential git \n\n# Install Mongodb\napt-get install -y wget gnupg\nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Install NodeJS and NPM\napt-get install -y curl software-properties-common\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \ncurl -fsSL https://deb.nodesource.com/setup_16.x | bash -\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\ncurl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get install -y nodejs\n\n# Install ExpressJS\nnpm update -g\nnpm install --global express\nnpm link express\nnpm -g install create-react-app\ncd /opt\ncreate-react-app hello-world\nnpm i --package-lock-only\nnpm audit fix\n\n# Start App on reboot\ncat < /lib/systemd/system/hello-world.service\n[Unit]\nDescription=Hello World React Application Service\nRequires=hello-world.service\nAfter=hello-world.service\n\n[Service]\nType=simple\nUser=root\nRemainAfterExit=yes\nRestart=on-failure\nWorkingDirectory=/opt/hello-world\nExecStart=npm start --host 0.0.0.0 --port=3000\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nsystemctl daemon-reload\nsystemctl start hello-world\nsystemctl enable hello-world\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1051714,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Microweber One-Click","description":"Microweber One-Click","ordinal":66,"logo_url":"assets/microweber.svg","images":["linode/ubuntu20.04"],"deployments_total":478,"deployments_active":21,"is_public":true,"mine":false,"created":"2022-09-01T15:43:41","updated":"2023-12-09T11:00:07","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/microweber/microweber\nset -o pipefail\nMICROWEBER_INSTALLER_TAG=\"1.3.1\"\nWORKING_DIR=\"/var/www/html\"\nDOWNLOAD_URL='http://updater.microweberapi.com/builds/master/microweber.zip'\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php8.1\napt install -y mysql-server\napt install -y php8.1-{bcmath,xml,fpm,mysql,iconv,xsl,zip,intl,ldap,gd,cli,dev,bz2,curl,exif,mbstring,pgsql,sqlite3,tokenizer,opcache,soap,cgi,common,imap,opcache}\napt install -y python3-certbot-apache software-properties-common unzip curl\napt install -y php-pear\npecl install -f libsodium\nsed -i 's/;opcache.enable\\s*=.*/opcache.enable=1/g' /etc/php/8.1/cli/php.ini\necho 'extension=sodium.so' > /etc/php/8.1/cli/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/fpm/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/cgi/10-sodium.ini\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Microweber at http://\\$myip/\n * Secure your database by running:\n > mysql_secure_installation\nFor help and more information visit https://microweber.org\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\ncat >/etc/cron.d/microweber </etc/php/8.1/apache2/conf.d/30-microweber.ini <>/var/log/per-instance.log\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\nMICROWEBER_DB_HOST=localhost\nMICROWEBER_DB_PORT=3306\nMICROWEBER_DB_NAME=microweber\nMICROWEBER_DB_USER=microweber\nMICROWEBER_DB_PASS=$(openssl rand -hex 16)\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\necho \"[OK] Microweber Installer $MICROWEBER_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":691614,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mist.io One-Click","description":"Mist.io One-Click","ordinal":67,"logo_url":"assets/mistio.svg","images":["linode/debian10"],"deployments_total":326,"deployments_active":1,"is_public":true,"mine":false,"created":"2020-11-30T20:25:44","updated":"2023-12-12T12:08:07","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\n# \n\n# \n\n## install docker\nsudo apt-get install -y \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n gnupg-agent \\\n software-properties-common\n\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -\n\nsudo add-apt-repository \\\n \"deb [arch=amd64] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) \\\n stable\"\n\nsudo apt-get update\n\nsudo apt-get install -y docker-ce docker-ce-cli containerd.io\n\n## install docker-compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n\nsudo chmod +x /usr/local/bin/docker-compose\n\n## get latest mist\nmkdir ~/mist && cd ~/mist\n\nexport MIST_CE_REPO=https://github.com/mistio/mist-ce/releases/latest\nexport LATEST_TAG=\"$(curl -sI \"${MIST_CE_REPO}\" | grep -Po 'tag\\/\\K(v\\S+)')\"\n\nwget https://github.com/mistio/mist-ce/releases/download/$LATEST_TAG/docker-compose.yml\n\n# set CORE_URI\nmkdir settings\nexport IP=$(ip r | grep /24 | grep -Eo \"([0-9]{1,3}[\\.]){3}[1-9]{1,3}\")\necho 'CORE_URI=\"http://'$IP'\"' > settings/settings.py\n\ndocker-compose up -d\n\nwhile !(curl -sSLf http://localhost >/dev/null); do\n sleep 5\ndone\n\ndocker-compose exec -T api ./bin/adduser --admin \"${MIST_EMAIL}\" --password \"${MIST_PASSWORD}\"","user_defined_fields":[{"name":"mist_email","label":"Mist admin user's email.","example":"Set your admin user's email."},{"name":"mist_password","label":"Mist admin user's password.","example":"Set your admin user's password."}]},{"id":609195,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB One-Click","description":"MongoDB One-Click","ordinal":68,"logo_url":"assets/mongodb.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":1757,"deployments_active":78,"is_public":true,"mine":false,"created":"2019-11-06T07:14:07","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\n## Mongo Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction mongoinstall {\n apt-get install -y wget gnupg\n if [ $MONGOVERSION == \"5.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ $MONGOVERSION == \"4.4\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\n elif [ $MONGOVERSION == \"4.2\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list\n elif [ $MONGOVERSION == \"4.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list\n fi\n\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\nfunction createmongouser {\n echo \"Creating Mongo User\" & sleep 3\n mongo < /etc/mongod.conf\n# mongod.conf\n# for documentation of all options, see:\n# http://docs.mongodb.org/manual/reference/configuration-options/\n# Where and how to store data.\nstorage:\n dbPath: /var/lib/mongodb\n journal:\n enabled: true\n# engine:\n# wiredTiger:\n# where to write logging data.\nsystemLog:\n destination: file\n logAppend: true\n path: /var/log/mongodb/mongod.log\n# network interfaces\nnet:\n port: 27017\n bindIp: 127.0.0.1\n# how the process runs\nprocessManagement:\n timeZoneInfo: /usr/share/zoneinfo\nsecurity:\n authorization: enabled\n#operationProfiling:\n#replication:\n#sharding:\n## Enterprise-Only Options:\n#auditLog:\n#snmp:\nEOF\n service mongod restart\n}\n\nfunction main {\n mongoinstall\n createmongouser \n setauth\n}\n\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"db_password","label":"Mongo Password"},{"name":"mongoversion","label":"Mongo Version","oneof":"5.0,4.4,4.2,4.0","default":"5.0"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for soa record","default":""}]},{"id":1067004,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster One-Click","description":"MongoDB replica set","ordinal":69,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":49,"deployments_active":0,"is_public":true,"mine":false,"created":"2022-09-29T18:32:36","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_PAT=\"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\"\nexport GIT_REPO=\"https://linode-solutions:${GIT_PAT}@github.com/linode-solutions/mongodb-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/mongodb-cluster\" ]; then\n rm -rf /tmp/mongodb-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction destroy_linode {\n curl -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X DELETE \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # Rename Provisioner & add Private IP \n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/mongodb-cluster\n cd /tmp/mongodb-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"cluster_name","label":"Domain Name"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Mongo CA"},{"name":"common_name","label":"Common Name","default":"Mongo Server"},{"name":"cluster_size","label":"MongoDB cluster size","default":"3","oneof":"3"}]},{"id":869127,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Moodle One-Click","description":"Moodle One-Click","ordinal":70,"logo_url":"assets/moodle.svg","images":["linode/ubuntu20.04"],"deployments_total":1304,"deployments_active":102,"is_public":true,"mine":false,"created":"2021-07-20T18:48:49","updated":"2023-12-12T02:13:31","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n## Moodle settings\n#\n#\n#\n#\n\n## Domain settings\n#\n#\n#\n\n## Linode/SSH Security Settings \n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\n# Install dependencies \napt install -y apache2 mysql-client mysql-server php libapache2-mod-php git graphviz aspell ghostscript clamav php7.4-pspell php7.4-curl php7.4-gd php7.4-intl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-ldap php7.4-zip php7.4-soap php7.4-mbstring\n\n# Firewall\nufw allow http \nufw allow https\n\n# Secure MySQL\nrun_mysql_secure_installation_ubuntu20\n\n# Install Moodle\ncd /var/www/html\ngit clone git://git.moodle.org/moodle.git\ncd moodle\ngit branch --track MOODLE_39_STABLE origin/MOODLE_39_STABLE\ngit checkout MOODLE_39_STABLE\n\n# Configure Moodle\nmkdir /var/moodledata\nchmod -R 777 /var/moodledata \nchmod -R 755 /var/www/html/moodle \n\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE USER 'moodle'@'localhost' IDENTIFIED BY '$DB_PASSWORD';\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodle'@'localhost';\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\ncat < /etc/apache2/sites-available/moodle.conf\n\n ServerAdmin admin@$FQDN\n DocumentRoot /var/www/html/moodle/\n ServerName $FQDN\n ServerAlias www.$FQDN \n \n Options +FollowSymlinks\n AllowOverride All\n Require all granted\n \n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEND\n\na2enmod rewrite\na2ensite moodle.conf\na2dissite 000-default.conf\nservice apache2 restart\n\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n/usr/bin/php admin/cli/install.php --chmod=777 --lang=en_us --wwwroot=https://$FQDN --dataroot=/var/moodledata/ --dbtype=mysqli --dbhost=localhost --dbname=moodle --dbuser=moodle --dbpass=$DB_PASSWORD --dbport=3306 --dbsocket=1 --prefix=mdl_ --fullname=moodle --shortname=moodle --summary=\"Moodle: Powered By Linode Marketplace\" --adminuser=moodle --adminpass=\"$ADMIN_PASSWORD\" --adminemail=$SOA_EMAIL_ADDRESS --upgradekey= --non-interactive --agree-license\n\nchown -R www-data: /var/www/html/moodle\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"admin_password","label":"Moodle Admin Password"},{"name":"soa_email_address","label":"Moodle Admin Email"},{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"db_password","label":"Moodle database User password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":607026,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MySQL/MariaDB One-Click","description":"MySql One Click","ordinal":71,"logo_url":"assets/mysql.svg","images":["linode/ubuntu20.04"],"deployments_total":4605,"deployments_active":335,"is_public":true,"mine":false,"created":"2019-10-29T19:03:33","updated":"2023-12-11T19:45:23","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MySQL Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3306\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\nif [[ \"$DATABASE\" == \"MySQL\" ]]; then\n # Install/configure MySQL\n apt install -y mysql-server\n # Secure MySQL install\n run_mysql_secure_installation_ubuntu20 \nelse \n # Install/configure MySQL\n apt install -y mariadb-server\n # Secure MySQL install\n run_mysql_secure_installation\nfi\n\nmysql -uroot -p$DBROOT_PASSWORD -e \"create database $DATABASE_NAME;\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER '$DBUSER' IDENTIFIED BY '$DBUSER_PASSWORD';\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON $DATABASE_NAME.* TO '$DBUSER'@'%' WITH GRANT OPTION;\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"database","label":"Would you like to install MySQL or MariaDB?","oneof":"MySQL,MariaDB"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser","label":"MySQL User","example":"user1"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"database_name","label":"Create Database","example":"testdb"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970561,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NodeJS One-Click","description":"NodeJS One-Click","ordinal":72,"logo_url":"assets/nodejs.svg","images":["linode/ubuntu20.04"],"deployments_total":2158,"deployments_active":264,"is_public":true,"mine":false,"created":"2022-02-07T17:21:41","updated":"2023-12-12T10:17:05","rev_note":"","script":"#!/usr/bin/env bash\n\n## NodeJS Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction nodejs {\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get install -y nodejs\n \n mkdir -p /opt/nodejs\n cat < /opt/nodejs/hello.js\nconst http = require('http');\n\nconst hostname = 'localhost';\nconst port = 3000;\n\nconst server = http.createServer((req, res) => {\n res.statusCode = 200;\n res.setHeader('Content-Type', 'text/plain');\n res.end('Hello World Powered By Linode Marketplace');\n});\n\nserver.listen(port, hostname, () => {\n console.log(`Server running at http://localhost:3000/`);\n});\nEND\n}\n\nfunction pm2nodejs {\n npm install pm2@latest -g --no-audit\n cd /opt/nodejs/\n pm2 start hello.js\n sleep 5\n pm2 startup systemd\n sleep 5\n pm2 save\n}\n\nfunction nginxnodejs {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslnodejs {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallnodejs {\n ufw allow http\n ufw allow https\n\n}\nfunction main {\n nodejs\n pm2nodejs\n firewallnodejs \n nginxnodejs \n sslnodejs \n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":869156,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NirvaShare One-Click","description":"NirvaShare One-Click","ordinal":73,"logo_url":"assets/nirvashare.svg","images":["linode/ubuntu22.04"],"deployments_total":216,"deployments_active":3,"is_public":true,"mine":false,"created":"2021-07-20T19:08:35","updated":"2023-12-06T21:21:49","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Nirvashare Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-nirvashare\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # Nirvashare \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":971043,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Odoo One-Click","description":"Odoo One-Click","ordinal":74,"logo_url":"assets/odoo.svg","images":["linode/ubuntu22.04"],"deployments_total":1836,"deployments_active":90,"is_public":true,"mine":false,"created":"2022-02-08T16:21:37","updated":"2023-12-12T15:08:11","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## ODOO Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-odoo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # ODOO vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1102907,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ONLYOFFICE Docs One-Click","description":"ONLYOFFICE Docs One-Click app","ordinal":75,"logo_url":"assets/onlyoffice.svg","images":["linode/ubuntu22.04"],"deployments_total":291,"deployments_active":13,"is_public":true,"mine":false,"created":"2022-12-20T17:50:23","updated":"2023-12-02T15:29:24","rev_note":"","script":"#!/usr/bin/env bash\n# \n# \n# \n\n# SSL Settings\n# \n# \n# \n# \n\n# Enable Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n\n# Get and install docker\n# curl -fsSL get.docker.com | sudo sh\napt install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \napt update\napt install -y docker-ce\nsystemctl enable --now docker.service\n\nCONTAINER_NAME=\"onlyoffice-docs\"\n\n# Run ONLYOFFICE-Docs with SSL\nif [[ \"${SSL_ENABLED}\" == \"true\" ]]; then\n\tif [[ -z ${ABS_DOMAIN} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_DOMAIN parameter for correct SSL work\"\n\t\texit 1\n\tfi\n\tif [[ -z ${LETS_ENCRYPT_MAIL} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_MAIL parameter for correct SSL work\"\n\t\texit 1\n fi\n\tsudo docker run -i -t -d -p 80:80 -p 443:443 \\\n\t\t-e JWT_ENABLED=${JWT_ENABLED} \\\n \t\t-e JWT_SECRET=${JWT_SECRET} \\\n\t\t-e LETS_ENCRYPT_DOMAIN=${ABS_DOMAIN} \\\n -e LETS_ENCRYPT_MAIL=${LETS_ENCRYPT_MAIL} \\\n\t\t-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n\t\t-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n \t-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n \t-v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n \t-v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n \t-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n\t\t--name ${CONTAINER_NAME} \\\n\t\tonlyoffice/documentserver:${DOCS_VERSION}\n\telse \n# Run ONLYOFFICE-Docs without SSL\n\tsudo docker run -i -t -d -p 80:80 \\\n -e JWT_ENABLED=${JWT_ENABLED} \\\n -e JWT_SECRET=${JWT_SECRET} \\\n -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n -v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n --name ${CONTAINER_NAME} \\\n onlyoffice/documentserver:${DOCS_VERSION}\nfi\n\n# Wait for run\nready_check() {\n echo -e \"\\e[0;32m Waiting for the launch of DocumentServer... \\e[0m\" \n for i in {1..30}; do\n echo \"Getting the DocumentServer status: ${i}\"\n OUTPUT=\"$(curl -Is http://localhost/healthcheck/ | head -1 | awk '{ print $2 }')\"\n if [ \"${OUTPUT}\" == \"200\" ]; then\n echo -e \"\\e[0;32m DocumentServer is ready \\e[0m\"\n local DS_READY\n DS_READY='yes'\n break\n else\n sleep 10\n fi\n done\n if [[ \"${DS_READY}\" != 'yes' ]]; then\n err \"\\e[0;31m Something goes wrong documentserver does not started, check logs with command --> docker logs -f ${CONTAINER_NAME} \\e[0m\"\n exit 1\n fi\n}\n\nready_check\n\n# Enable Docs-example\nsudo docker exec ${CONTAINER_NAME} supervisorctl start ds:example\n\n# Add Docs-example to autostart\nsudo docker exec ${CONTAINER_NAME} sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf\n\n# Add MOTD \ncat >/etc/motd < >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Django\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/djangosetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Reboot server\nreboot","user_defined_fields":[]},{"id":923031,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed NodeJS One-Click","description":"OpenLiteSpeed NodeJS One-Click","ordinal":77,"logo_url":"assets/openlitespeednodejs.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":500,"deployments_active":19,"is_public":true,"mine":false,"created":"2021-10-18T00:52:51","updated":"2023-12-08T12:05:05","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and NodeJS\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/nodejssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":923030,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed Rails One-Click","description":"OpenLiteSpeed Rails One-Click","ordinal":78,"logo_url":"assets/openlitespeedrails.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":51,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T00:51:05","updated":"2023-12-09T06:40:57","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Rails\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/railssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":691622,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed WordPress One-Click","description":"OpenLiteSpeed WordPress One-Click","ordinal":79,"logo_url":"assets/openlitespeedwordpress.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":7991,"deployments_active":633,"is_public":true,"mine":false,"created":"2020-11-30T21:25:01","updated":"2023-12-12T06:54:23","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### linode\n### Install OpenLiteSpeed and WordPress\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/wpimgsetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401719,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenVPN One-Click","description":"OpenVPN OCA Debian 11 & ubuntu 20","ordinal":80,"logo_url":"assets/OpenVPN.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":40352,"deployments_active":1664,"is_public":true,"mine":false,"created":"2019-03-09T03:02:02","updated":"2023-12-12T15:29:16","rev_note":"Install extra dependencies ","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Install OpenVPN dependencies\napt update && apt -y install ca-certificates wget net-tools gnupg\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian bullseye main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian focal main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelse \necho \"Distro Not Supported\"\nfi\n\n## Apt Update & Install OpenVPN\napt update -y && apt -y install openvpn-as\n\n# UFW install\nufw_install\nufw allow 1194/udp\nsed -ie \"s/DEFAULT_FORWARD_POLICY=\\\"DROP\\\"/DEFAULT_FORWARD_POLICY=\\\"ACCEPT\\\"/g\" /etc/default/ufw\n\n# Cleanup\nstackscript_cleanup\n\n# Adding to display default password as last line in LISH console\nsleep 3\ncat /usr/local/openvpn_as/init.log | grep 'To login'; echo \"(password can be changed on Admin UI)\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""}]},{"id":804172,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Owncast One-Click","description":"Owncast One-Click","ordinal":81,"logo_url":"assets/owncast.svg","images":["linode/debian10"],"deployments_total":1801,"deployments_active":84,"is_public":true,"mine":false,"created":"2021-04-01T15:24:50","updated":"2023-12-12T02:12:06","rev_note":"","script":"#!/usr/bin/bash\n#\n#\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Add owncast user\nadduser owncast --disabled-password --gecos \"\"\n\n# Install dependencies\napt-get install -y libssl-dev unzip curl\n\n# Install Owncast\nmkdir -p /opt/owncast\ncd /opt/owncast || exit\n\ncurl -s https://owncast.online/install.sh | bash\nchown -R owncast:owncast /opt/owncast\n\n# Setup Owncast as a systemd service\ncat >/etc/systemd/system/owncast.service </etc/caddy/Caddyfile </etc/motd <\n#\n#\n## LAMP Stack Settings\n#\n#\n#\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\n## Update\napt_setup_update\n\n## Local Functions used by this StackScript\nfunction owncloud_install {\n system_install_package unzip php-gd php-json php-curl php-mbstring \\\n php-intl php-imagick php-xml php-zip\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cd /var/www\n wget https://download.owncloud.com/server/stable/owncloud-complete-latest.zip\n unzip owncloud-complete-latest.zip\n chown -R www-data:www-data owncloud\n rm owncloud-complete-latest.zip\n local -a input_text=(\n \"Alias / \\\"/var/www/owncloud/\\\"\"\n \"\"\n \" Options +FollowSymlinks\"\n \" AllowOverride All\"\n \"\"\n \" Dav off\"\n \"\"\n \"SetEnv HOME /var/www/owncloud\"\n \"SetEnv HTTP_HOME /var/www/owncloud\"\n \"\"\n )\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n a2ensite owncloud\n a2enmod rewrite headers env dir mime\n sed -i '/^memory_limit =/s/=.*/= 512M/' /etc/php/$PHP_VERSION/apache2/php.ini\n systemctl restart apache2\n echo \"ownCloud is installed\"\n}\n\nfunction owncloud_vhost_configure {\n local -r fqdn=\"$1\"\n local -r soa_email_address=\"$2\"\n local -a input_text=(\n \"\"\n \" ServerName ${fqdn}\"\n \" ServerAdmin ${soa_email_address}\"\n \" DocumentRoot /var/www/owncloud\"\n \" \"\n \" Require all granted\"\n \" AllowOverride All\"\n \" Options FollowSymLinks MultiViews\"\n \" SetEnv HOME /var/www/owncloud\"\n \" SetEnv HTTP_HOME /var/www/owncloud\"\n \" \"\n \"\"\n )\n echo \"\" >> /etc/apache2/sites-available/owncloud.conf\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n}\n\n## Main Script\n# Install and configure the LAMP Stack\nlamp_stack \"$DB_NAME\" \"$DB_ROOT_PASSWORD\" \"${DB_USERNAME:-owncloud}\" \"$DB_USER_PASSWORD\"\n\n# Install ownCloud to be accessed via domain and configure the VirtualHost\nowncloud_install \"$FQDN\"\nowncloud_vhost_configure \"$FQDN\" \"$SOA_EMAIL_ADDRESS\"\n\n# Configure ownCloud - This replaces the installer GUI that was in the previous version of this OCA\nsudo -u www-data php /var/www/owncloud/occ maintenance:install \\\n --database \"mysql\" \\\n --database-name \"$DB_NAME\" \\\n --database-user \"${DB_USERNAME:-owncloud}\" \\\n --database-pass \"$DB_USER_PASSWORD\" \\\n --admin-user \"$OC_ADMIN\" \\\n --admin-pass \"$OC_ADMIN_PASSWORD\"\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 1 --value=$FQDN\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 2 --value=$IP\necho \"Trusted Domain setting added\"\n\n# Open the needed firewall ports\nufw allow http\nufw allow https\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"oc_admin","label":"The name of the admin user for ownCloud"},{"name":"oc_admin_password","label":"The password for ownCloud's admin user"},{"name":"soa_email_address","label":"Admin Email for the ownCloud server"},{"name":"db_name","label":"The name of the database","default":"owncloud"},{"name":"db_root_password","label":"The root password for the database"},{"name":"db_username","label":"The name of the database user to create","default":"owncloud"},{"name":"db_user_password","label":"The password for the created database user"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""}]},{"id":1102906,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Passky One-Click","description":"Passky One-Click app","ordinal":83,"logo_url":"assets/passky.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":184,"deployments_active":10,"is_public":true,"mine":false,"created":"2022-12-20T17:48:51","updated":"2023-12-07T09:51:25","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nInstalling...\nPlease logout and come back in few minutes.\nEOF\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\nDEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n\n# Install docker compose\nsystem_install_package docker-compose\n\n#\n# Passky Server\n#\nwget https://github.com/Rabbit-Company/Passky-Server/releases/latest/download/passky-server.tar.xz\ntar -xf passky-server.tar.xz\ncd passky-server\ncp .env.example .env\n\nSERVER_CORES=$(grep -c ^processor /proc/cpuinfo)\nIP_ADDRESS=$(system_primary_ip)\n\nsed -i \"s/SERVER_CORES=1/SERVER_CORES=$SERVER_CORES/g\" .env\nsed -i \"s/ADMIN_USERNAME=admin/ADMIN_USERNAME=$ADMINUSER/g\" .env\nsed -i \"s/ADMIN_PASSWORD=/ADMIN_PASSWORD=$ADMIN_PASSWORD/g\" .env\n\ndocker-compose up -d\n\napache_install\na2enmod proxy && a2enmod proxy_http && systemctl restart apache2\necho \"\" > /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPreserveHost On\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyRequests Off\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ServerName $WEBSITE\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPass / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPassReverse / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \"\" >> /etc/apache2/sites-available/$WEBSITE.conf\na2ensite \"$WEBSITE\"\nsystemctl restart apache2\n\n# Install SSL\nsystem_install_package python3-certbot-apache\ncat << EOF > /usr/local/bin/installCert\n#!/bin/bash\nif ! certbot -n --apache --agree-tos --redirect -d $WEBSITE -m $EMAIL; then\n echo \"There was a problem while installing SSL certificate. Make sure your A record for domain: $WEBSITE does redirect to IP: $IP_ADDRESS\"\nelse\n echo \"Certificate installed successfully.\"\nfi\nEOF\nchmod +x /usr/local/bin/installCert\n\n# Configure auto-renewal for the certificate\ncrontab -l > cron\necho \"0 4 * * * /usr/bin/certbot renew\" >> cron\ncrontab cron\nrm cron\n\nstackscript_cleanup\n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nAdmin Panel:\n Link: http://$IP_ADDRESS (https://$WEBSITE)\n Username: $ADMINUSER\n Password: $ADMIN_PASSWORD\nTo install SSL certificate please run command: installCert\nEOF","user_defined_fields":[{"name":"website","label":"Website","example":"passky.domain.com"},{"name":"email","label":"Email Address","example":"info@rabbit-company.com"},{"name":"adminuser","label":"Admin Username"},{"name":"admin_password","label":"Admin Password"}]},{"id":804143,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Peppermint One-Click","description":"Peppermint One-Click","ordinal":84,"logo_url":"assets/peppermint.svg","images":["linode/ubuntu22.04"],"deployments_total":1879,"deployments_active":120,"is_public":true,"mine":false,"created":"2021-04-01T12:45:15","updated":"2023-12-12T04:11:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Peppermint setup\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-peppermint\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":644908,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Percona (PMM) One-Click","description":"Percona One-Click","ordinal":85,"logo_url":"assets/percona.svg","images":["linode/debian10"],"deployments_total":195,"deployments_active":7,"is_public":true,"mine":false,"created":"2020-04-30T14:49:38","updated":"2023-12-08T04:59:34","rev_note":"","script":"#!/bin/bash\n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Docker\napt -y install docker.io\nsystemctl enable docker.service\n\n#PMM \ndocker pull percona/pmm-server:2\ndocker create -v /srv --name pmm2-data percona/pmm-server:2 /bin/true\ndocker run -d -p 80:80 -p 443:443 \\\n --volumes-from pmm2-data \\\n --name pmm2-server \\\n --restart always percona/pmm-server:2\n\necho \"Waiting for PMM to initialize to set password...\"\n\nuntil [ \"`docker inspect -f {{.State.Health.Status}} pmm2-server`\" = \"healthy\" ]; do sleep 1; done\n\ndocker exec -t pmm2-server bash -c \"ln -s /srv/grafana /usr/share/grafana/data; grafana-cli --homepath /usr/share/grafana admin reset-admin-password $PMMPASSWORD\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"pmmpassword","label":"Admin Password","example":"Admin User Password for PMM Server"}]},{"id":609018,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"phpMyAdmin One-Click","description":"phpMyAdmin One-Click","ordinal":86,"logo_url":"assets/phpmyadmin.svg","images":["linode/debian11"],"deployments_total":2176,"deployments_active":112,"is_public":true,"mine":false,"created":"2019-11-05T00:28:33","updated":"2023-12-12T14:10:22","rev_note":"Initial import","script":"#!/bin/bash\n#\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname\nset_hostname\n\n# Update system\napt_setup_update\n\n# Install/configure MySQL, Add Admin User\napt-get install -y mariadb-server\nsystemctl enable mariadb --now\nrun_mysql_secure_installation\nmysql -u root -e \"CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD'\"\nmysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost' WITH GRANT OPTION\"\nmysql -u root -e \"FLUSH PRIVILEGES\"\n\n# Install PHP\necho 'phpmyadmin phpmyadmin/dbconfig-install boolean true' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/mysql/admin-pass password $DBROOT_PASSWORD' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | debconf-set-selections\napt-get install -y phpmyadmin libapache2-mod-php7.4\n\n# Configure ufw\nufw_install\nufw allow http\nufw reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"db_user","label":"phpMyAdmin/MySQL Admin User","example":"admin"},{"name":"dbuser_password","label":"phpMyAdmin/MySQL Admin Password"},{"name":"dbroot_password","label":"MySQL root Password"}]},{"id":970522,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pi-hole One-Click","description":"Pi-hole One-Click","ordinal":87,"logo_url":"assets/pihole.svg","images":["linode/ubuntu20.04"],"deployments_total":3928,"deployments_active":263,"is_public":true,"mine":false,"created":"2022-02-07T16:04:53","updated":"2023-12-12T06:45:30","rev_note":"","script":"#!/usr/bin/env bash\n\n## PIHOLE Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nIPV4=$(ip a | awk '/inet / {print $2}'| sed -n '2 p')\nIPV6=$(ip -6 a | grep inet6 | awk '/global/{print $2}' | cut -d/ -f1)\nGENPIHOLEPASSWD=$(echo -n $PIHOLE_PASSWORD | sha256sum | awk '{printf \"%s\",$1 }' | sha256sum)\nPIHOLE_PASSWD=${GENPIHOLEPASSWD:0:-1}\n\nfunction firewall {\n ufw allow 80\n ufw allow 53\n ufw allow 67\n ufw allow 547\n ufw allow 4711\n}\n\nfunction config_pihole {\n mkdir -p /etc/pihole\n cat < /etc/pihole/setupVars.conf\nPIHOLE_INTERFACE=eth0\nIPV4_ADDRESS=$IPV4\nIPV6_ADDRESS=$IPV6\nPIHOLE_DNS_1=8.8.8.8\nPIHOLE_DNS_2=8.8.4.4\nQUERY_LOGGING=true\nINSTALL_WEB_SERVER=true\nINSTALL_WEB_INTERFACE=true\nLIGHTTPD_ENABLED=true\nCACHE_SIZE=10000\nDNS_FQDN_REQUIRED=true\nDNS_BOGUS_PRIV=true\nDNSMASQ_LISTENING=local\nWEBPASSWORD=$PIHOLE_PASSWD\nBLOCKING_ENABLED=true\nEND\n\ncurl -L https://install.pi-hole.net | bash /dev/stdin --unattended\n}\n\nfunction main {\n config_pihole\n firewall\n}\n\n# Execute script\napt_setup_update\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"pihole_password","label":"PIHOLE USER Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"This is the Email address for the SOA record","default":""}]},{"id":662119,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plex One-Click","description":"Plex One-Click","ordinal":88,"logo_url":"assets/plex.svg","images":["linode/debian10"],"deployments_total":2940,"deployments_active":53,"is_public":true,"mine":false,"created":"2020-08-12T15:54:44","updated":"2023-12-11T02:34:49","rev_note":"","script":"#!/bin/bash\n# INPUT VARIABLES:\n# \n# \n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Limited user setup if username is not \"root\"\nif [ \"$USERNAME\" != \"root\" ]; then\n \n# ensure sudo is installed and configure secure user\n apt -y install sudo\n adduser -uid 1000 $USERNAME --disabled-password --gecos \"\"\n echo \"$USERNAME:$PASSWORD\" | chpasswd\n usermod -aG sudo $USERNAME\n \n# Harden SSH Access\n sed -i -e 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config\n \n# set home directory\n HOME=/home/$USERNAME\n \n# configure ssh key for secure user if provided\n if [ \"$SSHKEY\" != \"\" ]; then\n SSHDIR=$HOME/.ssh\n mkdir $SSHDIR && echo \"$SSHKEY\" >> $SSHDIR/authorized_keys\n chmod -R 700 $SSHDIR && chmod 600 $SSHDIR/authorized_keys\n chown -R $USERNAME:$USERNAME $SSHDIR\n fi\n \n# Enable SSH hardening\n systemctl restart sshd\n \n# Create docker group, add limited user, and enable\n groupadd docker\n usermod -aG docker $USERNAME\nfi\n\n# Install and configure UFW for Plex\nufw_install\nufw allow 32400,3005,8324,32469/tcp\nufw allow 1900,32410,32412,32413,32414/udp\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Install plex as limited user\ndocker pull plexinc/pms-docker\ndocker run \\\n -d \\\n --name plex \\\n --restart always \\\n -p 32400:32400/tcp \\\n -p 3005:3005/tcp \\\n -p 8324:8324/tcp \\\n -p 32469:32469/tcp \\\n -p 1900:1900/udp \\\n -p 32410:32410/udp \\\n -p 32412:32412/udp \\\n -p 32413:32413/udp \\\n -p 32414:32414/udp \\\n -e ADVERTISE_IP=\"http://$IP:32400/\" \\\n -h \"Linode Plex Server\" \\\n -v $HOME/plex/config:/config \\\n -v $HOME/plex/media:/media \\\n -v $HOME/plex/transcode:/transcode \\\n plexinc/pms-docker\n\n# Recursively update ownership of Plex directories after delay\nsleep 1\nchown -R $USERNAME:$USERNAME $HOME/plex\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"USERNAME","label":"Limited User Name (not 'root')"},{"name":"PASSWORD","label":"Limited User Password"},{"name":"SSHKEY","label":"Limited User SSH Key","default":"","example":"Usually found in: ./ssh/id_rsa.pub"}]},{"id":611376,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL One-Click","description":"PostgreSQL One-Click","ordinal":89,"logo_url":"assets/postgresql.svg","images":["linode/debian11"],"deployments_total":2864,"deployments_active":219,"is_public":true,"mine":false,"created":"2019-11-13T06:05:28","updated":"2023-12-12T11:40:20","rev_note":"Initial import","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 22\nufw allow 5432\n\n# Install PostgreSQL\napt install -y postgresql postgresql-contrib\nsystemctl enable postgresql\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1068726,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster One-Click","description":"PostgreSQL Cluster","ordinal":90,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":175,"deployments_active":8,"is_public":true,"mine":false,"created":"2022-10-03T20:11:59","updated":"2023-12-12T10:41:11","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n\n# set force apt non-interactive\nexport DEBIAN_FRONTEND=noninteractive\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/postgresql-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/postgresql-cluster\" ]; then\n rm -rf /tmp/postgresql-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[info] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/postgresql-cluster\n cd /tmp/postgresql-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"cluster_name","label":"Domain Name"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"PostgeSQL cluster size","default":"3","oneof":"3"}]},{"id":985364,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus & Grafana One-Click","description":"Prometheus and Grafana","ordinal":91,"logo_url":"assets/prometheusgrafana.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":578,"deployments_active":60,"is_public":true,"mine":false,"created":"2022-03-08T17:03:20","updated":"2023-12-12T11:55:19","rev_note":"","script":"#!/usr/bin/env bash\n## Updated: 01-17-2023\n## Author: n0vabyte, Elvis Segura, esegura@linode.com\n\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\ncreds=\"/root/credentials.txt\"\nprometheus_htpasswd_file=\"/etc/nginx/.prometheus_htpasswd\"\n\nfunction add_firewalls {\n ufw allow http\n ufw allow https\n}\n\nfunction configure_nginx {\n apt-get install nginx apache2-utils -y\n cat << EOF > /etc/nginx/sites-available/$FQDN.conf\nserver {\n listen 80;\n server_name $FQDN;\n location / {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:3000;\n }\n location /prometheus/ {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:9090;\n auth_basic \"Restricted Area\";\n auth_basic_user_file $prometheus_htpasswd_file;\n }\n# allow let's encrypt\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/html/.well-known;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-{available,enabled}/$FQDN.conf\n unlink /etc/nginx/sites-enabled/default\n systemctl reload nginx\n systemctl enable nginx\n}\n\nfunction install_node_exporter {\n groupadd --system prometheus\n useradd -s /sbin/nologin --system -g prometheus prometheus\n curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '\"' -f 4 | wget -qi - \n tar -xvf node_exporter*.tar.gz\n chmod +x node_exporter-*/node_exporter\n chown prometheus:prometheus node_exporter\n mv node_exporter-*/node_exporter /usr/local/bin\n rm -fr node_exporter-*\n cat < /etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start node_exporter\n systemctl enable node_exporter\n}\n\nfunction configure_prometheus {\n latest_version=$(curl -s https://raw.githubusercontent.com/prometheus/prometheus/main/VERSION)\n prom_conf=\"/etc/prometheus/prometheus.yml\"\n file_sd_targets=\"/etc/prometheus/file_sd_targets\"\n prometheus_conf_dir=\"/etc/prometheus\"\n prometheus_data_dir=\"/var/lib/prometheus\"\n mkdir $prometheus_conf_dir $prometheus_conf_dir/file_sd_targets \\\n $prometheus_conf_dir/rules $prometheus_data_dir\n\n wget https://github.com/prometheus/prometheus/releases/download/v$latest_version/prometheus-$latest_version.linux-amd64.tar.gz\n tar xvf prometheus-$latest_version.linux-amd64.tar.gz\n mv prometheus-$latest_version.linux-amd64/* $prometheus_conf_dir\n chown -R prometheus:prometheus $prometheus_conf_dir $prometheus_data_dir\n mv $prometheus_conf_dir/{prometheus,promtool} /usr/local/bin\n ## cleanup\n rm prometheus-$latest_version.linux-amd64.tar.gz\n rmdir prometheus-$latest_version.linux-amd64\n\n ## backup config before updating\n cp $prom_conf{,.bak}\n sed -i -e '/- job_name: \"prometheus\"/ s/^/#/' $prom_conf\n sed -i -e '/- targets:/ s/^/#/' $prom_conf\n sed -i -e '/static_configs/ s/^/#/g' $prom_conf\n ## add our config\n cat << EOF >> $prom_conf\n#########################################\n## Local Prometheus Instance - This Box #\n#########################################\n - job_name: local_prometheus\n scrape_interval: 3s\n file_sd_configs:\n - files:\n - file_sd_targets/local_prometheus.yml\n honor_labels: true\n relabel_configs:\n - regex: (.*)\n replacement: \\${1}:9100\n source_labels:\n - __address__\n target_label: __address__\n - regex: (.+)\n replacement: \\${1}\n source_labels:\n - __instance\n target_label: instance\nEOF\n ## add to file_sd_targets\n cat << EOF >> $file_sd_targets/local_prometheus.yml\n- labels:\n __instance: prometheus\n cluster: local\n targets:\n - 127.0.0.1\nEOF\n cat << EOF > /etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nGroup=prometheus\nType=simple\nExecStart=/usr/local/bin/prometheus \\\n--config.file /etc/prometheus/prometheus.yml \\\n--storage.tsdb.path $prometheus_data_dir/ \\\n--web.console.templates=$prometheus_conf_dir/consoles \\\n--web.console.libraries=$prometheus_conf_dir/console_libraries \\\n--web.listen-address=127.0.0.1:9090 \\\n--web.external-url=https://$FQDN/prometheus \\\n--storage.tsdb.retention=60d\nRestart=always\nExecReload=/usr/bin/kill -HUP \\$MAINPID\nTimeoutStopSec=20s\nOOMScoreAdjust=-900\nSendSIGKILL=no\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start prometheus\n systemctl enable prometheus\n\n ## protect with htpasswd\n prometheus_htpasswd=$(openssl rand -base64 32)\n htpasswd -cb $prometheus_htpasswd_file prometheus $prometheus_htpasswd\n ## log credentials locally\n cat << EOF >> $creds\n#################\n# Prometheus #\n#################\nLocation: https://$FQDN/prometheus\nUsername: prometheus\nPassword: $prometheus_htpasswd\nEOF\n ## sanity check\n function fallback {\n echo \"[FATAL] Creating custom configuration failed. Restoring old configuration\"\n cp $prom_conf{.bak,}\n systemctl restart prometheus\n sleep 2\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[CRITICAL] Encoutered unexpected error while configuring Prometheus. Please reach out to Support.\"\n exit 2\n fi\n }\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[ERROR] Prometheus is not running. Falling back to default config..\"\n fallback\n fi\n\n}\n\nfunction configure_grafana {\n echo \"[info] configuring Grafana - Installing Packages\"\n apt-get install -y apt-transport-https \\\n software-properties-common \\\n wget \\\n gnupg2 \\\n sqlite3\n\n wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\n echo \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\n apt-get -y update\n apt-get -y install grafana\n\n ## reset Grafana admin password\n grafana_password=$(openssl rand -base64 32)\n\n echo \"[info] updating grafana config\"\n sed -i -e 's/;admin_user = admin/admin_user = admin/g' /etc/grafana/grafana.ini\n sed -i \"s|;admin_password = admin|admin_password = $grafana_password|g\" /etc/grafana/grafana.ini\n\n echo \"[info] starting grafana-server\"\n systemctl start grafana-server\n systemctl enable grafana-server\n\n ## log credentials locally\n cat << EOF >> $creds\n##############\n# Grafana #\n##############\nLocation: https://$FQDN/\nUsername: admin\nPassword: $grafana_password\nEOF\n}\n\nfunction ssl_grafana {\n apt install -y certbot python3-certbot-nginx\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n add_firewalls\n configure_nginx\n install_node_exporter\n configure_prometheus\n configure_grafana\n ssl_grafana\n}\n\n## execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This email is for the LetsEncrypt SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":607034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus One-Click","description":"Prometheus One Click App","ordinal":92,"logo_url":"assets/prometheus.svg","images":["linode/debian10"],"deployments_total":356,"deployments_active":12,"is_public":true,"mine":false,"created":"2019-10-29T20:59:30","updated":"2023-12-10T13:40:45","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prometheus\ngroupadd --system prometheus\nuseradd -s /sbin/nologin --system -g prometheus prometheus\nmkdir /var/lib/prometheus\nfor i in rules rules.d files_sd; do mkdir -p /etc/prometheus/${i}; done\napt-get -y install wget\nmkdir -p /tmp/prometheus && cd /tmp/prometheus\ncurl -s https://api.github.com/repos/prometheus/prometheus/releases/latest \\\n | grep browser_download_url \\\n | grep linux-amd64 \\\n | cut -d '\"' -f 4 \\\n | wget -qi -\ntar xvf prometheus*.tar.gz\ncd prometheus*/\nmv prometheus promtool /usr/local/bin/\nmv prometheus.yml /etc/prometheus/prometheus.yml\nmv consoles/ console_libraries/ /etc/prometheus/\ncd ~/\nrm -rf /tmp/prometheus\n\n# Edit Prometheus config\nsudo tee /etc/prometheus/prometheus.yml</etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nType=simple\nUser=prometheus\nGroup=prometheus\nExecReload=/bin/kill -HUP $MAINPID\nExecStart=/usr/local/bin/prometheus \\\n --config.file=/etc/prometheus/prometheus.yml \\\n --storage.tsdb.path=/var/lib/prometheus \\\n --web.console.templates=/etc/prometheus/consoles \\\n --web.console.libraries=/etc/prometheus/console_libraries \\\n --web.listen-address=0.0.0.0:9090 \\\n --web.external-url=\n\nSyslogIdentifier=prometheus\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nfor i in rules rules.d files_sd; do chown -R prometheus:prometheus /etc/prometheus/${i}; done\nfor i in rules rules.d files_sd; do chmod -R 775 /etc/prometheus/${i}; done\nchown -R prometheus:prometheus /var/lib/prometheus/\n\n# Add node_exporter & Enable services\ncurl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest \\\n| grep browser_download_url \\\n| grep linux-amd64 \\\n| cut -d '\"' -f 4 \\\n| wget -qi -\n\ntar -xvf node_exporter*.tar.gz\ncd node_exporter*/\ncp node_exporter /usr/local/bin\nnode_exporter --version\n\ncat </etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n\n[Install]\nWantedBy=default.target\nEND\n\nsystemctl daemon-reload\nsystemctl start prometheus\nsystemctl enable prometheus\nsystemctl start node_exporter\nsystemctl enable node_exporter\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":688890,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"RabbitMQ One-Click","description":"RabbitMQ One-Click","ordinal":93,"logo_url":"assets/rabbitmq.svg","images":["linode/debian10"],"deployments_total":393,"deployments_active":48,"is_public":true,"mine":false,"created":"2020-11-17T20:53:00","updated":"2023-12-08T15:47:55","rev_note":"","script":"#!/bin/bash\n#\n#\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n## Install prerequisites\napt-get install curl gnupg -y\n\n## Get RabbitMQ \n$ curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -\nsudo apt-key adv --keyserver \"hkps://keys.openpgp.org\" --recv-keys \"0x0A9AF2115F4687BD29803A206B73A36E6026DFCA\"\n## Install apt HTTPS transport\napt-get install apt-transport-https\n\n## Add Bintray repositories that provision latest RabbitMQ and Erlang 23.x releases\ntee /etc/apt/sources.list.d/bintray.rabbitmq.list <\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# System Update\nset_hostname\napt_setup_update\n\nfunction install_redis {\n apt install -y redis-server\n systemctl enable redis-server\n}\n\nfunction redis_config {\n sed -ie \"s/supervised no/supervised systemd/g\" /etc/redis/redis.conf\n sed -ie \"s/appendonly no/appendonly yes/g\" /etc/redis/redis.conf\n systemctl restart redis-server\n}\n\nfunction main {\n install_redis\n redis_config\n}\nmain\n\n# cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1132204,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Marketplace App for Redis® Sentinel Cluster One-Click","description":"Redis Sentinel One-Click Cluster","ordinal":95,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":136,"deployments_active":7,"is_public":true,"mine":false,"created":"2023-02-27T20:05:44","updated":"2023-12-06T05:47:35","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/redis-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\n\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\n\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\n\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\n\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Redis CA"},{"name":"common_name","label":"Common Name","default":"Redis Server"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Redis cluster size","default":"3","oneof":"3,5"}]},{"id":923036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Restyaboard One-Click","description":"Restyaboard One-Click","ordinal":96,"logo_url":"assets/restyaboard.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04"],"deployments_total":209,"deployments_active":2,"is_public":true,"mine":false,"created":"2021-10-18T01:07:09","updated":"2023-12-03T04:43:28","rev_note":"","script":"#!/bin/bash\n#\n# Install script for Restyaboard\n#\n# Usage: ./restyaboard.sh\n#\n# Copyright (c) 2014-2021 Restya.\n# Dual License (OSL 3.0 & Commercial License)\n{\n\tmain() {\n\t\tif [[ $EUID -ne 0 ]];\n\t\tthen\n\t\t\techo \"This script must be run as root\"\n\t\t\texit 1\n\t\tfi\n\t\tset -x\n\t\twhoami\n\t\t#\n\t\t# Checking the OS name and OS version\n\t\t#\n\t\tfind_release ()\n\t\t{\n\t\t\t# Checking the Ubuntu OS\n\t\t\tif [ -f /etc/lsb-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`grep DISTRIB_ID /etc/lsb-release`\"\n\t\t\t\tDISTRIB_ID='DISTRIB_ID='\n\t\t\t\tOS_NAME=$OS_REQUIREMENT$DISTRIB_ID\n\t\t\t\tarray=();\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" != \"$DISTRIB_ID\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_NAME ]]; do\n\t\t\t\t\tarray+=( \"${OS_NAME%%\"$DISTRIB_ID\"*}\" );\n\t\t\t\t\tOS_NAME=${OS_NAME#*\"$DISTRIB_ID\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_REQUIREMENT=${array[1]}\n\t\t\t\tfi\n\t\t\t\tOS_VERSION=\"`grep DISTRIB_RELEASE /etc/lsb-release`\"\n\t\t\t\tDISTRIB_RELEASE='DISTRIB_RELEASE='\n\t\t\t\tOS_Ver=$OS_VERSION$DISTRIB_RELEASE\n\t\t\t\tversion=();\n\t\t\t\tif ([ \"$OS_VERSION\" != \"$DISTRIB_RELEASE\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_Ver ]]; do\n\t\t\t\t\tversion+=( \"${OS_Ver%%\"$DISTRIB_RELEASE\"*}\" );\n\t\t\t\t\tOS_Ver=${OS_Ver#*\"$DISTRIB_RELEASE\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_VERSION=${version[1]}\n\t\t\t\tfi\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Redhat, Fedora, and Centos\n\t\t\tif [ -f /etc/redhat-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/redhat-release | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/redhat-release | cut -d ' ' -f 4 | cut -d '.' -f 1`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Debian OS\n\t\t\tif [ -f /etc/issue ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/issue | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/issue | cut -d ' ' -f 3`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the OpenBSD \n\t\t\tif [ -f /etc/motd ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/motd | head -1 | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/motd | head -1 | cut -d ' ' -f 2`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t}\n\t\tfindbin ()\n {\n ret=0\n newpath=`echo $PATH | tr : ' '`\n for i in ${newpath}; do\n\t\t\t\tif [ -x $i/$1 ]; then\n\t\t\t\t\tret=1\n\t\t\t\t\tbreak\n\t\t\t\tfi\n done\n echo $ret\n return \n }\n checkdeps()\n {\n pkginfo=\"dpkg rpm ipkg pkg_info\"\n for i in $pkginfo; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n\t\t\t\t\tpkginfo=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that for listing packages\"\n\t\t\t\t\tbreak\n fi\n done\n\n if [ ${pkginfo} = \"pkg_info\" ]; then\n # BSD needs PKG_PATH set to load anything over the net.\n if [ x${PKG_PATH} = x ]; then\n\t\t\t\t\techo \"Please set the environment variable PKG_PATH and try again.\"\n\t\t\t\t\texit 1\n fi\n fi\n \n \n pkg_name=\"yum apt-get ipkg pkg_add\"\n for i in ${pkg_name}; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n pkg_name=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that to install packages\"\n\t\t\t\t\tbreak\n fi\n done\n \n\n for i in ${genericdeps} ${gtkdeps} ${kdedeps}; do\n case $pkginfo in\n dpkg)\n deps=\"`dpkg -l \"*$i*\" | grep -- \"^ii\" | cut -d ' ' -f 3`\"\n ;;\n rpm)\n deps=\"`rpm -q $i`\"\n ;;\n pkg_info)\n deps=\"`pkg_info | grep \"$i\" | sed -e 's: .*$::'`\"\n ;;\n ipkg)\n deps=\"todo\"\n ;;\n *)\n echo \"ERROR: No package manager found!\"\n exit 1\n ;;\n esac\n found=`echo ${deps} | grep -v 'not installed' | grep -c \"${i}\" 2>&1`\n if [ $found -gt 0 ]; then\n \techo \"Yes, found $i\"\n else\n\t\t\t\t\techo \"Nope, $i appears to not be installed\"\n\t\t\t\t\tmissing=\"${missing} $i\"\n fi\n done\n\n if [ -n \"${missing}\" ]; then\n echo \"package(s)\\\"${missing}\\\" are missing!\"\n echo \"You will need sudo priviledges to install the packages\"\n if [ x$yes = xno ]; then\n \t$debug sudo ${pkgnet} install ${missing}\n else\n \t$debug sudo ${pkgnet} -y install ${missing}\n fi\n fi\n }\n\t\tinstall_nginx() \n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n apt install -y cron nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"nginx installation failed with error code ${error_code} (nginx installation failed with error code 2)\"\n return 2\n fi\n if [ -f \"/etc/nginx/conf.d/default\" ]; then\n rm -rf /etc/nginx/conf.d/default\n fi\n if [ -f \"/etc/nginx/sites-enabled/default\" ]; then\n rm -rf /etc/nginx/sites-enabled/default\n fi\n if [ -f \"/etc/nginx/sites-available/default\" ]; then\n rm -rf /etc/nginx/sites-available/default\n fi\n service nginx start\n fi\n\t\t\telse\t\t\t\t\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n rpm -Uvh \"http://nginx.org/packages/centos/${OS_VERSION}/noarch/RPMS/nginx-release-centos-${OS_VERSION}-0.el${OS_VERSION}.ngx.noarch.rpm\"\n yum install -y zip cronie nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"cron nginx installation failed with error code ${error_code} cron nginx installation failed with error code 18\"\n return 18\n fi\n if [ -f \"/etc/nginx/conf.d/default.conf\" ]; then\n rm -rf /etc/nginx/conf.d/default.conf\n fi\n if [ -f \"/etc/nginx/sites-enabled/default.conf\" ]; then\n rm -rf /etc/nginx/sites-enabled/default.conf\n fi\n if [ -f \"/etc/nginx/sites-available/default.conf\" ]; then\n rm -rf /etc/nginx/sites-available/default.conf\n fi\n service nginx start\n chkconfig --levels 35 nginx on\n fi\n\t\t\tfi\n\t\t}\n\t\tinstall_php()\n\t\t{\n\t\t\tif ! hash php 2>&-; then\n\t\t\t\techo \"PHP is not installed!\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\t\t\t\t\t\t\t\n echo \"Installing PHP...\"\n apt install -y php7.4 php7.4-common --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"PHP installation failed with error code ${error_code} (PHP installation failed with error code 3)\"\n return 3\n fi\n else \n if ([ \"$pkg_name\" = \"yum\" ])\n then\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n echo \"Note: For the latest version of PHP, we're going to download https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm and https://rpms.remirepo.net/enterprise/remi-release-8.rpm.\"\n echo \"Installing PHP...\"\n dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm\n dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\n dnf module enable php:remi-7.4\n dnf -y install php php-cli php-common\n else\n yum install -y epel-release\n echo \"Note: For the latest version of PHP, we're going to download http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm.\"\n echo \"Installing PHP...\"\n rpm -Uvh \"http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm\"\n yum --enablerepo=remi-php74 install -y php\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"php installation failed with error code ${error_code} (php installation failed with error code 20)\"\n return 20\n fi\n fi\n fi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Installing PHP fpm and cli extension...\"\n\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\tthen\n\t\t\t\tapt install -y php7.4-fpm php7.4-cli --allow-unauthenticated\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"php7.4-cli installation failed with error code ${error_code} (php7.4-cli installation failed with error code 4)\"\n\t\t\t\tfi\n\t\t\t\tservice php7.4-fpm start\n\t\t\telse \n\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\tthen\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n \t\t\tthen\n\t\t\t\t\t\tdnf -y install php-fpm php-devel php-opcache\n\t\t\t\t\t\tdnf -y install php-json\n\t\t\t\t\telse\n\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-fpm php-devel php-cli php-opcache\n\t\t\t\t\tfi\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php-devel installation failed with error code ${error_code} (php-devel installation failed with error code 21)\"\n\t\t\t\t\t\treturn 21\n\t\t\t\t\tfi\t\t\t\t\t\n\t\t\t\t\tservice php-fpm start\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"....\"\n\t\t\telse\n\t\t\t\tchkconfig --levels 35 php-fpm on\t\t\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP curl extension...\"\n\t\t\tphp -m | grep curl\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-curl...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-curl --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-curl installation failed with error code ${error_code} (php7.4-curl installation failed with error code 5)\"\n\t\t\t\t\t\treturn 5\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-curl\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-curl\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-curl installation failed with error code ${error_code} (php-curl installation failed with error code 22)\"\n\t\t\t\t\t\t\treturn 22\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP pgsql extension...\"\n\t\t\tphp -m | grep pgsql\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-pgsql...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install libpq5\n\t\t\t\t\tapt install -y php7.4-pgsql --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-pgsql installation failed with error code ${error_code} (php7.4-pgsql installation failed with error code 6)\"\n\t\t\t\t\t\treturn 6\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pgsql\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pgsql\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-pgsql installation failed with error code ${error_code} (php-pgsql installation failed with error code 23)\"\n\t\t\t\t\t\t\treturn 23\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP mbstring extension...\"\n\t\t\tphp -m | grep mbstring\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-mbstring...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-mbstring --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-mbstring installation failed with error code ${error_code} (php7.4-mbstring installation failed with error code 7)\"\n\t\t\t\t\t\treturn 7\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-mbstring\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-mbstring\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-mbstring installation failed with error code ${error_code} (php-mbstring installation failed with error code 24)\"\n\t\t\t\t\t\t\treturn 24\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP ldap extension...\"\n\t\t\tphp -m | grep ldap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-ldap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-ldap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-ldap installation failed with error code ${error_code} (php7.4-ldap installation failed with error code 8)\"\n\t\t\t\t\t\treturn 8\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-ldap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-ldap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-ldap installation failed with error code ${error_code} (php-ldap installation failed with error code 25)\"\n\t\t\t\t\t\t\treturn 25\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imagick extension...\"\n\t\t\tphp -m | grep imagick\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-imagick...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y gcc\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"gcc installation failed with error code ${error_code} (gcc installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y imagemagick\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"imagemagick installation failed with error code ${error_code} (imagemagick installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y php7.4-imagick --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imagick installation failed with error code ${error_code} (php7.4-imagick installation failed with error code 10)\"\n\t\t\t\t\t\treturn 10\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tyum install -y ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pear\n\t\t\t\t\t\t\tdnf -y install php-gd\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pear\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-gd\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"Installing php-imagick failed with error code ${error_code} (Installing php-imagick failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\n\t\t\t\t\t\tcd /usr/local/src\n\t\t\t\t\t\twget http://pecl.php.net/get/imagick-2.2.2.tgz\n\t\t\t\t\t\ttar zxvf ./imagick-2.2.2.tgz\n\t\t\t\t\t\tcd imagick-2.2.2\n\t\t\t\t\t\tphpize\n\t\t\t\t\t\t./configure\n\t\t\t\t\t\tmake\n\t\t\t\t\t\tmake test\n\t\t\t\t\t\tmake install\n\t\t\t\t\t\techo \"extension=imagick.so\" >> /etc/php.ini\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imap extension...\"\n\t\t\tphp -m | grep imap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php7.4-imap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-imap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imap installation failed with error code ${error_code} (php7.4-imap installation failed with error code 11)\"\n\t\t\t\t\t\treturn 11\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-imap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-imap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-imap installation failed with error code ${error_code} (php-imap installation failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking xml...\"\n\t\t\tphp -m | grep xml\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing xml...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install php7.4-xml --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 56)\"\n\t\t\t\t\t\treturn 56\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-xml\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-xml\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 57)\"\n\t\t\t\t\t\t\treturn 57\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_timezone()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\ttimezone=$(cat /etc/timezone)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php/7.4/fpm/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php/7.4/fpm/php.ini\n\t\t\telse \n\t\t\t\tPHP_VERSION=$(php -v | grep \"PHP 5\" | sed 's/.*PHP \\([^-]*\\).*/\\1/' | cut -c 1-3)\n\t\t\t\techo \"Installed PHP version: '$PHP_VERSION'\"\n\t\t\t\ttimezone=$(cat /etc/sysconfig/clock | grep ZONE | cut -d\"\\\"\" -f2)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php.ini\n\t\t\tfi\n\t\t}\n\t\tinstall_postgresql()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tid -a postgres\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]; then\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n sh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n apt install wget ca-certificates\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n fi\n wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n apt-key add ACCC4CF8.asc\n apt update\n apt install -y postgresql --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n return 13\n fi\n\t\t\t\telse\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ 1 -eq \"$(echo \"${PSQL_VERSION} < 9.3\" | bc)\" ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tsh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n\t\t\t\t\t\tapt install wget ca-certificates\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n\t\t\t\t\t\tfi\n\t\t\t\t\t\twget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n\t\t\t\t\t\tapt-key add ACCC4CF8.asc\n\t\t\t\t\t\tapt update\n\t\t\t\t\t\tapt upgrade\n\t\t\t\t\t\tapt install -y postgresql --allow-unauthenticated\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n\t\t\t\t\t\t\treturn 13\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\tfi\n\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf > /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf.1\n\t\t\t\tcd /etc/postgresql/${PSQL_VERSION}/main || exit\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tservice postgresql restart\n\t\t\telse\n\t\t\t\tif ! which psql > /dev/null 2>&1;\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n if [ $(getconf LONG_BIT) = \"64\" ]; then\n if [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n dnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n else\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n then\n yum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n fi\n fi\n fi\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n dnf module enable postgresql:13\n dnf -y install postgresql-server postgresql-contrib postgresql-libs\n else\n yum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\t\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql13 installation failed with error code ${error_code} (postgresql13 installation failed with error code 29)\"\n return 29\n fi\n\t\t\t\telse \n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tif [[ $PSQL_VERSION < 9.3 ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tif [ $(getconf LONG_BIT) = \"64\" ]; then\n\t\t\t\t\t\t\tif [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n\t\t\t\t\t\t\t\tdnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n\t\t\t\t\t\t\t\tthen\n\t\t\t\t\t\t\t\t\tyum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf module enable postgresql:13\n\t\t\t\t\t\t\tdnf -y install postgresql-server postgresql-contrib postgresql-libs\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 29)\"\n\t\t\t\t\t\t\treturn 29\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^13\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=13\n\t\t\t\tfi\n\t\t\t\tPSQL_FOLDER=$(echo ${PSQL_VERSION} | sed 's/\\.//')\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tpostgresql-setup --initdb\n\t\t\t\telse\n\t\t\t\t\t\"/usr/pgsql-${PSQL_VERSION}/bin/postgresql-${PSQL_VERSION}-setup\" initdb\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl enable postgresql\n\t\t\t\t\tsystemctl start postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl start \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\t\tsystemctl enable \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" start\n\t\t\t\t\t\tchkconfig --levels 35 \"postgresql-${PSQL_VERSION}\" on\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/data/pg_hba.conf\" > \"/var/lib/pgsql/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/data\" || exit\n\t\t\t\telse\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf\" > \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/${PSQL_VERSION}/data\" || exit\n\t\t\t\tfi\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl restart postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl restart \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_geoip()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tif ! hash GeoIP-devel 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-geoip php7.4-dev libgeoip-dev\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code ${error_code} (php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code 50)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\techo \"extension=geoip.so\" >> /etc/php.ini\n\n\t\t\t\tmkdir -v /usr/share/GeoIP\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"GeoIP folder creation failed with error code ${error_code} (GeoIP folder creation failed with error code 52)\"\n\t\t\t\tfi\n\t\t\t\tget_geoip_data\n\t\t\telse\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\t\treturn 47\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tconfigure_restyaboard()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n echo \"Changing server_name in nginx configuration...\"\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\telse\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\tfi\n\t\t}\n\t\tinstall_postfix()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Installing postfix...\"\n\t\t\t\techo \"postfix postfix/mailname string $IPADDR\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\techo \"postfix postfix/main_mailer_type string 'Internet Site'\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\tapt install -y postfix\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"postfix installation failed with error code ${error_code} (postfix installation failed with error code 16)\"\n\t\t\t\tfi\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/fpm/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/fpm/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/cli/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/cli/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php.ini\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tchange_permission()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/media/ $RESTYABOARD_DIR/tmp/cache/ $RESTYABOARD_DIR/client/img/\n\t\t\t\tchcon -Rv --type=httpd_t $RESTYABOARD_DIR/\n\t\t\tfi\n\t\t}\n\t\tpsql_connect()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 34)\"\n\t\t\t\t\treturn 34\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 35)\"\n\t\t\t\t\treturn 35\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 36)\"\n\t\t\t\t\treturn 36\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 37)\"\n\t\t\t\t\treturn 37\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 39)\"\n\t\t\t\t\t\treturn 39\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 40)\"\n\t\t\t\t\treturn 40\n\t\t\t\tfi\t\t\t\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 41)\"\n\t\t\t\t\treturn 41\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 42)\"\n\t\t\t\t\treturn 42\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 43)\"\n\t\t\t\t\treturn 43\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\tif [ \"$?\" = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 45)\"\n\t\t\t\t\t\treturn 45\n\t\t\t\t\tfi\t\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P allow_postfix_local_write_mail_spool 1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tphp_fpm_reset()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \".........\"\n\t\t\telse\n\t\t\t\techo \"Reset php-fpm (use unix socket mode)...\"\n\t\t\t\tif [ -f \"/run/php/php7.4-fpm.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php\\/php7.4-fpm.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\telif [ -f \"/run/php-fpm/www.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php-fpm\\/www.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/unix:\\/run\\/php-fpm\\/www.sock/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\telse\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/127.0.0.1:9000/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_jq()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tapt install -y jq\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 53)\"\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tyum install -y jq\n\t\t\t\terror_code\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 49)\"\n\t\t\t\t\treturn 49\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_db_connection()\n\t\t{\t\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Starting services...\"\n\t\t\t\tservice cron restart\n\t\t\t\tservice php7.4-fpm restart\n\t\t\t\tservice nginx restart\n\t\t\t\tservice postfix restart\n\t\t\t\tapt install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\telse\n\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\telse\n\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\tfi\n\t\t\t\tyum install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P httpd_can_network_connect_db=1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tssl_connectivity()\n\t\t{\n\t\t\tif [[ $IPADDR =~ ^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$ ]]; then\n\t\t\t\techo \"SSL connectivity cannot be set for IP address\"\n\t\t\telse\n\t\t\t\tset +x\n\t\t\t\techo \"Do you want to set up SSL connectivity for your domain and your domain should be publicly accessible Restyaboard instance and your domain should be mappped to this Restyaboard Server, Note: If you're trying to set SSL for Non-publicly accessible instance, then your Restyaboard will not work (y/n)?\"\n\t\t\t\tread -r answer\n\t\t\t\tset -x\n\t\t\t\tcase \"${answer}\" in\n\t\t\t\t\t[Yy])\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tapt install certbot python3-certbot-nginx -y\n\t\t\t\t\t\tservice nginx restart\n\t\t\t\t\t\tservice php7.4-fpm restart\n\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\telse\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install epel-release\n\t\t\t\t\t\t\tdnf -y install certbot python3-certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y epel-release\n\t\t\t\t\t\t\tyum install certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"SSL installation failed with error code ${error_code} (php installation failed with error code 20)\"\n\t\t\t\t\t\t\treturn 20\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tesac\n\t\t\tfi\n\t\t}\n\t\tfind_release\n\t\tcheckdeps\n\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n then\n\t\t\tapt update\n apt install -y net-tools\n\t\t\tapt install -y curl unzip\n\t\telse\n\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n \tthen\n yum install -y net-tools\n\t\t\t\tyum install -y curl unzip\n\t\t\tfi\n\t\tfi\n IFCONFIG_PATH=$(which ifconfig)\n IPADDR=$(${IFCONFIG_PATH} eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n\t\tRESTYABOARD_VERSION=$(curl --silent https://api.github.com/repos/RestyaPlatform/board/releases | grep tag_name -m 1 | awk '{print $2}' | sed -e 's/[^v0-9.]//g')\n\t\tPOSTGRES_DBHOST=localhost\n\t\tPOSTGRES_DBNAME=restyaboard\n\t\tPOSTGRES_DBUSER=restya\n\t\tPOSTGRES_DBPASS=hjVl2!rGd\n\t\tPOSTGRES_DBPORT=5432\n\t\tDOWNLOAD_DIR=/opt/restyaboard\n RESTYABOARD_DIR=/usr/share/nginx/html/restyaboard\n\t\t\n\t\tget_geoip_data () \n\t\t{\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIP.dat.gz\n\t\t\tgunzip GeoIP.dat.gz\n\t\t\tmv GeoIP.dat /usr/share/GeoIP/GeoIP.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz\n\t\t\tgunzip GeoIPv6.dat.gz\n\t\t\tmv GeoIPv6.dat /usr/share/GeoIP/GeoIPv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.xz\n\t\t\tunxz GeoLiteCity.dat.xz\n\t\t\tmv GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCityv6.dat.gz\n\t\t\tgunzip GeoLiteCityv6.dat.gz\n\t\t\tmv GeoLiteCityv6.dat /usr/share/GeoIP/GeoLiteCityv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNum.dat.gz\n\t\t\tgunzip GeoIPASNum.dat.gz\n\t\t\tmv GeoIPASNum.dat /usr/share/GeoIP/GeoIPASNum.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNumv6.dat.gz\n\t\t\tgunzip GeoIPASNumv6.dat.gz\n\t\t\tmv GeoIPASNumv6.dat /usr/share/GeoIP/GeoIPASNumv6.dat\n\t\t}\n\n\t\tupgrade-0.3-0.4()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.4-0.4.1()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.5.2-0.6()\n\t\t{\n\t\t\tsed -i \"s/rewrite ^\\/ical\\/.*/rewrite ^\\/ical\\/([0-9]*)\\/([0-9]*)\\/([a-z0-9]*).ics\\$ \\/server\\/php\\/ical.php?board_id=\\$1\\&user_id=\\$2\\&hash=\\$3 last;/\" /etc/nginx/conf.d/restyaboard.conf\n\t\t}\n\n\t\tupgrade-0.6.3-0.6.4()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_created_date\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_created_date/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.4-0.6.5()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_id\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_id/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.2.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.5-0.6.6()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\t\t\n\t\tupgrade-0.6.6-0.6.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_card_counter-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_card_counter-v0.1.1.zip\n\t\t\tunzip /tmp/r_card_counter-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.2.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_eu_gdpr-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_eu_gdpr-v0.1.2.zip\n\t\t\tunzip /tmp/r_eu_gdpr-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.1.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\t\t\t\n\t\t\t\n\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.3.zip\n\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\t: > /var/spool/cron/crontabs/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n\t\t\telse\n\t\t\t\t: > /var/spool/cron/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.7-0.6.8(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.3.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\n\t\tupgrade-0.6.8-0.6.9(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.4.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.4.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.4.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\t\tupgrade-0.6.9-1.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_togetherjs\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_togetherjs/\n\t\t\tfi\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.5.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.5.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.5.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.2.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\n\t\t\techo \"Applying permission...\"\n\t\t\tuseradd restyaboard\n\t\t\tusermod --password 'hjVl2!rGd' restyaboard\n\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tuser www-data;\n\t\t\t\tusermod -a -G restyaboard www-data\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\telse\n\t\t\t\tuser nginx;\n\t\t\t\tusermod -a -G restyaboard nginx\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\tfi\n\t\t\tchown -R restyaboard:restyaboard $RESTYABOARD_DIR\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n\t\t\tchmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tfi\n\t\t}\n\n\t\tupdate_version()\n\t\t{\n\t\t\tset +x\n\t\t\techo -e \"A newer version ${RESTYABOARD_VERSION} of Restyaboard is available.\\n\\nImportant: Please note that upgrading will remove any commercial apps that were free in previous version.\\nFor more details about commercial apps, please visit https://restya.com/board/pricing\\n\\nDo you want to get it now y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tset +x\n\t\t\t\tset -x\n\t\t\t\t\n\t\t\t\techo \"Downloading files...\"\n\t\t\t\tcurl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n\t\t\t\tunzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n\t\t\t\t\n\t\t\t\techo \"Updating files...\"\n\t\t\t\tcp -r ${DOWNLOAD_DIR}/. \"$RESTYABOARD_DIR\"\n\t\t\t\t\n\t\t\t\techo \"Connecting database to run SQL changes...\"\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$? \n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database connection failed with error code ${error_code} (PostgreSQL database connection failed with error code 32)\"\n\t\t\t\t\treturn 32\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\t\n\t\t\t\techo \"Changing PostgreSQL database name, user and password...\"\n\t\t\t\tsed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\t\tdeclare -a upgrade;\n\t\t\t\tif [[ $version < \"v0.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.3-0.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.4.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4-0.4.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4.2-0.5\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.1-0.5.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.2-0.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6-0.6.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.1-0.6.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.3\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.2-0.6.3\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.3-0.6.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.4-0.6.5\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v0.6.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.5-0.6.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tset +x\n\t\t\t\t\techo \"Before updating make sure to remove duplicate username's and emails used by more than one user, otherwise unique indexing for users will be thrown an error But all other queries will be executed without any issue.\"\n\t\t\t\t\tread -r -s -p $'Press [Enter] key to continue...'\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.6-0.6.7\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.8\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.7-0.6.8\")\n\t\t\t\tfi\t\t \n\t\t\t\tif [[ $version < \"v0.6.9\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.8-0.6.9\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v1.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.9-1.7\")\n\t\t\t\tfi\n\t\t\t\t# use for loop to read all values and indexes\n\t\t\t\tfor i in \"${upgrade[@]}\"\n\t\t\t\tdo\n\t\t\t\t\tif [ \"$(type -t ${i})\" = function ];\n\t\t\t\t\tthen\n\t\t\t\t\t\teval ${i}\n\t\t\t\t\tfi\n\t\t\t\t\tif [ -f \"$RESTYABOARD_DIR/sql/${i}.sql\" ];\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"Updating SQL...\"\n\t\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/${i}.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"PostgreSQL updation of SQL failed with error code ${error_code} (PostgreSQL updation of SQL failed with error code 33)\"\n\t\t\t\t\t\t\treturn 33\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tdone\n\t\t\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\tthen\t\t\t\t \n service nginx restart\n\t\t\t\t\tservice php${PHP_VERSION}-fpm restart\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\telse\n\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\tesac\n\t\t}\n\n\t\tif [ -f \"$DOWNLOAD_DIR/release\" ];\n\t\tthen\n\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\tif [[ $version < $RESTYABOARD_VERSION ]];\n\t\t\tthen\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\telse\n\t\t\t\techo \"No new version available\"\n\t\t\t\texit;\n\t\t\tfi\n\t\telse\n\t\t\tset +x\n\t\t\techo \"Is Restyaboard already installed and configured/working y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\tesac\n\t\tfi\n\n if ([ \"$OS_REQUIREMENT\" = \"Debian\" ])\n then\n sed -i -e 's/deb cdrom/#deb cdrom/g' /etc/apt/sources.list\n sh -c 'echo \"deb http://ftp.de.debian.org/debian jessie main\" > /etc/apt/sources.list.d/debjessie.list'\n apt install apt-transport-https lsb-release ca-certificates -y\n wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg\n echo \"deb https://packages.sury.org/php/ $(lsb_release -sc) main\" | tee /etc/apt/sources.list.d/php.list\n fi\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n apt install debian-keyring debian-archive-keyring -y\n apt update -y\n apt upgrade -y\n apt install python-software-properties -y\n apt install software-properties-common -y\n if ! hash php 2>&-; then\n add-apt-repository -y ppa:ondrej/php\n apt update -y\n apt install libjpeg8 -y --allow-unauthenticated\n fi\n fi\n install_nginx\n \n echo \"Checking PHP...\"\n install_php\n\n echo \"Setting up timezone...\"\n set_timezone\n \n echo \"Checking PostgreSQL...\"\n install_postgresql\n\n install_geoip\n \n echo \"Downloading Restyaboard script...\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\n apt install -y curl\n fi\n mkdir ${DOWNLOAD_DIR}\n curl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n unzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n rm /tmp/restyaboard.zip\n\n configure_restyaboard\n \n \n echo \"Copying Restyaboard script to root directory...\"\n cp -r ${DOWNLOAD_DIR}/* \"$RESTYABOARD_DIR\"\n \n install_postfix\n \n echo \"Changing permission...\"\n useradd restyaboard\n usermod --password 'hjVl2!rGd' restyaboard\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n user www-data;\n usermod -a -G restyaboard www-data\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n else\n user nginx;\n usermod -a -G restyaboard nginx\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n fi\n chown -R restyaboard:restyaboard $RESTYABOARD_DIR\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n chmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n change_permission\n\n psql_connect\n \n echo \"Changing PostgreSQL database name, user and password...\"\n sed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n \n echo \"Setting up cron for every 5 minutes..\"\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n else\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n fi\n php_fpm_reset\n \n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n service nginx restart\n service php7.4-fpm restart\n else\n if [ -f \"/bin/systemctl\" ]; then\n echo \"Starting services with systemd...\"\n systemctl restart nginx\n systemctl restart php-fpm\n else\n echo \"Starting services...\"\n /etc/init.d/php-fpm restart\n /etc/init.d/nginx restart\n fi\n fi\n set_db_connection\n\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\tthen\n\t\t\tssl_connectivity\n\t\telse\n\t\t\tssl_connectivity\n\t\tfi\n\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n\t\t\tsemanage permissive -a httpd_t\n\t\tfi\n\t\tset +x\n\t\techo \"Checking Hosting...\"\n\t\tresponse=$(curl -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2017-04-02 --write-out %{http_code} --connect-timeout 10 --max-time 10 --silent --output /dev/null)\n\t\t\n\t\tif [ -f /etc/ImageMagick-6/policy.xml ]; then\n \t\tsed -i -e 's///g' /etc/ImageMagick-6/policy.xml\n\t\tfi\n\n\t\tif [ -f /etc/ImageMagick/policy.xml ]; then\n\t\t\tsed -i -e 's///g' /etc/ImageMagick/policy.xml\n\t\tfi\n\n\t\tif [ ${response} -eq 200 ];then\n\t\t\techo \"Note: PHP Mailer will not work in Azure. Kindly use external SMTP mail server.\"\n\t\tfi\n\t\tset +x\n\t\tcurl -v -L -G -d \"app=board&os=${os}&version=${version}\" -k \"https://restya.com/success_installation.php\"\n\t\techo \"Restyaboard URL : $IPADDR\"\n\n\t\techo \"Login with username admin and password restya\"\n\t\texit 1\n\t}\n\tmain\n\terror=$?\n\tos=$(lsb_release -i -s)\n\tcurl -v -L -G -d \"app=board&os=${os}&error=${error}\" -k \"https://restya.com/error_installation.php\"\n\techo \"If you're finding it difficult to install Restyaboard from your end, we do also offer installation support that you may consider https://restya.com/contact\"\n\texit 1\n} 2>&1 | tee -a /tmp/restyaboard_install.log","user_defined_fields":[]},{"id":912264,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rocket.Chat One-Click","description":"Rocket.Chat One-Click","ordinal":97,"logo_url":"assets/rocketchat.svg","images":["linode/ubuntu20.04"],"deployments_total":1810,"deployments_active":91,"is_public":true,"mine":false,"created":"2021-09-29T17:16:16","updated":"2023-12-11T15:12:25","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nufw allow 3000\nfail2ban_install\n\n# Snapd & rocketchat install\napt install snapd -y\nsnap install rocketchat-server\nsnap info rocketchat-server\n\n# Check DNS\ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n# SSL\nsnap set rocketchat-server siteurl=https://$FQDN\nsystemctl enable --now snap.rocketchat-server.rocketchat-caddy \nsnap restart rocketchat-server\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA","default":""}]},{"id":609048,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ruby on Rails One-Click","description":"Ruby on Rails One-Click","ordinal":98,"logo_url":"assets/rubyonrails.svg","images":["linode/ubuntu20.04"],"deployments_total":459,"deployments_active":20,"is_public":true,"mine":false,"created":"2019-11-05T07:22:54","updated":"2023-12-09T10:22:03","rev_note":"Initial import","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Ruby on Rails\napt install -y ruby rails\n\n# Configure rails Directory\nmkdir /home/railsapp\ncd /home/railsapp\nrails new $RAILSAPP\ncd $RAILSAPP\nrails s -b 0.0.0.0 &\n\n# Start rails app on reboot\ncrontab -l | { cat; echo \"@reboot cd /home/railsapp/app1/ && rails s -b 0.0.0.0 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"railsapp","label":"Rails Application name","example":"railsapp"}]},{"id":401703,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rust One-Click","description":"Rust - Latest One-Click","ordinal":99,"logo_url":"assets/Rust.svg","images":["linode/ubuntu20.04"],"deployments_total":2455,"deployments_active":8,"is_public":true,"mine":false,"created":"2019-03-08T21:09:34","updated":"2023-12-10T08:41:10","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \nsource \n\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"rustserver\"\n\nset_hostname\napt_setup_update\n\n\nif [[ \"$RUSTHOSTNAME\" = \"\" ]]; then\n RUSTHOSTNAME=\"Linode Rust Server\"\nfi\n\nif [[ \"$LEVEL\" = \"Procedural Map\" ]]; then\n LEVEL=\"\"\nfi\n\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix curl \\\nwget file bzip2 gzip unzip bsdmainutils python \\\nutil-linux ca-certificates binutils bc jq tmux \\\nlib32gcc1 libstdc++6 libstdc++6:i386 lib32z1\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Rust\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\ncp /home/rustserver/lgsm/config-lgsm/rustserver/_default.cfg /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nchown -R rustserver:rustserver /home/rustserver/\n\necho \"server.globalchat $GLOBALCHAT/\" > /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.pve $PVE\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.description \\\"$DESCRIPTION\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.maxplayers $MAXPLAYERS\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.seed \\\"$SEED\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.level $LEVEL\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.hostname \\\"$RUSTHOSTNAME\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.ip $IP\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\nsed -i \"s/rconpassword=\\\"CHANGE_ME\\\"/rconpassword=\\\"$RCONPASSWORD\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/worldsize=\\\"3000\\\"/worldsize=\\\"$WORLDSIZE\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/maxplayers=\\\"50\\\"/maxplayers=\\\"$MAXPLAYERS\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\n\n\n# Start the service and setup firewall\nufw allow 28015\nufw allow 28016\n\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rusthostname","label":"Server Hostname","default":"Linode Rust Server"},{"name":"description","label":"Server Description","default":"Powered by Linode!"},{"name":"rconpassword","label":"RCON Password"},{"name":"maxplayers","label":"Maximum Players","oneof":"10,25,50,75,100","default":"50"},{"name":"level","label":"World","oneof":"Procedural Map,Barren,HapisIsland,SavasIsland_koth","default":"Procedural Map"},{"name":"worldsize","label":"World Size","oneof":"1000,3000,6000","default":"3000"},{"name":"seed","label":"Seed","default":"50000"},{"name":"globalchat","label":"Global Chat Enabled","oneof":"true,false","default":"true"},{"name":"pve","label":"PvE Enabled","oneof":"true,false","default":"false"}]},{"id":971042,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Saltcorn One-Click","description":"Saltcorn One-Click","ordinal":100,"logo_url":"assets/saltcorn.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":304,"deployments_active":6,"is_public":true,"mine":false,"created":"2022-02-08T16:21:05","updated":"2023-12-02T23:13:46","rev_note":"","script":"#!/bin/bash\n## Saltcorn Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction saltcorninstall {\n wget -qO - https://deb.nodesource.com/setup_14.x | sudo bash -\n apt-get install -qqy nodejs\n npx saltcorn-install -y\n systemctl enable saltcorn\n systemctl stop saltcorn\n cat < /lib/systemd/system/saltcorn.service\n[Unit]\nDescription=saltcorn\nDocumentation=https://saltcorn.com\nAfter=network.target\n\n[Service]\nType=notify\nWatchdogSec=5\nUser=saltcorn\nWorkingDirectory=/home/saltcorn\nExecStart=/home/saltcorn/.local/bin/saltcorn serve -p 8080\nRestart=always\nEnvironment=\"NODE_ENV=production\"\n\n[Install]\nWantedBy=multi-user.target\nEND\n systemctl daemon-reload\n systemctl start saltcorn\n}\n\nfunction firewallsaltcorn {\n ufw allow 22\n ufw allow 80\n ufw allow 443\n}\n\nfunction nginxreversesaltcorn {\n apt-get install nginx -y\n cat < /etc/nginx/conf.d/saltcorn.conf\nserver {\n listen 80;\n server_name $FQDN $IP;\n\n location / {\n proxy_set_header X-Forwarded-For \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:8080;\n }\n}\nEND\n nginx -t\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\n\nfunction ssl_saltcorn {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n saltcorninstall\n nginxreversesaltcorn\n firewallsaltcorn\n ssl_saltcorn\n\n}\n# Execute\nmain \nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for Letsencrypt SSL","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":774829,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ServerWand One-Click","description":"ServerWand One-Click","ordinal":101,"logo_url":"assets/serverwand.svg","images":["linode/ubuntu22.04"],"deployments_total":1085,"deployments_active":11,"is_public":true,"mine":false,"created":"2021-02-19T17:28:16","updated":"2023-12-11T22:11:37","rev_note":"","script":"#!/bin/bash\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# serverwand ssh key\nmkdir -p /root/.ssh/\nchmod 700 /root/.ssh/\ncurl https://serverwand.com/api/servers/connect > ~/.ssh/authorized_keys\nchmod 600 /root/.ssh/authorized_keys","user_defined_fields":[]},{"id":1177225,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Seatable One-Click","description":"Seatable One-Click App","ordinal":102,"logo_url":"assets/seatable.svg","images":["linode/debian11"],"deployments_total":44,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-05-16T19:56:00","updated":"2023-12-04T16:58:01","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\nsource \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION \n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Update and basic installs\nsystem_update\ndebian_upgrade\nenable_fail2ban\nsystem_install_package ufw ca-certificates curl gnupg lsb-release curl pwgen\n\n# Install docker\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \\\n \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get -y update\napt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose\n\n# Pull current seatable container\ndocker pull seatable/seatable-enterprise:latest\nmkdir /opt/seatable\nwget -O \"/opt/seatable/docker-compose.yml\" \"https://manual.seatable.io/docker/Enterprise-Edition/docker-compose.yml\"\n\n# Prepare SeaTable\nMYSQL_PASSWORD=`pwgen -s 30 1`\nsed -i \"s|DB_ROOT_PASSWD=.*|DB_ROOT_PASSWD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|MYSQL_ROOT_PASSWORD=.*|MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_LETSENCRYPT=.*|SEATABLE_SERVER_LETSENCRYPT=${LE}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_HOSTNAME=.*|SEATABLE_SERVER_HOSTNAME=${URL}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|TIME_ZONE=.*|TIME_ZONE=${TIMEZONE}|\" /opt/seatable/docker-compose.yml\n\n# Add a license\nmkdir -p /opt/seatable/seatable-data/seatable\ntouch /opt/seatable/seatable-data/seatable/seatable-license.txt\ncat << EOF > /opt/seatable/seatable-data/seatable/seatable-license.txt\n#SeaTable server licence\nName = \"Cloud Trial\"\nLicencetype = \"User\"\nLicenceKEY = \"1672935702\"\nProductID = \"SeaTable server\"\nExpiration = \"2024-01-31\"\nMaxUsers = \"3\"\nMode = \"subscription\"\nHash = \"045af708265d7d549cad51fc2b678272a1d15ab8cbfbf05734e371504bb72b388f4441493c7bfeccce7c19ac9c6877cb8f3aecc3beebe685db007832e1c0231728a92772d45dc1c08facbc225d90776f86d34cb4154bafe7c983b6767ffb31a74b133de61edf15c170564fcefb6e457012f63b95ed4aaf6fd2e1e1cfc2ad93a682cfab2fe86f427f7d93ae9b69cbaf02a7565074a95a8c1176402f250d2e815ab206a6b65009c65d94259772ab31a00c11e5c6b57fda0fbb1b22a69734c10214594a5d7b4c88a995eaeb3a65f9aa5d163d9e5c09f73105a4ef760a8421fb66d1982da739c42808fded9a95e456090747e494b0a1aee2a40f388d9f1146051754\"\nEOF\n\n# firewall\nufw limit ssh\nufw allow 80\nufw allow 443\nufw --force enable\n\n# Message of the day\ncat << EOF > /etc/motd\n#############################\n#############################\nSeaTable Enterprise Server\n\nTo finish the installation, change to the directory /opt/seatable and follow our deployment instructions at https://manual.seatable.io/docker/Enterprise-Edition/Deploy%20SeaTable-EE%20with%20Docker/.\nYou can skip the beginning and start directly with the adjustment of the docker-compose.yml file.\n\nPlease visit https://forum.seatable.io for SeaTable community support.\n#############################\n#############################\n\nEOF\n\necho \"Installation complete\"\nall_set\nstackscript_cleanup","user_defined_fields":[{"name":"url","label":"The domain/subdomain for SeaTable Server","example":"https://seatable.example.org"},{"name":"le","label":"Get a Let's Encrypt certificate","default":"True","oneof":"True,False"},{"name":"timezone","label":"Choose your timezone (e.g Europe/Berlin)","example":"Choices can be found here: http://en.wikipedia.org/wiki/List_of_tz_zones_by_name","default":"Etc/UTC"}]},{"id":604068,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Shadowsocks One-Click","description":"Shadowsocks One-Click","ordinal":103,"logo_url":"assets/shadowsocks.svg","images":["linode/ubuntu20.04"],"deployments_total":9287,"deployments_active":352,"is_public":true,"mine":false,"created":"2019-10-22T16:11:39","updated":"2023-12-12T14:27:20","rev_note":"final edit","script":"#!/usr/bin/env bash\n\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Install & configure shadowsocks\nfunction install_shadowsocks {\n apt-get install shadowsocks-libev -y\n cat </etc/shadowsocks-libev/config.json\n{\n\"server\":\"$IP\",\n\"server_port\":8000,\n\"local_port\":1080,\n\"password\":\"$SHADOWPASSWORD\",\n\"timeout\":60,\n\"method\":\"aes-256-gcm\"\n}\nEND\n systemctl start shadowsocks-libev\n systemctl enable shadowsocks-libev\n systemctl restart shadowsocks-libev\n}\n\nfunction shadowsocks_firewall {\n ufw allow 8000\n}\n\nfunction main {\n install_shadowsocks\n shadowsocks_firewall\n stackscript_cleanup\n}\n\n# Execute function\nmain","user_defined_fields":[{"name":"shadowpassword","label":"Shadowsocks Password","example":"Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1243780,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"SimpleX Chat One-Click","description":"SimpleX Chat","ordinal":104,"logo_url":"assets/simplexchat.svg","images":["linode/ubuntu22.04"],"deployments_total":61,"deployments_active":8,"is_public":true,"mine":false,"created":"2023-09-28T15:20:59","updated":"2023-12-11T10:24:43","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Simplex Settings\n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-simplex-chat\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n # Simplex variables\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n if [[ -n ${DOMAIN} && -n ${SUBDOMAIN} ]]; then\n echo \"addr: ${SUBDOMAIN}.${DOMAIN}\" >> ${group_vars}\n elif [[ -n ${DOMAIN} ]]; then\n echo \"addr: ${DOMAIN}\" >> ${group_vars}\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n\n if [[ -n ${SMP_PASSWORD} ]]; then\n echo \"smp_password: ${SMP_PASSWORD}\" >> ${group_vars};\n fi\n\n if [[ -n ${XFTP_QUOTA} ]]; then\n case ${XFTP_QUOTA} in\n *gb) echo \"xftp_quota: ${XFTP_QUOTA}\" >> ${group_vars} ;;\n *) echo \"xftp_quota: ${XFTP_QUOTA}gb\" >> ${group_vars} ;;\n esac\n fi\n\n # Linode variables\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"smp_password","label":"Set password for smp-server.","example":"123qwe","default":""},{"name":"xftp_quota","label":"Set xftp-server file storage quota in GB.","example":"1/5/10/100gb","default":"10gb"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":869153,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Splunk One-Click","description":"Splunk One-Click","ordinal":105,"logo_url":"assets/splunk.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":961,"deployments_active":94,"is_public":true,"mine":false,"created":"2021-07-20T19:04:43","updated":"2023-12-11T14:21:26","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Splunk settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# Configure Splunk\nwget https://download.splunk.com/products/splunk/releases/8.2.0/linux/splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz\nwget \ntar zxvf splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz -C /opt/\nuseradd splunk --system --shell=/usr/sbin/nologin\nchown -R splunk:splunk /opt/splunk\n\napt install -y expect\n SPLUNK_INSTALL=$(expect -c \"\n set timeout 10\n spawn /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 1 --accept-license\n expect \\\"Please enter an administrator username:\\\"\n send \\\"$SPLUNK_USER\\r\\\"\n expect \\\"Please enter a new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect \\\"Please confirm new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect eof\n \")\n\n# Start daemon\nsystemctl start Splunkd\nsystemctl status Splunkd\n\n# Firewall\nufw allow 22 \nufw allow 8000\nufw allow 8089\nufw allow 9997\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"splunk_user","label":"Splunk Admin User"},{"name":"splunk_password","label":"Splunk Admin password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1","default":""},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd","default":""},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1102904,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Superinsight One-Click","description":"Superinsight One-Click app","ordinal":106,"logo_url":"assets/superinsight.svg","images":["linode/ubuntu22.04"],"deployments_total":29,"deployments_active":1,"is_public":true,"mine":false,"created":"2022-12-20T17:43:01","updated":"2023-12-03T07:53:56","rev_note":"","script":"#!/usr/bin/bash\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Install docker\ncurl -fsSL get.docker.com | sudo sh\n\n# Creating Password\necho \"Superinsight setting up password....\"\nADMIN_PASSWORD=$(openssl rand -hex 12)\nNODE_IP=$(hostname -I | cut -f1 -d' ')\necho \"Downloading and Installing Superinsight instance......\"\n\n# Install Superinsight\ndocker run \\\n--detach \\\n--name superinsight-db-standalone \\\n--restart always \\\n-p 5432:5432 \\\n-v vol-superinsight:/db \\\n-e SUPERINSIGHT_USER=admin \\\n-e SUPERINSIGHT_PASSWORD=\"${ADMIN_PASSWORD}\" \\\nsuperinsight/superinsight-db-standalone:latest\n\n\n# Print instructions\ncat << EOF > /etc/motd\n\n################################################################################################################################################\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSUPERINSIGHT\n################################################################################################################################################\n\nSuperinsight created the user admin with password: ${ADMIN_PASSWORD}\nYou can can connect using a database client with the following connection string postgres://admin:${ADMIN_PASSWORD}@${NODE_IP}:5432/superinsight\nFor complete source code and information, visit: https://github.com/superinsight/superinsight-db\n\n################################################################################################################################################\nEOF","user_defined_fields":[]},{"id":401705,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Terraria One-Click","description":"Terraria One-Click","ordinal":107,"logo_url":"assets/Terraria.svg","images":["linode/ubuntu20.04"],"deployments_total":705,"deployments_active":5,"is_public":true,"mine":false,"created":"2019-03-08T21:10:49","updated":"2023-12-06T13:35:55","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n\n#Game config options\n\n#\n#\n#\n#\n#\n#\n#\n\n\n#Non-MVP config options\n#name=\"autocreate\" label=\"autocreate\" default=\"1\"/>\n#name=\"worldpath\" label=\"worldpath\" default=\"~/.local/share/Terraria/Worlds/\"/>\n#name=\"banlist\" label=\"banlist\" default=\"banlist.txt\"/>\n#name=\"priority\" label=\"priority\" default=\"1\"/>\n#name=\"upnp\" label=\"upnp\" default=\"1\"/>\n#name=\"npcstream\" label=\"npcstream\" default=\"60\"/>\n#name=\"secure\" label=\"secure\" default=\"1\"/>\n#name=\"language\" label=\"language\" default=\"en-US\"/>\n\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\nGAMESERVER=\"terrariaserver\"\n\n### UDF to config\n\nif [[ \"$DIFFICULTY\" = \"Normal\" ]]; then\n DIFFICULTY=\"0\"\nelif [[ \"$DIFFICULTY\" = \"Expert\" ]]; then\n DIFFICULTY=\"1\"\nfi\n\nset_hostname\napt_setup_update\n\n\n# Terraria specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\necho Requires Steam username and password to install\nsu - $GAMESERVER -c \"mkdir -p /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER\"\nsu - $GAMESERVER -c \"touch /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steamuser=\\\"$STEAMUSER\\\" >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steampass=\\''$STEAMPASSWORD'\\' >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\n\n# Install Terraria\ngame_install\n\nsed -i s/#seed=AwesomeSeed/seed=\"$SEED\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/worldname=world1/worldname=\"$WORLDNAME\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/difficulty=0/difficulty=\"$DIFFICULTY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/maxplayers=20/maxplayers=\"$MAXPLAYERS\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/port=7777/port=\"$PORT\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/password=/password=\"$PASSWORD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/motd=.*/motd=\"$MOTD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n#Non-MVP config options\n# sed -i s/autocreate=1/autocreate=\"$AUTOCREATE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/worldpath=\\~\\/\\.local\\/share\\/Terraria\\/Worlds\\//worldpath=\"$WORLDPATH\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/banlist=banlist.txt/banlist=\"$BANLIST\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/\\#priority=1/priority=\"$PRIORITY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#npcstream=60/npcstream=\"$NPCSTREAM\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#upnp=1/upnp=\"$UPNP\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/secure=1/secure=\"$SECURE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/language=en\\-US/language=\"$LANGUAGE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n# Setup crons and create systemd service file\nservice_config\n\n# Start the service and setup firewall\nufw_install\nufw allow \"$PORT\"/tcp\nufw allow \"$PORT\"/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"steamuser","label":"Steam Username","example":"username"},{"name":"steampassword","label":"Steam Password, must have Steam Guard turned off for deployment","example":"YourSteamPassword"},{"name":"worldname","label":"World Name","default":"world1"},{"name":"password","label":"Server Password","default":""},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"difficulty","label":"Difficulty Level","oneof":"Normal,Expert","default":"Normal"},{"name":"maxplayers","label":"Maximum Players","oneof":"1,10,20,50,100,200,255,","default":"20"},{"name":"port","label":"Port","default":"7777"},{"name":"seed","label":"Seed","default":"AwesomeSeed"}]},{"id":401704,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"TF2 One-Click","description":"TF2 One-Click","ordinal":108,"logo_url":"assets/TF2.svg","images":["linode/debian11"],"deployments_total":354,"deployments_active":2,"is_public":true,"mine":false,"created":"2019-03-08T21:10:23","updated":"2023-12-12T02:02:35","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nGAMESERVER=\"tf2server\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\nif [[ \"$SERVERNAME\" = \"\" ]]; then\n SERVERNAME=\"Linode TF2 Server\"\nfi\n\n\n# Server config\nset_hostname\napt_setup_update\n\n\n# Teamfortress2 specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\napt -q -y install mailutils postfix curl wget file \\\nbzip2 gzip unzip bsdmainutils python util-linux \\\nca-certificates binutils bc jq tmux lib32gcc-s1 libstdc++6 \\\nlibstdc++6:i386 libcurl4-gnutls-dev:i386 libtcmalloc-minimal4:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Teamfortress2\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\ncp /home/tf2server/lgsm/config-lgsm/tf2server/_default.cfg /home/tf2server/lgsm/config-lgsm/tf2server/common.cfg\n\n# Custom game configs\n> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\ncat <> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile\nEND\n\necho \"hostname $SERVERNAME\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_maxrounds $MAXROUNDS\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_timelimit $TIMELIMIT\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"\\\"$MOTD\\\"\" > /home/tf2server/serverfiles/tf/cfg/motd_default.txt\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27014:27050/tcp\nufw allow 3478:4380/udp\nufw allow 27000:27030/udp\nufw allow 26901\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode TF2 Server"},{"name":"svpassword","label":"Server Password","default":""},{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,3,5,10,15,20","default":"5"},{"name":"timelimit","label":"Round Time Limit","oneof":"10,15,35,45,60","default":"35"},{"name":"rconpassword","label":"RCON password"}]},{"id":1051711,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UniFi Network Application One-Click","description":"UniFi Network Application One-Click","ordinal":109,"logo_url":"assets/unifi.svg","images":["linode/debian10"],"deployments_total":493,"deployments_active":23,"is_public":true,"mine":false,"created":"2022-09-01T15:41:39","updated":"2023-10-18T12:38:34","rev_note":"","script":"#!/bin/bash\n#\n# Script to install UniFi Controller on Linode\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n## install depends \nexport DEBIAN_FRONTEND=noninteractive\napt-get install apt-transport-https ca-certificates wget dirmngr gpg software-properties-common multiarch-support libcommons-daemon-java jsvc openjdk-11-jre-headless -y \n\n# install mongodb req libssl1\nwget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\ndpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\n\n# install mongodb-3.4\nwget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | apt-key add -\necho \"deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main\" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list\napt update && apt upgrade -y\napt install mongodb-org -y \n \n# install latest UniFi Controller \necho 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list\nsudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg \napt update && apt install unifi -yq \n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n location /wss/ {\n proxy_pass https://localhost:8443;\n proxy_http_version 1.1;\n proxy_buffering off;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"Upgrade\";\n proxy_read_timeout 86400;\n }\n location / {\n proxy_pass https://localhost:8443;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http\nufw allow https\nufw allow 53\nufw allow 3479/udp\nufw allow 5514/udp\nufw allow 8080/tcp\nufw allow 8443/tcp\nufw allow 8880/tcp\nufw allow 8843/tcp\nufw allow 27117/tcp\nufw allow 5656:5699/udp\nufw allow 10001/udp \nufw allow 1900/udp\nufw allow 123/udp\nufw enable \n\nsleep 60 \n\n## install SSL certs. required \napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n \n## add some details \ncat << EOF > /etc/motd\n###################\n\n The installation is now complete, and you can access the UniFi Network Controller GUI from https://${ABS_DOMAIN}\n We recommend using the GUI to complete your configurations of the service\n\n################### \nEOF\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970523,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Uptime Kuma One-Click","description":"Uptime Kuma One-Click","ordinal":110,"logo_url":"assets/uptimekuma.svg","images":["linode/ubuntu22.04"],"deployments_total":2284,"deployments_active":398,"is_public":true,"mine":false,"created":"2022-02-07T16:06:08","updated":"2023-12-12T11:49:54","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## KUMA Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-uptimekuma\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n # Uptimekuma vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":925530,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UTunnel VPN One-Click","description":"UTunnel VPN One-Click","ordinal":111,"logo_url":"assets/utunnel.svg","images":["linode/ubuntu20.04"],"deployments_total":1194,"deployments_active":17,"is_public":true,"mine":false,"created":"2021-10-25T18:55:37","updated":"2023-12-11T18:05:44","rev_note":"","script":"#!/bin/bash\n# Update the packages on the system from the distribution repositories.\t\napt-get update\nDEBIAN_FRONTEND=noninteractive apt-get upgrade -y\n\n# Install pre-requisites for docker-ce\n\nDEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common\n\n#Add Docker official GPG key\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\n#Add repository\n\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n\n# Download and install utnservice\n\nmkdir /utunnel\n\ncd /utunnel \n\nwget https://files.utunnel.io/production/deploy/install_bundle_20.tar\n\ntar -xf install_bundle_20.tar\n\nrm -f install_bundle_20.tar","user_defined_fields":[]},{"id":781317,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Valheim One-Click","description":"Valheim One-Click","ordinal":112,"logo_url":"assets/valheim.svg","images":["linode/debian10"],"deployments_total":2427,"deployments_active":52,"is_public":true,"mine":false,"created":"2021-03-01T13:26:36","updated":"2023-12-10T21:30:59","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Valheim Server Settings - Required\n#\n#\n\n## Linode/SSH Security Settings - Required\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n\n# Download and install dependencies\ndpkg --add-architecture i386\nsystem_update\nsystem_install_package curl wget file tar expect bzip2 gzip unzip \\\n bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 \\\n libc6-dev libsdl2-2.0-0:i386\n\n\n# Open the needed firewall ports\nufw allow 2456:2458/udp\nufw allow 4380/udp\nufw allow 27000:27030/udp\n\n# Install linuxGSM\nGAMESERVER='vhserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Set the Valheim dedicated server's name and password\ncat /home/$USERNAME/lgsm/config-lgsm/vhserver/_default.cfg >> /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/servername=\\\"Valheim Server\\\"/servername=\\\"$SERVER_NAME\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/serverpassword=\\\"\\\"/serverpassword=\\\"$SERVER_PASSWORD\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\n\n# Start and enable the Valheim services\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"server_name","label":"The name of the Valheim dedicated server"},{"name":"server_password","label":"The password for the Valheim dedicated server","example":"S3cuReP@s$w0rd"},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":954759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VictoriaMetrics Single One-Click","description":"VictoriaMetrics Single","ordinal":113,"logo_url":"assets/victoriametricssingle.svg","images":["linode/ubuntu20.04"],"deployments_total":40,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-01-06T18:53:56","updated":"2023-12-07T22:56:22","rev_note":"","script":"#!/bin/bash\n# \nsource \nsystem_set_hostname \"$HOSTNAME\"\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=noninteractive\napt update && apt upgrade -y && apt install -y curl wget net-tools traceroute jq\n# Generate files\nmkdir -p /etc/victoriametrics/single\nmkdir -p /var/lib/victoria-metrics-data\nmkdir -p /var/lib/cloud/scripts/per-instance\n# Create victoriametrics user\ngroupadd -r victoriametrics\nuseradd -g victoriametrics -d /var/lib/victoria-metrics-data -s /sbin/nologin --system victoriametrics\nchown -R victoriametrics:victoriametrics /var/lib/victoria-metrics-data\n# Install VictoriaMetrics Single\nVM_VERSION=`curl -sg \"https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/tags\" | jq -r '.[0].name'`\nwget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/${VM_VERSION}/victoria-metrics-linux-amd64-${VM_VERSION}.tar.gz -O /tmp/victoria-metrics.tar.gz\ntar xvf /tmp/victoria-metrics.tar.gz -C /usr/bin\nchmod +x /usr/bin/victoria-metrics-prod\nchown root:root /usr/bin/victoria-metrics-prod\ntouch /etc/victoriametrics/single/scrape.yml\nchown root:root /etc/victoriametrics/single/scrape.yml\ncat </etc/systemd/system/vmsingle.service\n[Unit]\nDescription=VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database.\n# https://docs.victoriametrics.com\nAfter=network.target\n[Service]\nType=simple\nUser=victoriametrics\nGroup=victoriametrics\nWorkingDirectory=/var/lib/victoria-metrics-data\nStartLimitBurst=5\nStartLimitInterval=0\nRestart=on-failure\nRestartSec=5\nEnvironmentFile=-/etc/victoriametrics/single/victoriametrics.conf\nExecStart=/usr/bin/victoria-metrics-prod \\$ARGS\nExecStop=/bin/kill -s SIGTERM \\$MAINPID\nExecReload=/bin/kill -HUP \\$MAINPID\n# See docs https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#tuning\nProtectSystem=full\nLimitNOFILE=1048576\nLimitNPROC=1048576\nLimitCORE=infinity\nStandardOutput=syslog\nStandardError=syslog\nSyslogIdentifier=vmsingle\n[Install]\nWantedBy=multi-user.target\nEND\ncat </etc/victoriametrics/single/victoriametrics.conf\n# See https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#list-of-command-line-flags to get more information about supported command-line flags\n# \n# If you use IPv6 pleas add \"-enableTCP6\" to args line\nARGS=\"-promscrape.config=/etc/victoriametrics/single/scrape.yml -storageDataPath=/var/lib/victoria-metrics-data -retentionPeriod=12 -httpListenAddr=:8428 -graphiteListenAddr=:2003 -opentsdbListenAddr=:4242 -influxListenAddr=:8089 -enableTCP6\"\nEND\ncat < /etc/profile.d/victoriametrics_welcome.sh\n#!/bin/sh\n#\nmyip=$(hostname -I | awk '{print$1}')\n******************************************************************************** \nWelcome to VictoriaMetrics Single.\nTo keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH), 80 (HTTP), and 443 (HTTPS), 8428 (VictoriaMetrics HTTP), 8089 (VictoriaMetrics Influx),\n4242 (VictoriaMetrics OpenTSDB), 2003 (VictoriaMetrics Graphite)\nIn a web browser, you can view:\n * The VictoriaMetrics Quickstart guide: https://kutt.it/1click-quickstart\nOn the server:\n * The default VictoriaMetrics root is located at /var/lib/victoria-metrics-data\n * VictoriaMetrics is running on ports: 8428, 8089, 4242, 2003 and they are bound to the local interface.\n********************************************************************************\n # This image includes version v1.74.0 of VictoriaMetrics. \n # See Release notes https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.70.0\n # Welcome to VictoriaMetrics droplet!\n # Website: https://victoriametrics.com\n # Documentation: https://docs.victoriametrics.com\n # VictoriaMetrics Github : https://github.com/VictoriaMetrics/VictoriaMetrics\n # VictoriaMetrics Slack Community: https://slack.victoriametrics.com\n # VictoriaMetrics Telegram Community: https://t.me/VictoriaMetrics_en\n # VictoriaMetrics config: /etc/victoriametrics/single/victoriametrics.conf\n # VictoriaMetrics scrape config: /etc/victoriametrics/single/scrape.yml\n # VictoriaMetrics UI accessable on: http://your_droplet_public_ipv4:8428/vmui/\nEND\n# Enable UFW and add some rules to it\nsed -e 's|DEFAULT_FORWARD_POLICY=.*|DEFAULT_FORWARD_POLICY=\"ACCEPT\"|g' \\\n -i /etc/default/ufw\nufw allow ssh comment \"SSH port\"\nufw allow http comment \"HTTP port\"\nufw allow https comment \"HTTPS port\"\nufw allow 8428 comment \"VictoriaMetrics Single HTTP port\"\nufw allow 8089/tcp comment \"TCP Influx Listen port for VictoriaMetrics\"\nufw allow 8089/udp comment \"UDP Influx Listen port for VictoriaMetrics\"\nufw allow 2003/tcp comment \"TCP Graphite Listen port for VictoriaMetrics\"\nufw allow 2003/udp comment \"UDP Graphite Listen port for VictoriaMetrics\"\nufw allow 4242 comment \"OpenTSDB Listen port for VictoriaMetrics\"\nufw --force enable\n# Cleaning up\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n# Start VictoriaMetrics\nsystemctl enable vmsingle.service\nsystemctl start vmsingle.service\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]},{"id":662117,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Virtualmin One-Click","description":"Virtualmin One-Click","ordinal":114,"logo_url":"assets/virtualmin.svg","images":["linode/debian10","linode/ubuntu22.04"],"deployments_total":2204,"deployments_active":140,"is_public":true,"mine":false,"created":"2020-08-12T15:46:13","updated":"2023-12-12T15:29:25","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nIFS=$'\\n\\t'\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n# Import the OCA Helper Functions\nsource \n\nfunction install_virtualmin {\n if [ $(cat /etc/os-release | grep -i 'ubuntu' )]; then\n if [ ! $(cat /etc/os-release | grep -i 'lts') ]; then\n printf \"Virtualmin only works with LTS versions of Ubuntu\\n\"\n exit 1;\n fi\n else\n wget http://software.virtualmin.com/gpl/scripts/virtualmin-install.sh -O /root/virtualmin-install.sh && {\n chmod +x /root/virtualmin-install.sh\n /bin/sh /root/virtualmin-install.sh -f -v\n }\n fi\n}\n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Configure firewall and install Fail2Ban\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\nfail2ban_install\n\n# Install Webmin and Virtualmin\nsource \ninstall_virtualmin\n\n# Disable SSL so that everything works\nsed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n# Restart Webmin\nsystemctl restart webmin\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated intrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688903,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VS Code Server One-Click","description":"Visual Studio Code One-Click","ordinal":115,"logo_url":"assets/vscodeserver.svg","images":["linode/debian10"],"deployments_total":5267,"deployments_active":123,"is_public":true,"mine":false,"created":"2020-11-17T21:10:25","updated":"2023-12-12T15:29:28","rev_note":"","script":"#!/usr/bin/env bash\n\n## VS Code Server OCA Script\n\n### UDF Variables\n\n## VS Code Web Password\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n\nfunction get_code_server {\n local -r username=\"$1\" vs_code_ver=\"$2\"\n\n cd \"/home/$username\"\n\n wget \"https://github.com/cdr/code-server/releases/download/v${vs_code_ver}/code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n tar -xf \"code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n mv code-server-*/ bin/\n\n chown -R \"${username}:${username}\" bin/\n chmod +x bin/code-server\n mkdir data/\n chown -R \"${username}:${username}\" data/\n\n cd /root/\n}\n\nfunction enable_code_service {\n local -r vs_code_password=\"$1\" username=\"$2\"\n\n # Set the password in /etc/systemd/system/code-server.service\n cat << EOF > /etc/systemd/system/code-server.service\n[Unit]\nDescription=code-server\nAfter=nginx.service\n[Service]\nUser=$username\nWorkingDirectory=/home/$username\nEnvironment=PASSWORD=$vs_code_password\nExecStart=/home/${username}/bin/code-server --host 127.0.0.1 --user-data-dir /home/${username}/data --auth password\nRestart=always\n[Install]\nWantedBy=multi-user.target\nEOF\n\n # Enable code-server as a service\n systemctl daemon-reload\n systemctl start code-server\n systemctl enable code-server\n}\n\nfunction certbot_standalone {\n local -r email_address=\"$1\" ssl_domain=\"$2\"\n\n # Get an SSL certificate from CertBot\n system_install_package \"certbot\"\n certbot -n certonly --standalone --agree-tos -m \"$email_address\" -d \"$ssl_domain\"\n}\n\nfunction nginx_reverse_proxy {\n local -r ssl_domain=\"$1\"\n\n ## Setup a reverse proxy with Nginx\n system_install_package \"nginx\"\n\n cat << EOF > /etc/nginx/sites-available/code-server\nserver {\n listen 80;\n server_name $ssl_domain;\n # enforce https\n return 301 https://\\$server_name:443\\$request_uri;\n}\nserver {\n listen 443 ssl http2;\n server_name $ssl_domain;\n ssl_certificate /etc/letsencrypt/live/${ssl_domain}/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/${ssl_domain}/privkey.pem;\n location / {\n proxy_pass http://127.0.0.1:8080/;\n proxy_set_header Host \\$host;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection upgrade;\n proxy_set_header Accept-Encoding gzip;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-available/code-server /etc/nginx/sites-enabled\n nginx -t\n systemctl restart nginx\n}\n\n### Install UFW and open the needed firewall ports\nufw allow 80,443/tcp\n\n### Install and configure VS Code Server\nget_code_server \"$USERNAME\" \"$VS_CODE_VER\"\nenable_code_service \"$VS_CODE_PASSWORD\" \"$USERNAME\"\ncheck_dns_propagation \"$FQDN\" \"$IP\"\ncertbot_standalone \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\nnginx_reverse_proxy \"$FQDN\"\n\n### Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"vs_code_password","label":"The password to login to the VS Code Web UI"},{"name":"vs_code_ver","label":"The version of VS Code Server you'd like installed","default":"3.10.2"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"disable_root","label":"Would you like to disable root login over SSH? (Recommended)","oneof":"Yes,No","default":"Yes"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address for your VirtualHost configuration, DNS records (If Required), and SSL certificates (If Required)."},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above","oneof":"Yes,No","default":"No"}]},{"id":923037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WarpSpeed One-Click","description":"WarpSpeed One-Click","ordinal":116,"logo_url":"assets/warpspeed.svg","images":["linode/ubuntu20.04"],"deployments_total":880,"deployments_active":17,"is_public":true,"mine":false,"created":"2021-10-18T01:12:49","updated":"2023-12-06T00:07:58","rev_note":"","script":"#!/bin/bash\nset -o errexit\nset -o nounset\nset -o pipefail\nset -o xtrace\n\n# \n# \n# \n# \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=\"noninteractive\"\napt-get \\\n -o 'Acquire::ForceIPv4=true' \\\n --yes \\\n update\n\napt-get \\\n -o 'DPkg::options::=--force-confdef' \\\n -o 'DPkg::options::=--force-confold' \\\n --yes \\\n install grub-pc\n\napt-get \\\n -o Acquire::ForceIPv4=true \\\n --yes \\\n update\n# # END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Handle the arguments.\nWIRESPEED_ADMIN_EMAIL=\"$(echo -e \"${WIRESPEED_ADMIN_EMAIL}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"$(echo -e \"${WIRESPEED_HTTP_HOST}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//\\//}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//https:/}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//http:/}\"\n\nif [[ -z \"${WIRESPEED_ADMIN_EMAIL}\" ]]; then\n echo \"Missing required parameter: admin email\"\n exit 101\nfi\n\nif [[ -z \"${WIRESPEED_HTTP_HOST}\" ]]; then\n echo \"Missing required parameter: http host\"\n exit 102\nfi\n\nif [[ -z \"${WIRESPEED_DATA_DIR}\" ]]; then\n WIRESPEED_DATA_DIR=\"/wirespeed\"\nfi\n\n# Set hostname\nIP=\"$(hostname --all-ip-addresses | awk '{ print $1 }')\"\nhostnamectl set-hostname \"${WIRESPEED_HTTP_HOST}\"\necho \"${IP} ${WIRESPEED_HTTP_HOST}\" >>/etc/hosts\n\nwget https://bunker.services/wirespeed-installer.sh\nchmod +x wirespeed-installer.sh\n./wirespeed-installer.sh \\\n \"${WIRESPEED_HTTP_HOST}\" \\\n \"${WIRESPEED_DATA_DIR}\" \\\n \"${WIRESPEED_ADMIN_EMAIL}\" \\\n \"${WIRESPEED_ADMIN_PASSWORD}\" \\\n --non-interactive\n\n# Force IPv4 and noninteractive upgrade after script runs to prevent breaking nf_conntrack for UFW\necho 'Acquire::ForceIPv4 \"true\";' >/etc/apt/apt.conf.d/99force-ipv4\napt-get upgrade --yes\n\nfor file in /root/StackScript /root/ssinclude* /root/wirespeed-installer.sh; do\n rm \"${file}\"\ndone\n\necho 'WireSpeed Installation complete!'","user_defined_fields":[{"name":"wirespeed_admin_email","label":"Admin Email","default":"","example":"it@example.com"},{"name":"wirespeed_admin_password","label":"Admin Password","default":"","example":"Password"},{"name":"wirespeed_http_host","label":"DNS Name","default":"","example":"vpn.example.com"},{"name":"wirespeed_data_dir","label":"Data Directory","default":"/wirespeed","example":"/wirespeed"}]},{"id":913276,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Wazuh One-Click","description":"Wazuh One-Click","ordinal":117,"logo_url":"assets/wazuh.svg","images":["linode/ubuntu22.04"],"deployments_total":5412,"deployments_active":830,"is_public":true,"mine":false,"created":"2021-09-30T18:27:36","updated":"2023-12-12T15:54:43","rev_note":"","script":"#!/bin/bash\n\n# #\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings \n#\n#\n#\n\n## Enable logging\n# set -o pipefail\nset -x\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# UFW https://documentation.wazuh.com/current/getting-started/architecture.html\nufw allow 1514\nufw allow 1515\nufw allow 1516\nufw allow 514\nufw allow 55000\nufw allow 443\nufw allow 80\nufw allow 9200\nufw allow 9300\n\n# NGINX\napt install git nginx certbot python3-certbot-nginx -y\n\nmkdir -p /var/www/certs/.well-known\nchown -R www-data:www-data /var/www/certs/\ncat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\nln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\nunlink /etc/nginx/sites-enabled/default\nsystemctl restart nginx\n\n# SSL Certbot\n#certbot certonly --agree-tos --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n\nfunction get_cert {\n if [ \"$1\" == \"dry_run\" ]; then\n certbot certonly --dry-run --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n elif [ \"$1\" == \"run\" ]; then\n certbot certonly --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n fi\n}\n\nfunction propagate {\n while [[ $count -le $retries ]]; do\n echo \"[Info] Let's Encrypt validation failed. Retrying...\"\n sleep 5\n count=$(( $count + 1 ))\n get_cert dry_run\n\n if [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful..\"\n get_cert run\n return 0\n \n fi\n\n # no more retries left. Exit\n if [[ $count -eq $retries ]]; then\n echo \"[Error] Unable to get Let's Encrypt certificate for $FQDN\"\n return 1\n fi\n done\n}\n\ncount=1\nretries=24\nget_cert dry_run\nif [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful. Getting certificate\"\n get_cert run\nelse\n propagate\nfi\n\n# reorder Wazuh script\ncurl -sO https://packages.wazuh.com/4.4/wazuh-install.sh && sudo bash ./wazuh-install.sh -a \ntar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt >> .deployment-secrets.txt\n\n# Set Variables\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\n\n# Place certificates in /etc/wazuh-dashboard/certs/\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\n\n# Restart Kibana\nservice wazuh-dashboard restart\n\n# Create Cert renewal cron script\ncat </root/certbot-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & Kibana\n# Debug\n# set -xo pipefail\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\nservice wazuh-dashboard restart\nEND\n\nchmod +x /root/certbot-renewal.sh\n\n# Setup Cron\ncrontab -l > cron\necho \"* 1 * * 1 bash /root/certbot-renewal.sh\" >> cron\ncrontab cron\nrm cron\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":662116,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webmin One-Click","description":"Webmin One-Click","ordinal":118,"logo_url":"assets/webmin.svg","images":["linode/debian10"],"deployments_total":1190,"deployments_active":34,"is_public":true,"mine":false,"created":"2020-08-12T15:41:21","updated":"2023-12-11T22:40:34","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n#Check if the script is being sourced by another script\n[[ $_ != $0 ]] && readonly SOURCED=1\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction webmin_install {\n # Install webmin\n echo \"deb http://download.webmin.com/download/repository sarge contrib\" >> /etc/apt/sources.list\n wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add\n system_update\n system_install_package \"webmin\"\n}\n\nfunction webmin_configure {\n local -r email_address=\"$1\"\n local -r fqdn=\"$2\"\n\n # Configure the Virtual Host\n cat < /etc/apache2/sites-available/\"${fqdn}.conf\"\n\n ServerAdmin ${email_address}\n ServerName ${fqdn}\n ProxyPass / http://localhost:10000/\n ProxyPassReverse / http://localhost:10000/\n\nEOF\n # Disable SSL in Webmin so Apache can handle it instead\n sed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n # Add FQDN to the list of allowed domains\n echo \"referers=${fqdn}\" >> /etc/webmin/config\n\n # Restart Webmin\n systemctl restart webmin\n\n # Enable proxy_http module\n a2enmod proxy_http\n systemctl restart apache2\n\n # Enable the Virtual Host\n a2ensite \"${fqdn}\"\n systemctl reload apache2\n}\n\n\n# Open the needed firewall ports\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\n\n# Make sure unzip is installed, or else the webmin install will fail\n[ ! -x /usr/bin/unzip ] && system_install_package \"unzip\"\n\n# \"${package_list[@]}\" contains a list of packages to be installed on the system\npackage_list=(\n \"gnupg1\" \\\n \"python\" \\\n \"apt-show-versions\" \\\n \"libapt-pkg-perl\" \\\n \"libauthen-pam-perl\" \\\n \"libio-pty-perl\" \\\n \"libnet-ssleay-perl\"\n)\n\n# Install all of the packages specified in ${package_list[@]}\nsystem_install_package \"${package_list[@]}\"\n\n# Intall Webmin\nwebmin_install\napache_install\nwebmin_configure \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\n\n# Install SSL Certificate - NOT READY YET\n#certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n## Cleanup before exiting\nif [ \"$SOURCED\" -ne 1 ]; then\n stackscript_cleanup\nfi","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webuzo One-Click","description":"Webuzo One-Click","ordinal":119,"logo_url":"assets/webuzo.svg","images":["linode/ubuntu20.04"],"deployments_total":907,"deployments_active":21,"is_public":true,"mine":false,"created":"2020-11-17T21:04:21","updated":"2023-12-10T23:22:04","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library & Helpers\nsource \nsource \nsource \nsource \n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n# Install Prereq's & Services\napt install -y wget\nwget -N http://files.webuzo.com/install.sh\nchmod +x install.sh\n./install.sh\nsleep 2\nsystemctl start webuzo.service\n\n# firewall\nufw allow 25\nufw allow 53\nufw allow 587\nufw allow 2002\nufw allow 2003\nufw allow 2004\nufw allow 2005\n\n# Cleanup \nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":401706,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WireGuard® One-Click","description":"WireGuard One-Click","ordinal":120,"logo_url":"assets/Wireguard.svg","images":["linode/ubuntu22.04"],"deployments_total":9394,"deployments_active":292,"is_public":true,"mine":false,"created":"2019-03-08T21:11:36","updated":"2023-12-12T13:28:24","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n# \n\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### Set hostname, Apt configuration and update/upgrade\n\nset_hostname\napt_setup_update\n\napt install wireguard wireguard-tools linux-headers-$(uname -r) -y\n\nif [[ \"$PORT\" != \"51820\" ]]; then\n PORT=\"$PORT\"\nfi\n\n# Wireguard\n\nwg genkey | tee ~/wg-private.key | wg pubkey > ~/wg-public.key\n\nPRIVATEKEY=`cat ~/wg-private.key`\n\ncat </etc/wireguard/wg0.conf\n[Interface]\nPrivateKey = $PRIVATEKEY\nAddress = $PRIVATEIP\nListenPort = $PORT\nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -A FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -D FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\nSaveConfig = true\n[Peer]\nPublicKey = $PEERPUBKEY\nAllowedIPs = $PRIVATEIP_CLIENT\nEndpoint = $ENDPOINT:$PORT\nEND\n\n### Enable Port Forwarding\nsed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf\nsysctl -p /etc/sysctl.conf\nsysctl --system\n\n### Services\n\n# wg-quick up wg0. #### Removed to let systemctl manage the service\nsystemctl enable wg-quick@wg0\nsystemctl start wg-quick@wg0\nwg show\nufw_install\nufw allow \"$PORT\"/udp\nufw enable\n\nsystemctl restart wg-quick@wg0\n\nstackscript_cleanup","user_defined_fields":[{"name":"port","label":"Port","example":"51820","default":"51820"},{"name":"privateip","label":"Tunnel IP","example":"10.0.0.1/24, 172.16.0.1/24, 192.168.1.1/24, etc","default":"10.0.1.1/24"},{"name":"peerpubkey","label":"WireGuard Public Key (Client)","default":""},{"name":"privateip_client","label":"Tunnel IP (Client)","example":"10.0.0.2/24, 172.16.0.2/24, 192.168.1.2/24 etc","default":"10.0.1.2/24"},{"name":"endpoint","label":"Endpoint IP (Client)","default":""}]},{"id":401708,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WooCommerce One-Click","description":"WooCommerce One-Click","ordinal":121,"logo_url":"assets/WooCommerce.svg","images":["linode/ubuntu22.04"],"deployments_total":4330,"deployments_active":213,"is_public":true,"mine":false,"created":"2019-03-08T21:12:57","updated":"2023-12-12T09:55:21","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-woocommerce\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":741207,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Yacht One-Click","description":"Yacht One-Click","ordinal":122,"logo_url":"assets/yacht.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":972,"deployments_active":16,"is_public":true,"mine":false,"created":"2021-01-26T21:52:26","updated":"2023-12-12T15:36:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Yacht Settings \n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-yacht\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # yacht vars\n \n if [[ -n ${YEMAIL} ]]; then\n echo \"yemail: ${YEMAIL}\" >> ${group_vars};\n fi\n\n if [[ -n ${COMPOSE_SUPPORT} ]]; then\n echo \"compose_support: ${COMPOSE_SUPPORT}\" >> ${group_vars};\n fi\n\n if [[ -n ${YTHEME} ]]; then\n echo \"yacht_theme: ${YTHEME}\" >> ${group_vars};\n fi\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"yemail","label":"Yacht Email","example":"admin@yacht.local","default":"admin@yacht.local"},{"name":"compose_support","label":"Yacht Compose Support","example":"Yes","default":"Yes","oneof":"Yes,No"},{"name":"ytheme","label":"Yacht Theme","example":"Default","default":"Default","oneof":"Default,RED,OMV"}]},{"id":741208,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Zabbix One-Click","description":"Zabbix One-Click","ordinal":123,"logo_url":"assets/zabbix.svg","images":["linode/centos-stream8"],"deployments_total":1793,"deployments_active":81,"is_public":true,"mine":false,"created":"2021-01-26T21:56:54","updated":"2023-12-12T12:47:10","rev_note":"","script":"#!/bin/bash\n\n# \n\nsource \n\nsystem_set_hostname \"$HOSTNAME\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Generate files\nmkdir -p /etc/my.cnf.d/\nmkdir -p /etc/nginx/conf.d/\nmkdir -p /etc/php-fpm.d/\nmkdir -p /etc/php.d/\n# mkdir -p /etc/profile.d/\nmkdir -p /etc/motd.d/\nmkdir -p /etc/zabbix/web/\nmkdir -p /var/lib/cloud/scripts/per-instance\n\ncat </etc/my.cnf.d/zabbix.cnf\n[mysqld]\nuser = mysql\nlocal_infile = 0\n\ndatadir = /var/lib/mysql/\n\ndefault-storage-engine = InnoDB\nskip-name-resolve\nkey_buffer_size = 32M\nmax_allowed_packet = 128M\ntable_open_cache = 1024\ntable_definition_cache = 1024\nmax_connections = 2000\njoin_buffer_size = 1M\nsort_buffer_size = 2M\nread_buffer_size = 256K\nread_rnd_buffer_size = 256K\nmyisam_sort_buffer_size = 1M\nthread_cache_size = 512\nopen_files_limit = 10000\nwait_timeout = 86400\n\noptimizer_switch=index_condition_pushdown=off\n\ntmp_table_size = 32M\nmax_heap_table_size = 32M\n\nbinlog_format=mixed\nbinlog_cache_size = 32M\nmax_binlog_size = 256M\nbinlog_expire_logs_seconds = 259200\n\n# innodb_page_size = 32K\ninnodb_buffer_pool_size = 512M\ninnodb_log_file_size = 256M\ninnodb_log_buffer_size = 64M\ninnodb_file_per_table = 1\ninnodb_flush_method = O_DIRECT\ninnodb_buffer_pool_instances = 4\ninnodb_write_io_threads = 4\ninnodb_read_io_threads = 4\ninnodb_adaptive_flushing = 1\ninnodb_lock_wait_timeout = 50\n\ninnodb_flush_log_at_trx_commit = 1\n\ninnodb_io_capacity = 300\ninnodb_io_capacity_max = 400\ninnodb_flush_neighbors = 0\n\ninnodb_doublewrite = 1\ninnodb_thread_concurrency = 0\n\ninnodb_purge_threads = 1\n\nserver_id = 1\nbinlog_checksum = crc32\n\ninnodb_lru_scan_depth = 512\n\ninnodb_stats_on_metadata = 0\n\nEND\n\ncat </etc/nginx/conf.d/zabbix_ssl.conf\nserver {\n listen 0.0.0.0:443 ssl http2;\n # server_name ;\n index index.php;\n\n root \\$webroot;\n charset utf8;\n set \\$webroot '/usr/share/zabbix';\n\n access_log /var/log/nginx/zabbix_access_ssl.log main;\n error_log /var/log/nginx/zabbix_error_ssl.log error;\n\n ssl_stapling on;\n ssl_stapling_verify on;\n\n #resolver 192.168.13.160 192.168.10.24;\n\n ssl_certificate /etc/ssl/certs/zabbix_example.crt;\n ssl_certificate_key /etc/ssl/private/zabbix_example.key;\n\n ssl_dhparam /etc/ssl/private/zabbix_dhparam.pem;\n\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_verify_depth 3;\n #ssl_ciphers HIGH:!aNULL:!MD5;\n ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;\n #ssl_session_cache shared:SSL:10m;\n ssl_session_cache shared:MozSSL:10m;\n ssl_session_timeout 1d;\n ssl_prefer_server_ciphers off;\n ssl_session_tickets off;\n\n add_header Strict-Transport-Security \"max-age=63072000\" always;\n add_header Content-Security-Policy-Report-Only \"default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report\";\n\n location = /favicon.ico {\n log_not_found off;\n }\n\n location / {\n index index.php;\n try_files \\$uri \\$uri/ =404;\n }\n\n location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {\n access_log off;\n expires 10d;\n }\n\n location ~ /\\.ht {\n deny all;\n }\n\n location ~ /(api\\/|conf[^\\.]|include|locale) {\n deny all;\n return 404;\n }\n\n location ~ [^/]\\.php(/|$) {\n fastcgi_pass unix:/run/php-fpm/zabbix.sock;\n fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n fastcgi_index index.php;\n\n fastcgi_param DOCUMENT_ROOT /usr/share/zabbix;\n fastcgi_param SCRIPT_FILENAME /usr/share/zabbix\\$fastcgi_script_name;\n fastcgi_param PATH_TRANSLATED /usr/share/zabbix\\$fastcgi_script_name;\n\n include fastcgi_params;\n fastcgi_param QUERY_STRING \\$query_string;\n fastcgi_param REQUEST_METHOD \\$request_method;\n fastcgi_param CONTENT_TYPE \\$content_type;\n fastcgi_param CONTENT_LENGTH \\$content_length;\n\n fastcgi_intercept_errors on;\n fastcgi_ignore_client_abort off;\n fastcgi_connect_timeout 60;\n fastcgi_send_timeout 180;\n fastcgi_read_timeout 180;\n fastcgi_buffer_size 128k;\n fastcgi_buffers 4 256k;\n fastcgi_busy_buffers_size 256k;\n fastcgi_temp_file_write_size 256k;\n }\n}\n\nEND\n\ncat </etc/nginx/conf.d/zabbix.conf\nserver {\n listen 0.0.0.0:80;\n # server_name zabbix;\n\n return 301 https://\\$host\\$request_uri;\n}\n\nEND\n\ncat </etc/nginx/nginx.conf\n# For more information on configuration, see:\n# * Official English Documentation: http://nginx.org/en/docs/\n# * Official Russian Documentation: http://nginx.org/ru/docs/\n\nuser nginx;\nworker_processes auto;\nworker_priority -5;\nworker_rlimit_nofile 256000;\n\nerror_log /var/log/nginx/error.log;\n\npid /run/nginx.pid;\n\n# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.\ninclude /usr/share/nginx/modules/*.conf;\n\nevents {\n worker_connections 5120;\n use epoll;\n multi_accept on;\n}\n\n\nhttp {\n include /etc/nginx/mime.types;\n default_type application/octet-stream;\n\n log_format main\n '\\$http_x_forwarded_for - \\$remote_user [\\$time_local] '\n '\"\\$request\" \\$status \\$bytes_sent '\n '\"\\$http_referer\" \"\\$http_user_agent\" '\n '\"\\$gzip_ratio\"';\n\n access_log /var/log/nginx/access.log main;\n\n open_file_cache max=200000 inactive=20s;\n open_file_cache_valid 30s;\n open_file_cache_min_uses 2;\n open_file_cache_errors on;\n\n limit_conn_zone \\$binary_remote_addr zone=perip:10m;\n limit_conn_zone \\$server_name zone=perserver:10m;\n\n client_header_timeout 5m;\n client_body_timeout 5m;\n send_timeout 5m;\n\n connection_pool_size 4096;\n client_header_buffer_size 4k;\n large_client_header_buffers 4 4k;\n request_pool_size 4k;\n\n reset_timedout_connection on;\n\n\n gzip on;\n gzip_min_length 100;\n gzip_buffers 4 8k;\n gzip_comp_level 5;\n gzip_types text/plain text/css text/xml application/x-javascript application/xml application/xhtml+xml;\n\n types_hash_max_size 2048;\n\n output_buffers 128 512k;\n postpone_output 1460;\n aio on;\n directio 512;\n\n sendfile on;\n client_max_body_size 8m;\n fastcgi_intercept_errors on;\n\n tcp_nopush on;\n tcp_nodelay on;\n\n keepalive_timeout 75 20;\n\n ignore_invalid_headers on;\n\n index index.php;\n server_tokens off;\n\n # Load modular configuration files from the /etc/nginx/conf.d directory.\n # See http://nginx.org/en/docs/ngx_core_module.html#include\n # for more information.\n include /etc/nginx/conf.d/*.conf;\n}\n\nEND\n\ncat </etc/php-fpm.d/zabbix.conf\n[zabbix]\nuser = apache\ngroup = apache\n\nlisten = /run/php-fpm/zabbix.sock\nlisten.acl_users = apache,nginx\nlisten.allowed_clients = 127.0.0.1\n\npm = dynamic\npm.max_children = 50\npm.start_servers = 5\npm.min_spare_servers = 5\npm.max_spare_servers = 35\n\nphp_value[session.save_handler] = files\nphp_value[session.save_path] = /var/lib/php/session\n\nphp_value[max_execution_time] = 300\nphp_value[memory_limit] = 128M\nphp_value[post_max_size] = 16M\nphp_value[upload_max_filesize] = 2M\nphp_value[max_input_time] = 300\nphp_value[max_input_vars] = 10000\n; php_value[date.timezone] = Europe/Riga\nEND\n\n# cat </etc/php.d/99-zabbix.ini\n# max_execution_time=300\n# memory_limit=128M\n# post_max_size=16M\n# upload_max_filesize=2M\n# max_input_time=300\n# always_populate_raw_post_data=-1\n# max_input_vars=10000\n# date.timezone=UTC\n# session.save_path=/var/lib/php/\n# END\n\n# cat </etc/profile.d/zabbix_welcome.sh\n# #!/bin/sh\n# #\n# myip=\\$(hostname -I | awk '{print\\$1}')\n# cat </etc/motd.d/zabbix\n********************************************************************************\n\nZabbix frontend credentials:\n\nUsername: Admin\n\nPassword: replace_password\n\n\nTo learn about available professional services, including technical suppport and training, please visit https://www.zabbix.com/services\n\nOfficial Zabbix documentation available at https://www.zabbix.com/documentation/current/\n\n\n********************************************************************************\nEND\n\n# cat </etc/systemd/system/zabbix-instance-init.service\n# [Unit]\n# After=mariadb.service\n\n# [Service]\n# ExecStart=/var/lib/cloud/scripts/per-instance/001-zabbix\n\n# [Install]\n# WantedBy=multi-user.target\n# END\n\n# cat </etc/yum.repos.d/MariaDB.repo\n# # MariaDB 10.3 CentOS repository list - created 2019-03-28 10:57 UTC\n# # http://downloads.mariadb.org/mariadb/repositories/\n# [mariadb]\n# name = MariaDB\n# baseurl = http://yum.mariadb.org/10.2/centos7-amd64\n# gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB\n# gpgcheck=1\n# END\n\ncat </etc/yum.repos.d/Nginx.repo\n[nginx-stable]\nname=nginx stable repo\nbaseurl=http://nginx.org/packages/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=1\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\n\n[nginx-mainline]\nname=nginx mainline repo\nbaseurl=http://nginx.org/packages/mainline/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=0\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\nEND\n\ncat </etc/zabbix/web/zabbix.conf.php\n 'http://localhost:9200',\n//\t'text' => 'http://localhost:9200'\n//];\n// Value types stored in Elasticsearch.\n//\\$HISTORY['types'] = ['uint', 'text'];\n\n// Used for SAML authentication.\n// Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings.\n//\\$SSO['SP_KEY']\t\t\t= 'conf/certs/sp.key';\n//\\$SSO['SP_CERT']\t\t\t= 'conf/certs/sp.crt';\n//\\$SSO['IDP_CERT']\t\t= 'conf/certs/idp.crt';\n//\\$SSO['SETTINGS']\t\t= [];\nEND\n\ncat </tmp/zabbix_server_custom.te\nmodule zabbix_server_custom 1.2;\nrequire {\n type zabbix_var_run_t;\n type tmp_t;\n type zabbix_t;\n class sock_file { create unlink write };\n class unix_stream_socket connectto;\n class process setrlimit;\n class capability dac_override;\n}\n#============= zabbix_t ==============\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:process setrlimit;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:unix_stream_socket connectto;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t tmp_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t zabbix_var_run_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:capability dac_override;\nEND\n\n# Installing RPM packages\nyum makecache\nyum -y upgrade\nyum -y install wget\nwget https://dev.mysql.com/get/mysql80-community-release-el8-3.noarch.rpm\ndnf -y install mysql80-community-release-el8-3.noarch.rpm\ndnf -y module disable mysql\ndnf -y install https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm\ndnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\ndnf -y install epel-release\ndnf -y module enable php:remi-8.1\nyum -y install cloud-init cloud-utils-growpart firewalld nginx php-fpm mysql-community-client mysql-community-server java-1.8.0-openjdk-headless zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent zabbix-get zabbix-sender zabbix-java-gateway zabbix-js\n\n\n# Configure firewalld\nsystemctl enable firewalld\nsystemctl start firewalld\nfirewall-cmd --permanent --add-service=ssh --zone=public\nfirewall-cmd --permanent --add-service=http --zone=public\nfirewall-cmd --permanent --add-service=https --zone=public\nfirewall-cmd --permanent --add-port=10051/tcp --zone=public\nfirewall-cmd --reload\n\n# Configure SELinux\nrm -rf /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.pp\ncheckmodule -M -m -o /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.te\nsemodule_package -o /tmp/zabbix_server_custom.pp -m /tmp/zabbix_server_custom.mod\nsemodule -i /tmp/zabbix_server_custom.pp\n\nsetsebool -P httpd_can_connect_zabbix=1\nsetsebool -P zabbix_can_network=1\n\n# Generate SSL certificate\nmkdir -p /etc/ssl/private\nopenssl dhparam -out /etc/ssl/private/zabbix_dhparam.pem 2048\n\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/zabbix_example.key \\\n -out /etc/ssl/certs/zabbix_example.crt -subj \"/C=LV/ST=Riga/L=Riga/O=Global Security/OU=IT Department/CN=example.zabbix.com\"\n\n# Configure Zabbix instance\nsystemctl enable mysqld\nsystemctl disable nginx\nsystemctl disable php-fpm\nsystemctl disable zabbix-server\nsystemctl enable zabbix-agent\nsystemctl enable zabbix-java-gateway\n\nsystemctl stop nginx php-fpm\n\necho \"Requires=multi-user.target\" >> /usr/lib/systemd/system/cloud-init.target\n\nsystemctl set-default cloud-init.target\n\nchown -R apache:apache /var/lib/php/\n\nchmod g+r /etc/zabbix/zabbix_server.conf\nchmod o+w /run/zabbix/\n\nchmod 755 /etc/my.cnf\nchmod -R 755 /etc/my.cnf.d/\n\nsed -i 's/^#PrintMotd yes/&\\nPrintMotd no/g' /etc/ssh/sshd_config\n\nsed -i '/^; php_value\\[date.timezone\\] /s/^; //' /etc/php-fpm.d/zabbix.conf\n\nsed -i 's/^# JavaGateway=.*/&\\nJavaGateway=127.0.0.1/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# StartJavaPollers=.*/&\\nStartJavaPollers=5/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# LISTEN_IP=.*/&\\nLISTEN_IP=\"127.0.0.1\"/g' /etc/zabbix/zabbix_java_gateway.conf\n\nescape_spec_char() {\n local var_value=$1\n\n var_value=\"${var_value//\\\\/\\\\\\\\}\"\n var_value=\"${var_value//[$'\\n']/}\"\n var_value=\"${var_value//\\//\\\\/}\"\n var_value=\"${var_value//./\\\\.}\"\n var_value=\"${var_value//\\*/\\\\*}\"\n var_value=\"${var_value//^/\\\\^}\"\n var_value=\"${var_value//\\$/\\\\$}\"\n var_value=\"${var_value//\\&/\\\\&}\"\n var_value=\"${var_value//\\[/\\\\[}\"\n var_value=\"${var_value//\\]/\\\\]}\"\n\n echo \"$var_value\"\n}\n\nsystemctl start mysqld\nsystemctl enable mysqld\nsystemctl enable nginx\nsystemctl enable php-fpm\nsystemctl enable zabbix-server\n\nDB_ROOT_TMP_PASS=$(grep 'temporary password' /var/log/mysqld.log | awk '{print $13}' | tail -1)\nWEB_PASS=$(openssl rand -base64 14)\nWEB_PASS=${WEB_PASS%?}\nINST_NAME=$(hostname)\n\nrm -f /root/.my.cnf\n\nDB_ROOT_PASS=$(MYSQL_PWD=\"$DB_ROOT_TMP_PASS\" mysql --connect-expired-password -s -N -e \"SET PASSWORD FOR root@localhost TO RANDOM;\" | awk '{print $3}')\nDB_ZBX_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_srv'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\nDB_ZBXWEB_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_web'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"CREATE DATABASE zabbix CHARACTER SET 'utf8' COLLATE 'utf8_bin'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP, ALTER, INDEX, REFERENCES ON zabbix.* TO 'zabbix_srv'@'localhost'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP ON zabbix.* TO 'zabbix_web'@'localhost'\"\n\ncat > /root/.my.cnf << EOF\n[client]\npassword=\"$DB_ROOT_PASS\"\nEOF\n\nzcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -uroot zabbix\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"UPDATE users SET passwd = MD5('$WEB_PASS') WHERE username = 'Admin'\" zabbix\n\nWEB_PASS=$(escape_spec_char \"$WEB_PASS\")\nsed -i \"s/replace_password/$WEB_PASS/g\" /etc/motd.d/zabbix\n\nsed -i \"s/replace_name/$INST_NAME/g\" /etc/zabbix/web/zabbix.conf.php\n\nDB_ZBX_PASS=$(escape_spec_char \"$DB_ZBX_PASS\")\nDB_ZBXWEB_PASS=$(escape_spec_char \"$DB_ZBXWEB_PASS\")\n\nsed -i \"s/^DBUser=.*/DBUser=zabbix_srv/g\" /etc/zabbix/zabbix_server.conf\nsed -i -e \"/^[#;] DBPassword=/s/.*/&\\nDBPassword=$DB_ZBX_PASS/\" /etc/zabbix/zabbix_server.conf\nsed -i \"s/replace_password/$DB_ZBXWEB_PASS/g\" /etc/zabbix/web/zabbix.conf.php\nsed -i \"s/replace_user/zabbix_web/g\" /etc/zabbix/web/zabbix.conf.php\n\n# Cleaning up remote machine\nrm -rf /etc/nginx/conf.d/default.conf\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n\n\n\nsystemctl start zabbix-server zabbix-agent zabbix-java-gateway\nsystemctl start nginx php-fpm\n\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]}],"page":1,"pages":1,"results":129} \ No newline at end of file +{"data":[{"id":1146319,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster Null One-Click","description":"MongoDB Cluster Null One-Click\r\nNull stackscript for 1067004","ordinal":0,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":38,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-03-23T14:00:01","updated":"2023-10-18T12:38:31","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1146324,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster Null One-Click","description":"Galera Cluster Null One-Click\r\nNull Stackscript for 1088136","ordinal":0,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":156,"deployments_active":15,"is_public":true,"mine":false,"created":"2023-03-23T14:19:14","updated":"2023-12-24T01:05:24","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1142293,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Redis Sentinel Cluster Null One-Click","description":"Redis Sentinel Cluster Null One-Click\r\nNull stackscript for 1132204","ordinal":0,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":175,"deployments_active":8,"is_public":true,"mine":false,"created":"2023-03-16T14:20:59","updated":"2023-12-17T23:45:42","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1146322,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster Null One-Click","description":"PostgreSQL Cluster Null One-Click\r\nNull Stackscript for 1068726","ordinal":0,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":230,"deployments_active":12,"is_public":true,"mine":false,"created":"2023-03-23T14:17:07","updated":"2023-12-20T17:50:48","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1226546,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Null One-Click","description":"Nomad Cluster Null One-Click","ordinal":0,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":392,"deployments_active":20,"is_public":true,"mine":false,"created":"2023-08-25T19:08:21","updated":"2023-12-14T17:37:41","rev_note":"","script":"#!/bin/bash/","user_defined_fields":[]},{"id":1226547,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Clients Null One-Click","description":"Nomad Cluster Clients One-Click","ordinal":0,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":428,"deployments_active":30,"is_public":true,"mine":false,"created":"2023-08-25T19:08:57","updated":"2023-12-14T17:40:08","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":401697,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WordPress One-Click","description":"Wordpress One Click App","ordinal":1,"logo_url":"assets/WordPress.svg","images":["linode/ubuntu22.04"],"deployments_total":65790,"deployments_active":4839,"is_public":true,"mine":false,"created":"2019-03-08T21:04:07","updated":"2023-12-28T18:03:43","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-wordpress\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":632758,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Nextcloud One-Click","description":"One Click App - Nextcloud","ordinal":2,"logo_url":"assets/nextcloud.svg","images":["linode/ubuntu22.04"],"deployments_total":19283,"deployments_active":838,"is_public":true,"mine":false,"created":"2020-02-18T16:40:45","updated":"2023-12-28T19:23:17","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## harbor Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-nextcloud\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # nextcloud vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"email DNS record SOA","default":""}]},{"id":1017300,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kali Linux One-Click","description":"Kali Linux One-Click","ordinal":3,"logo_url":"assets/kalilinux.svg","images":["linode/kali"],"deployments_total":17178,"deployments_active":467,"is_public":true,"mine":false,"created":"2022-06-21T14:38:37","updated":"2023-12-28T17:37:24","rev_note":"","script":"#!/bin/bash\n## Kali\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction headlessoreverything {\n if [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"Yes\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $EVERYTHING == \"Yes\" ] && [ $HEADLESS == \"No\" ]; then\n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"No\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-headless -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"No\" ] && [ $EVERYTHING == \"No\" ]; then \n echo \"No Package Selected\"\n fi\n}\n\nfunction vncsetup {\n if [ $VNC == \"Yes\" ]; then \n ## XFCE & VNC Config\n apt-get install xfce4 xfce4-goodies dbus-x11 tigervnc-standalone-server expect -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n\n readonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\n sleep 2\n killvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\n kill $killvncprocess\n touch /etc/systemd/system/vncserver@.service\n cat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start vncserver@1.service\n systemctl enable vncserver@1.service\n\n cat < /etc/motd\n###################################\n# VNC SSH Tunnel Instructions #\n###################################\n\n* Ensure you have a VNC Client installed on your local machine\n* Run the command below to start the SSH tunnel for VNC \n\n ssh -L 61000:localhost:5901 -N -l $USERNAME $FQDN\n\n* For more Detailed documentation please visit the offical Documentation below\n\n https://www.linode.com/docs/products/tools/marketplace/guides/kalilinux\n\n### To remove this message, you can edit the /etc/motd file ###\nEOF\n fi\n}\n\nfunction main {\n headlessoreverything\n vncsetup\n stackscript_cleanup\n}\n\nmain","user_defined_fields":[{"name":"everything","label":"Would you like to Install the Kali Everything Package?","oneof":"Yes,No","default":"Yes"},{"name":"headless","label":"Would you like to Install the Kali Headless Package?","oneof":"Yes,No","default":"No"},{"name":"vnc","label":"Would you like to setup VNC to access Kali XFCE Desktop","oneof":"Yes,No","default":"Yes"},{"name":"username","label":"The VNC user to be created for the Linode. The username accepts only lowercase letters, numbers, dashes (-) and underscores (_)"},{"name":"password","label":"The password for the limited VNC user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA records (Requires API token)","default":""}]},{"id":593835,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plesk One-Click","description":"Plesk is the leading secure WordPress and website management platform. This Stackscript installs the latest publicly available Plesk, activates a trial license, installs essential extensions, and sets up and configures the firewall. Please allow the script around 15 minutes to finish.","ordinal":4,"logo_url":"assets/plesk.svg","images":["linode/centos7","linode/ubuntu20.04"],"deployments_total":10600,"deployments_active":494,"is_public":true,"mine":false,"created":"2019-09-26T17:34:17","updated":"2023-12-28T13:43:49","rev_note":"updated wording","script":"#!/bin/bash\n# This block defines the variables the user of the script needs to input\n# when deploying using this script.\n#\n## Enable logging\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction pleskautoinstall {\n echo \"Downloading Plesk Auto-Installer\"\n sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)\n echo \"turning on http2\"\n /usr/sbin/plesk bin http2_pref --enable\n}\n\nfunction firewall {\n echo \"Setting Firewall to allow proper ports.\"\n if [ \"${detected_distro[distro]}\" = 'centos' ]; then \n iptables -I INPUT -p tcp --dport 21 -j ACCEPT\n iptables -I INPUT -p tcp --dport 22 -j ACCEPT\n iptables -I INPUT -p tcp --dport 25 -j ACCEPT\n iptables -I INPUT -p tcp --dport 80 -j ACCEPT\n iptables -I INPUT -p tcp --dport 110 -j ACCEPT\n iptables -I INPUT -p tcp --dport 143 -j ACCEPT\n iptables -I INPUT -p tcp --dport 443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 465 -j ACCEPT\n iptables -I INPUT -p tcp --dport 993 -j ACCEPT\n iptables -I INPUT -p tcp --dport 995 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8447 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8880 -j ACCEPT\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n ufw allow 21\n ufw allow 22\n ufw allow 25\n ufw allow 80\n ufw allow 110\n ufw allow 143\n ufw allow 443\n ufw allow 465\n ufw allow 993\n ufw allow 995\n ufw allow 8443\n ufw allow 8447\n ufw allow 8880\nelse \necho \"Distro Not supported\"\nfi\n}\n\nfunction main {\n pleskautoinstall\n firewall\n}\n\n# Execute script\nsystem_update\nmain\nstackscript_cleanup","user_defined_fields":[]},{"id":595742,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"cPanel One-Click","description":"cPanel One-Click","ordinal":5,"logo_url":"assets/cpanel.svg","images":["linode/almalinux8","linode/rocky8"],"deployments_total":28421,"deployments_active":1007,"is_public":true,"mine":false,"created":"2019-09-30T20:17:52","updated":"2023-12-28T19:28:58","rev_note":"","script":"#!/bin/bash\nset -e\n\n# Commit: fde6587e08ea95321ce010e52a9c1b8d02455a97\n# Commit date: 2023-02-13 17:00:46 -0600\n# Generated: 2023-02-17 11:00:28 -0600\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\necho $(date +%Y%m%d%H%M%S) >> /tmp/cpdebug.log\n\n# Linode's Weblish console will truncate lines unless you do this tput smam. This\n# instructs the terminal to wrap your lines, which is especially important so that\n# the WHM login URL that gets printed at the end can be copied.\ntput smam\n\nsource /etc/os-release\n\nis_os_and_version_id_prefix() {\n [[ $ID == $1 ]] && [[ $VERSION_ID =~ ^$2 ]]\n}\n\nis_almalinux8() {\n is_os_and_version_id_prefix almalinux 8\n}\n\nis_centos7() {\n is_os_and_version_id_prefix centos 7\n}\n\nis_cloudlinux7() {\n is_os_and_version_id_prefix cloudlinux 7\n}\n\nis_cloudlinux8() {\n is_os_and_version_id_prefix cloudlinux 8\n}\n\nis_rocky8() {\n is_os_and_version_id_prefix rocky 8\n}\n\nis_ubuntu20() {\n is_os_and_version_id_prefix ubuntu 20.04\n}\n\nis_supported_os() {\n is_almalinux8 || \\\n is_centos7 || \\\n is_cloudlinux7 || \\\n is_cloudlinux8 || \\\n is_rocky8 || \\\n is_ubuntu20\n}\n\nhas_yum() {\n which yum >/dev/null 2>&1\n}\n\nhas_dnf() {\n which dnf >/dev/null 2>&1\n}\n\nhas_apt() {\n which apt >/dev/null 2>&1\n}\n\nis_networkmanager_enabled() {\n systemctl is-enabled NetworkManager.service > /dev/null 2>&1\n}\n\n# cPanel & WHM is incompatible with NetworkManager\nif is_networkmanager_enabled; then\n systemctl stop NetworkManager.service\n systemctl disable NetworkManager.service\n if has_dnf; then\n dnf -y remove NetworkManager\n elif has_yum; then\n yum -y remove NetworkManager\n fi\nfi\n\nhostnamectl set-hostname server.hostname.tld\n\ncd /home && curl -so installer -L https://securedownloads.cpanel.net/latest\n\nif is_supported_os; then\n if is_ubuntu20; then\n apt-get -o Acquire::ForceIPv4=true update -y\n DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\n sh installer --skiplicensecheck --skip-cloudlinux\n else\n sh installer --skiplicensecheck\n fi\nelse\n echo \"Your distribution is not supported by this StackScript.\"\n install -d -v -m 711 /var/cpanel\n touch /var/cpanel/cpinit.failed\nfi\n\nrm -f /etc/cpupdate.conf\ncat > /root/.bash_profile <<'END_OF_BASH_PROFILE'\n# .bash_profile\n# Get the aliases and functions\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n# User specific environment and startup programs\nPATH=$PATH:$HOME/bin\nexport PATH\nbash /etc/motd.sh\nif [ -t 0 ]; then\n URL=`whmlogin --nowait 2> /dev/null`\n WHMLOGIN_RETURN=$?\n if [ $WHMLOGIN_RETURN == 1 ]; then\n # whmlogin doesn't support --nowait. Output a URL and hope it's accurate.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n whmlogin\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n if [ $WHMLOGIN_RETURN == 2 ]; then\n # whmlogin indicates that cpinit hasn't updated the IP/hostname yet.\n echo \"To log in to WHM as the root user, run the command 'whmlogin' to get a web address for your browser.\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n # whmlogin returned a valid URL to use.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n echo \"$URL\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n fi\n fi\nfi\nEND_OF_BASH_PROFILE\n\ncat > /etc/motd.sh <<'END_OF_MOTD'\n#!/bin/bash\nsource /etc/os-release\necho \"\n ____ _ ___ __ ___ _ __ __\n ___| _ \\ __ _ _ __ ___| | ( _ ) \\ \\ / / | | | \\/ |\n / __| |_) / _. | ._ \\ / _ \\ | / _ \\/\\ \\ \\ /\\ / /| |_| | |\\/| |\n| (__| __/ (_| | | | | __/ | | (_> < \\ V V / | _ | | | |\n \\___|_| \\__._|_| |_|\\___|_| \\___/\\/ \\_/\\_/ |_| |_|_| |_|\n\"\necho \"Welcome to cPanel & WHM `/usr/local/cpanel/cpanel -V`\"\necho \"\"\necho \"Running $PRETTY_NAME\"\necho \"\"\necho \"For our full cPanel & WHM documentation: https://go.cpanel.net/docs\"\necho \"\"\necho \"For information on how to quickly set up a website in cPanel & WHM: https://go.cpanel.net/buildasite\"\necho \"\" # This new line makes output from bash_profiles easier to read\nEND_OF_MOTD\ntouch /var/cpanel/cpinit.done","user_defined_fields":[]},{"id":691621,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Cloudron One-Click","description":"Cloudron One-Click","ordinal":6,"logo_url":"assets/cloudron.svg","images":["linode/ubuntu20.04"],"deployments_total":13901,"deployments_active":628,"is_public":true,"mine":false,"created":"2020-11-30T21:21:45","updated":"2023-12-28T07:22:13","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\nwget https://cloudron.io/cloudron-setup\nchmod +x cloudron-setup\n./cloudron-setup --provider linode-mp\n\necho All finished! Rebooting...\n(sleep 5; reboot) &","user_defined_fields":[]},{"id":692092,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Secure Your Server One-Click","description":"Secure Your Server One-Click","ordinal":7,"logo_url":"assets/secureyourserver.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":4824,"deployments_active":753,"is_public":true,"mine":false,"created":"2020-12-03T10:01:28","updated":"2023-12-27T20:54:09","rev_note":"","script":"#!/usr/bin/env bash\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n#\n\n## Block Storage\n#\n#\n\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source Linode Helpers\nsource \nsource \nsource \nsource \n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode. (lower case only)"},{"name":"password","label":"The password for the limited sudo user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode"},{"name":"disable_root","label":"Would you like to disable root login over SSH?","oneof":"Yes,No"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address. This is used for creating DNS records and website VirtualHost configuration.","default":""},{"name":"send_email","label":"Would you like to be able to send email from this domain? (Requires domain)","oneof":"Yes,No","default":"No"},{"name":"volume","label":"To use a Block Storage volume, enter its name here.","default":""},{"name":"volume_size","label":"If creating a new Block Storage volume, enter its size in GB (NOTE: This creates a billable resource at $0.10/month per GB).","default":""}]},{"id":925722,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pritunl One-Click","description":"Pritunl One-Click","ordinal":8,"logo_url":"assets/pritunl.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":1193,"deployments_active":75,"is_public":true,"mine":false,"created":"2021-10-26T15:23:37","updated":"2023-12-27T11:51:08","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nfail2ban_install\n\n# Mongo Install\napt-get install -y wget gnupg dirmngr \nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Pritunl\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv E162F504A20CDF15827F718D4B7C549A058F8B6B\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.pritunl.com/stable/apt buster main\" | tee /etc/apt/sources.list.d/pritunl.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb http://repo.pritunl.com/stable/apt focal main\" | tee /etc/apt/sources.list.d/pritunl.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\n\napt update -y\napt install -y pritunl\n\nsystemctl enable pritunl.service\nsystemctl start pritunl.service\n\n# Performance tune\necho \"* hard nofile 64000\" >> /etc/security/limits.conf\necho \"* soft nofile 64000\" >> /etc/security/limits.conf\necho \"root hard nofile 64000\" >> /etc/security/limits.conf\necho \"root soft nofile 64000\" >> /etc/security/limits.conf\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA record","default":""}]},{"id":741206,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CyberPanel One-Click","description":"CyberPanel One-Click","ordinal":9,"logo_url":"assets/cyberpanel.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":11284,"deployments_active":591,"is_public":true,"mine":false,"created":"2021-01-27T02:46:19","updated":"2023-12-28T16:53:35","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### Install cyberpanel\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/cybersetup.sh )\n\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401709,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Minecraft: Java Edition One-Click","description":"Minecraft OCA","ordinal":10,"logo_url":"assets/Minecraft.svg","images":["linode/ubuntu20.04"],"deployments_total":20684,"deployments_active":351,"is_public":true,"mine":false,"created":"2019-03-08T21:13:32","updated":"2023-12-28T19:39:26","rev_note":"remove maxplayers hard coded options [oca-707]","script":"#!/usr/bin/env bash\n# Game config options:\n# https://minecraft.gamepedia.com/Server.properties\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n## Linode/SSH Security Settings - Required\n#\n#\n## Linode/SSH Settings - Optional\n#\n#\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n# Difficulty\n[[ \"$DIFFICULTY\" = \"Peaceful\" ]] && DIFFICULTY=0\n[[ \"$DIFFICULTY\" = \"Easy\" ]] && DIFFICULTY=1\n[[ \"$DIFFICULTY\" = \"Normal\" ]] && DIFFICULTY=2\n[[ \"$DIFFICULTY\" = \"Hard\" ]] && DIFFICULTY=3\n\n# Gamemode\n[[ \"$GAMEMODE\" = \"Survival\" ]] && GAMEMODE=0\n[[ \"$GAMEMODE\" = \"Creative\" ]] && GAMEMODE=1\n[[ \"$GAMEMODE\" = \"Adventure\" ]] && GAMEMODE=2\n[[ \"$GAMEMODE\" = \"Spectator\" ]] && GAMEMODE=3\n\n# Player Idle Timeout\n[[ \"$PLAYERIDLETIMEOUT\" = \"Disabled\" ]] && PLAYERIDLETIMEOUT=0\n\n# Minecraft-specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\nsystem_install_package mailutils postfix curl netcat wget file bzip2 \\\n gzip unzip bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux openjdk-17-jre dirmngr software-properties-common\n\n# Install LinuxGSM and Minecraft and enable the 'mcserver' service\nreadonly GAMESERVER='mcserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Minecraft configurations\nsed -i s/server-ip=/server-ip=\"$IP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Customer config\nsed -i s/allow-flight=false/allow-flight=\"$ALLOWFLIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/allow-nether=true/allow-nether=\"$ALLOWNETHER\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/announce-player-achievements=true/announce-player-achievements=\"$ANNOUNCEPLAYERACHIEVEMENTS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/difficulty=1/difficulty=\"$DIFFICULTY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-command-block=false/enable-command-block=\"$ENABLECOMMANDBLOCK\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-query=true/enable-query=\"$ENABLEQUERY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/force-gamemode=false/force-gamemode=\"$FORCEGAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/gamemode=0/gamemode=\"$GAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/generate-structures=true/generate-structures=\"$GENERATESTRUCTURES\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/hardcore=false/hardcore=\"$HARDCORE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-name=world/level-name=\"$LEVELNAME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-seed=/level-seed=\"$LEVELSEED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-type=DEFAULT/level-type=\"$LEVELTYPE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-build-height=256/max-build-height=\"$MAXBUILDHEIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-players=20/max-players=\"$MAXPLAYERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-tick-time=60000/max-tick-time=\"$MAXTICKTIME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-world-size=29999984/max-world-size=\"$MAXWORLDSIZE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/motd=.*/motd=\"$MOTD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/network-compression-threshold=256/network-compression-threshold=\"$NETWORKCOMPRESSIONTHRESHOLD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/op-permission-level=4/op-permission-level=\"$OPPERMISSIONLEVEL\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/player-idle-timeout=0/player-idle-timeout=\"$PLAYERIDLETIMEOUT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/pvp=true/pvp=\"$PVP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/resource-pack-sha1=/resource-pack-sha1=\"$RESOURCEPACKSHA1\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/server-port=25565/server-port=\"$PORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/snooper-enabled=true/snooper-enabled=\"$SNOOPERENABLED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-animals=true/spawn-animals=\"$SPAWNANIMALS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-monsters=true/spawn-monsters=\"$SPAWNMONSTERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-npcs=true/spawn-npcs=\"$SPAWNNPCS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/use-native-transport=true/use-native-transport=\"$USENATIVETRANSPORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/view-distance=10/view-distance=\"$VIEWDISTANCE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/rcon.password=*/rcon.password=\"\\\"$RCONPASSWORD\\\"\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-rcon=false/enable-rcon=true/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Start the service and setup firewall\nufw allow \"$PORT\"\nufw allow \"25575\"\n\n# Start and enable the Minecraft service\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"levelname","label":"World Name","default":"world"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"allowflight","label":"Flight Enabled","oneof":"true,false","default":"false"},{"name":"allownether","label":"Nether World Enabled","oneof":"true,false","default":"true"},{"name":"announceplayerachievements","label":"Player Achievements Enabled","oneof":"true,false","default":"true"},{"name":"maxplayers","label":"Maximum Players","default":"25"},{"name":"playeridletimeout","label":"Player Idle Timeout Limit","oneof":"Disabled,15,30,45,60","default":"Disabled"},{"name":"difficulty","label":"Difficulty Level","oneof":"Peaceful,Easy,Normal,Hard","default":"Easy"},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"true,false","default":"false"},{"name":"pvp","label":"PvP Enabled","oneof":"true,false","default":"true"},{"name":"forcegamemode","label":"Force Game Mode Enabled","oneof":"true,false","default":"false"},{"name":"leveltype","label":"World Type","oneof":"DEFAULT,AMPLIFIED,FLAT,LEGACY","default":"DEFAULT"},{"name":"levelseed","label":"World Seed","default":""},{"name":"spawnanimals","label":"Spawn Animals Enabled","oneof":"true,false","default":"true"},{"name":"spawnmonsters","label":"Spawn Monsters Enabled","oneof":"true,false","default":"true"},{"name":"spawnnpcs","label":"Spawn NPCs Enabled","oneof":"true,false","default":"true"},{"name":"gamemode","label":"Game Mode","oneof":"Survival,Creative,Adventure,Spectator","default":"Survival"},{"name":"generatestructures","label":"Structure Generation Enabled","oneof":"true,false","default":"true"},{"name":"maxbuildheight","label":"Maximum Build Height","oneof":"50,100,200,256","default":"256"},{"name":"maxworldsize","label":"Maximum World Size","oneof":"100,1000,10000,100000,1000000,10000000,29999984","default":"29999984"},{"name":"viewdistance","label":"View Distance","oneof":"2,5,10,15,25,32","default":"10"},{"name":"enablecommandblock","label":"Command Block Enabled","oneof":"true,false","default":"false"},{"name":"enablequery","label":"Querying Enabled","oneof":"true,false","default":"true"},{"name":"enablercon","label":"Enable RCON","oneof":"true,false","default":"false"},{"name":"rconpassword","label":"RCON Password","default":""},{"name":"rconport","label":"RCON Port","default":"25575"},{"name":"maxticktime","label":"Maximum Tick Time","default":"60000"},{"name":"networkcompressionthreshold","label":"Network Compression Threshold","default":"256"},{"name":"oppermissionlevel","label":"Op-permission Level","oneof":"1,2,3,4","default":"4"},{"name":"port","label":"Port Number","default":"25565"},{"name":"snooperenabled","label":"Snooper Enabled","oneof":"true,false","default":"true"},{"name":"usenativetransport","label":"Use Native Transport Enabled","oneof":"true,false","default":"true"},{"name":"username","label":"The username for the Linode's non-root admin/SSH user(must be lowercase)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's non-root admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":869129,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"aaPanel One-Click","description":"aaPanel One-Click","ordinal":11,"logo_url":"assets/aapanel.svg","images":["linode/centos7"],"deployments_total":5467,"deployments_active":320,"is_public":true,"mine":false,"created":"2021-07-20T18:50:46","updated":"2023-12-27T22:20:27","rev_note":"","script":"#!/bin/bash\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Yum Update\nyum update -y\n\n# Install aapanel\nyum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && echo y|bash install.sh aapanel\n\n# Log aaPanel login information\nbt default > /root/.aapanel_info\n\n# Stackscript Cleanup\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[]},{"id":923033,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Akaunting One-Click","description":"Akaunting One-Click","ordinal":12,"logo_url":"assets/akaunting.svg","images":["linode/ubuntu22.04"],"deployments_total":647,"deployments_active":22,"is_public":true,"mine":false,"created":"2021-10-18T01:01:19","updated":"2023-12-27T22:12:47","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# \n# \n# \n# \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nDEBIAN_FRONTEND=noninteractive apt-get update -qq >/dev/null\n\n###########################################################\n# Install NGINX\n###########################################################\napt-get install -y nginx\n\ncat <<'END' >/var/www/html/index.html\n\n \n \n \n \n \n\n Installing Akaunting\n\n \n \n\n \n \n\n \n
\n
\n \n
\n\n
\n \n
\n
\n

Installing...

Get back after 3 minutes!

\n
\n
\n \n\nEND\n\nchown www-data:www-data /var/www/html/index.html\nchmod 644 /var/www/html/index.html\n\n###########################################################\n# MySQL\n###########################################################\napt install -y mariadb-server expect\n\nfunction mysql_secure_install {\n # $1 - required - Root password for the MySQL database\n [ ! -n \"$1\" ] && {\n printf \"mysql_secure_install() requires the MySQL database root password as its only argument\\n\"\n return 1;\n }\n local -r db_root_password=\"$1\"\n local -r secure_mysql=$(\nexpect -c \"\nset timeout 10\nspawn mysql_secure_installation\nexpect \\\"Enter current password for root (enter for none):\\\"\nsend \\\"$db_root_password\\r\\\"\nexpect \\\"Change the root password?\\\"\nsend \\\"n\\r\\\"\nexpect \\\"Remove anonymous users?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Disallow root login remotely?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Remove test database and access to it?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Reload privilege tables now?\\\"\nsend \\\"y\\r\\\"\nexpect eof\n\")\n printf \"$secure_mysql\\n\"\n}\n\n# Set DB root password\necho \"mysql-server mysql-server/root_password password ${DB_PASSWORD}\" | debconf-set-selections\necho \"mysql-server mysql-server/root_password_again password ${DB_PASSWORD}\" | debconf-set-selections\n\nmysql_secure_install \"$DB_PASSWORD\"\n\n# Create DB\necho \"CREATE DATABASE ${DB_NAME};\" | mysql -u root -p\"$DB_PASSWORD\"\n\n# create DB user with password\necho \"CREATE USER '$DBUSER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\" | mysql -u root -p\"$DB_PASSWORD\"\n\necho \"GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DBUSER'@'localhost';\" | mysql -u root -p\"$DB_PASSWORD\"\necho \"FLUSH PRIVILEGES;\" | mysql -u root -p\"$DB_PASSWORD\"\n\n\n###########################################################\n# Install PHP \n###########################################################\napt-get install -y zip unzip php-mbstring php-zip php-gd php-cli php-curl php-intl php-imap php-xml php-xsl php-tokenizer php-sqlite3 php-pgsql php-opcache php-simplexml php-fpm php-bcmath php-ctype php-json php-pdo php-mysql\n\n###########################################################\n# Akaunting\n###########################################################\nmkdir -p /var/www/akaunting \\\n && curl -Lo /tmp/akaunting.zip 'https://akaunting.com/download.php?version=latest&utm_source=linode&utm_campaign=developers' \\\n && unzip /tmp/akaunting.zip -d /var/www/html \\\n && rm -f /tmp/akaunting.zip\n\ncat </var/www/html/.env\nAPP_NAME=Akaunting\nAPP_ENV=production\nAPP_LOCALE=en-GB\nAPP_INSTALLED=false\nAPP_KEY=\nAPP_DEBUG=false\nAPP_SCHEDULE_TIME=\"09:00\"\nAPP_URL=\n\nDB_CONNECTION=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_DATABASE=${DB_NAME}\nDB_USERNAME=${DBUSER}\nDB_PASSWORD=${DBUSER_PASSWORD}\nDB_PREFIX=\n\nBROADCAST_DRIVER=log\nCACHE_DRIVER=file\nSESSION_DRIVER=file\nQUEUE_CONNECTION=sync\nLOG_CHANNEL=stack\n\nMAIL_MAILER=mail\nMAIL_HOST=localhost\nMAIL_PORT=2525\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_NAME=null\nMAIL_FROM_ADDRESS=null\n\nFIREWALL_ENABLED=false\nEND\n\ncd /var/www/html && php artisan key:generate\n\n# Install Akaunting\nphp /var/www/html/artisan install --db-host=\"localhost\" --db-name=\"$DB_NAME\" --db-username=\"$DBUSER\" --db-password=\"$DBUSER_PASSWORD\" --company-name=\"$COMPANY_NAME\" --company-email=\"$COMPANY_EMAIL\" --admin-email=\"$ADMIN_EMAIL\" --admin-password=\"$ADMIN_PASSWORD\"\n\n# Fix permissions\nchown -Rf www-data:www-data /var/www/html\nfind /var/www/html/ -type d -exec chmod 755 {} \\;\nfind /var/www/html/ -type f -exec chmod 644 {} \\;\n\n###########################################################\n# Configure NGINX\n###########################################################\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat << END > /etc/nginx/nginx.conf\n# Generic startup file.\nuser www-data;\n\n#usually equal to number of CPUs you have. run command \"grep processor /proc/cpuinfo | wc -l\" to find it\nworker_processes auto;\nworker_cpu_affinity auto;\n\nerror_log /var/log/nginx/error.log;\npid /var/run/nginx.pid;\n\n# Keeps the logs free of messages about not being able to bind().\n#daemon off;\n\nevents {\nworker_connections 1024;\n}\n\nhttp {\n# rewrite_log on;\n\ninclude mime.types;\ndefault_type application/octet-stream;\naccess_log /var/log/nginx/access.log;\nsendfile on;\n# tcp_nopush on;\nkeepalive_timeout 64;\n# tcp_nodelay on;\n# gzip on;\n #php max upload limit cannot be larger than this \nclient_max_body_size 13m;\nindex index.php index.html index.htm;\n\n# Upstream to abstract backend connection(s) for PHP.\nupstream php {\n #this should match value of \"listen\" directive in php-fpm pool\n server unix:/run/php/php$PHP_VERSION-fpm.sock;\n server 127.0.0.1:9000;\n}\n\nserver {\n listen 80 default_server;\n\n server_name _;\n\n root /var/www/html;\n\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Content-Type-Options \"nosniff\";\n\n index index.html index.htm index.php;\n\n charset utf-8;\n\n location / {\n try_files \\$uri \\$uri/ /index.php?\\$query_string;\n }\n\n # Prevent Direct Access To Protected Files\n location ~ \\.(env|log) {\n deny all;\n }\n\n # Prevent Direct Access To Protected Folders\n location ~ ^/(^app$|bootstrap|config|database|overrides|resources|routes|storage|tests|artisan) {\n deny all;\n }\n\n # Prevent Direct Access To modules/vendor Folders Except Assets\n location ~ ^/(modules|vendor)\\/(.*)\\.((?!ico|gif|jpg|jpeg|png|js\\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ {\n deny all;\n }\n\n error_page 404 /index.php;\n\n # Pass PHP Scripts To FastCGI Server\n location ~ \\.php$ {\n fastcgi_split_path_info ^(.+\\.php)(/.+)\\$;\n fastcgi_pass php;\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n include fastcgi_params;\n }\n\n location ~ /\\.(?!well-known).* {\n deny all;\n }\n}\n}\nEND\n\n# Remove installation screen\nrm -f /var/www/html/index.html\n\nservice nginx reload\n\n###########################################################\n# Firewall\n###########################################################\napt-get install ufw -y\nufw limit ssh\nufw allow http\nufw allow https\n\nufw --force enable\n\n###########################################################\n# Stackscript cleanup\n###########################################################\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"company_name","label":"Company Name","example":"My Company"},{"name":"company_email","label":"Company Email","example":"my@company.com"},{"name":"admin_email","label":"Admin Email","example":"my@company.com"},{"name":"admin_password","label":"Admin Password","example":"s3cur39a55w0r0"},{"name":"db_name","label":"MySQL Database Name","example":"akaunting"},{"name":"db_password","label":"MySQL root Password","example":"s3cur39a55w0r0"},{"name":"dbuser","label":"MySQL Username","example":"akaunting"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur39a55w0r0"}]},{"id":985374,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Enterprise Edition One-Click","description":"Ant Media Enterprise Edition One-Click","ordinal":13,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":1404,"deployments_active":72,"is_public":true,"mine":false,"created":"2022-03-08T17:39:39","updated":"2023-12-28T15:21:43","rev_note":"","script":"#!/usr/bin/env bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\nZIP_FILE=\"https://antmedia.io/linode/antmedia_2.5.3.zip\"\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":804144,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Community Edition One-Click","description":"Ant Media Server One-Click","ordinal":14,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":5729,"deployments_active":470,"is_public":true,"mine":false,"created":"2021-04-01T12:50:57","updated":"2023-12-28T18:14:38","rev_note":"","script":"#!/usr/bin/env bash \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nZIP_FILE=\"https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.5.3/ant-media-server-community-2.5.3.zip\"\n\n\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":1102900,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Apache Airflow One-Click","description":"Apache Airflow One-Click App","ordinal":15,"logo_url":"assets/apacheairflow.svg","images":["linode/ubuntu20.04"],"deployments_total":127,"deployments_active":3,"is_public":true,"mine":false,"created":"2022-12-20T17:32:08","updated":"2023-11-28T13:38:46","rev_note":"","script":"#!/bin/bash\n#\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n# install depends\nexport DEBIAN_FRONTEND=noninteractive\nsudo apt update\n#sudo apt -y upgrade\nsudo apt install -y python3-pip\nsudo apt install -y build-essential libssl-dev libffi-dev python3-dev\nsudo apt install -y python3-venv # One of the Airflow examples requires virtual environments\n\nexport AIRFLOW_HOME=~/airflow\n\n# Install Airflow using the constraints file\nAIRFLOW_VERSION=2.4.1\nPYTHON_VERSION=\"$(python3 --version | cut -d \" \" -f 2 | cut -d \".\" -f 1-2)\"\n# For example: 3.7\nCONSTRAINT_URL=\"https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt\"\n# For example: https://raw.githubusercontent.com/apache/airflow/constraints-2.4.1/constraints-3.7.txt\npip install \"apache-airflow==${AIRFLOW_VERSION}\" --constraint \"${CONSTRAINT_URL}\"\n\n# The Standalone command will initialise the database, make a user,\n# and start all components for you.\nairflow standalone &\n\n###\n# \n# systemd unit file and per component settings go here\n# \n### \n\n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${DEFAULT_RDNS};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http \nufw allow https \nsystemctl enable ufw\n\nsleep 60 \n\n## install SSL certs. required \npip install pyOpenSSL --upgrade\napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n\n## write some login details\nexport ADMIN_PASS=$(cat /root/airflow/standalone_admin_password.txt)\ncat < /etc/motd \nThe installation of Apache Airflow is now complete, and the application is running in standalone mode.\n#\nYou can log into the Airflow GUI at ${ABS_DOMAIN}\nWith the credentials: \nUsername: admin\nPassword: ${ADMIN_PASS}\n#\nStandalone mode is not recommended for production.\nEND\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1160820,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Appwrite One-Click","description":"Appwrite One-Click ","ordinal":16,"logo_url":"assets/appwrite.svg","images":["linode/ubuntu22.04"],"deployments_total":187,"deployments_active":14,"is_public":true,"mine":false,"created":"2023-04-21T13:09:13","updated":"2023-12-28T13:21:09","rev_note":"","script":"#!/bin/bash\n### linode \n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nbash ./get-docker.sh\n\n# install haveged\nsudo apt-get install -y haveged\n\n# Install Appwrite\n# Grab latest version\nappversion=$(curl -s https://api.github.com/repos/appwrite/appwrite/releases/latest | grep -oP '\"tag_name\": \"\\K.*?(?=\")')\n\ndocker run --rm \\\n --volume /var/run/docker.sock:/var/run/docker.sock \\\n --volume \"$(pwd)\"/appwrite:/usr/src/code/appwrite:rw \\\n appwrite/appwrite:$appversion sh -c \"install --httpPort=80 --httpsPort=443 --interactive=N\"\n\necho \"Installation complete!\"","user_defined_fields":[]},{"id":401699,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ark One-Click","description":"Ark - Latest One-Click","ordinal":17,"logo_url":"assets/Ark@1x.svg","images":["linode/debian11"],"deployments_total":1152,"deployments_active":6,"is_public":true,"mine":false,"created":"2019-03-08T21:05:54","updated":"2023-12-26T06:07:52","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"arkserver\"\n\nset_hostname\napt_setup_update\n\n\n# ARK specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc-s1 libstdc++6 libstdc++6:i386 \n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install ARK\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\nsed -i s/XPMultiplier=.*/XPMultiplier=\"$XPMULTIPLIER\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPassword=.*/ServerPassword=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerHardcore=.*/ServerHardcore=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPVE=.*/ServerPVE=\"$SERVERPVE\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/Message=.*/Message=\"$MOTD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/SessionName=.*/SessionName=\"$SESSIONNAME\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerAdminPassword=.*/ServerAdminPassword=\"\\\"$RCONPASSWORD\\\"\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015/udp\nufw allow 7777:7778/udp\nufw allow 27020/tcp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rconpassword","label":"RCON password"},{"name":"sessionname","label":"Server Name","default":"Ark Server"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"serverpassword","label":"Server Password","default":""},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"True,False","default":"False"},{"name":"xpmultiplier","label":"XP Multiplier","oneof":"1,1.5,2,5,10,20","default":"2"},{"name":"serverpve","label":"Server PvE","oneof":"True,False","default":"False"}]},{"id":662118,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Azuracast One-Click","description":"AzuraCast One-Click","ordinal":18,"logo_url":"assets/azuracast.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":2727,"deployments_active":193,"is_public":true,"mine":false,"created":"2020-08-12T15:50:09","updated":"2023-12-26T18:58:53","rev_note":"","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, apt configuration and update/upgrade\nset_hostname\napt_setup_update\n\n# Install GIT\napt-get update && apt-get install -q -y git\n# Cloning AzuraCast and install\nmkdir -p /var/azuracast\ncd /var/azuracast\ncurl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh > docker.sh\nchmod a+x docker.sh\nyes 'Y' | ./docker.sh setup-release\nyes '' | ./docker.sh install\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":913277,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BeEF One-Click","description":"BeEF One-Click","ordinal":19,"logo_url":"assets/beef.svg","images":["linode/ubuntu22.04"],"deployments_total":30757,"deployments_active":1149,"is_public":true,"mine":false,"created":"2021-09-30T18:28:58","updated":"2023-12-28T19:44:10","rev_note":"","script":"#!/bin/bash\n#\n# Script to install BEEF on Linode\n# \n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \nbeef_config=\"/home/beef/config.yaml\"\nkey=\"privkey.pem\"\ncert=\"fullchain.pem\"\n# System Update\napt_setup_update\n# UFW\nufw allow 80\nufw allow 443\nufw allow 3000\nfunction configure_nginx {\n apt install git nginx ruby-dev -y\n # NGINX\n mkdir -p /var/www/certs/.well-known\n chown -R www-data:www-data /var/www/certs/\n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\nfunction configure_ssl {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\nfunction create_beef_user {\n function create_beef {\n groupadd --system beef\n useradd -s /sbin/nologin --system -g beef beef\n }\n grep beef /etc/passwd\n if [ $? -eq 1 ];then\n create_beef\n else\n echo \"[INFO] beef already on the system. Deleting user\"\n deluser --remove-home beef\n create_beef\n fi\n}\nfunction configure_beef {\n git clone https://github.com/beefproject/beef.git /home/beef\n chown -R beef: /home/beef\n cd /home/beef\n cp /etc/letsencrypt/live/$FQDN/$key .\n cp /etc/letsencrypt/live/$FQDN/$cert .\n # get line number to replace\n get_https_enable=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"enable:\" | awk -F \"-\" {'print $1'})\n get_https_public_enabled=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"public_enabled:\" | awk -F \"-\" {'print $1'})\n # replacing line numebr\n sed -i \"\"$get_https_enable\"s/enable: false/enable: true/\" $beef_config\n sed -i \"\"$get_https_public_enabled\"s/public_enabled: false/public_enabled: true/\" $beef_config\n sed -i \"/key:/c\\ key: \\\"$key\\\"\" $beef_config\n sed -i \"/cert:/c\\ cert: \\\"$cert\\\"\" $beef_config\n # creds\n #sed -i \"/user:/c\\ user: \\\"beef\\\"\" $beef_config\n sed -i \"/passwd:/c\\ passwd: \\\"$BEEFPASSWORD\\\"\" $beef_config\n # install local copy of beef\n # install deps\n apt install curl git build-essential openssl libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison nodejs libcurl4-openssl-dev ruby-dev -y\n su - -s /bin/bash beef\n bundle3.0 config set --local path /home/beef/.gem\n bundle3.0 install\n gem install --user-install xmlrpc\n \n}\nfunction beef_startup {\n cat < /home/beef/start_beef\n#!/bin/bash\nfunction start_beef {\n cd /home/beef\n echo no | ./beef\n}\nstart_beef\nEOF\n chown -R beef:beef /home/beef\n chmod +x /home/beef/start_beef\n}\n \nfunction beef_job {\n cat < /etc/systemd/system/beef.service\n[Unit]\nDescription=Browser Exploitation Framework\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=beef\nGroup=beef\nExecStart=/home/beef/start_beef\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start beef\n systemctl enable beef\n}\nfunction ssl_renew_cron {\n cat </root/certbot-beef-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & BeEf\n# Debug\n# set -xo pipefail\nexport BEEF_FULL=/home/beef/fullchain.pem\nexport BEEF_PRIVKEY=/home/beef/privkey.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat \\$FULLCHAIN > \\$BEEF_FULL\ncat \\$PRIVKEY > \\$BEEF_PRIVKEY\nservice beef reload\nEND\n chmod +x /root/certbot-beef-renewal.sh\n# Setup Cron\n crontab -l > cron\n echo \"* 1 * * 1 bash /root/certbot-beef-renewal.sh\" >> cron\n crontab cron\n rm cron\n}\nfunction install_complete {\n cat < /root/beef.info\n##############################\n# BEEF INSTALLATION COMPLETE #\n##############################\nEndpoint: https://$FQDN:3000/ui/panel\nCredentials can be found here:\n/home/beef/config.yaml\nHappy hunting!\nEOF\n}\nfunction main {\n create_beef_user\n configure_nginx\n configure_ssl\n configure_beef\n beef_startup\n beef_job\n ssl_renew_cron\n install_complete\n}\nmain\n# Clean up\nstackscript_cleanup\ncat /root/beef.info","user_defined_fields":[{"name":"beefpassword","label":"BEEF Password"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode. The username cannot contain any spaces or capitol letters. For this application the username 'beef' is reserved for the application, so please choose an alternative username for this deployment.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BitNinja One-Click","description":"BitNinja One-Click","ordinal":20,"logo_url":"assets/bitninja.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":36,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T01:03:02","updated":"2023-12-17T15:10:51","rev_note":"","script":"#!bin/bash\n\n# \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nwget -qO- https://get.bitninja.io/install.sh | /bin/bash -s - --license_key=\"$license_key\" -y","user_defined_fields":[{"name":"license_key","label":"License Key"}]},{"id":1037036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Budibase One-Click","description":"Budibase One Click App","ordinal":21,"logo_url":"assets/budibase.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":447,"deployments_active":22,"is_public":true,"mine":false,"created":"2022-08-02T18:42:41","updated":"2023-12-28T17:20:38","rev_note":"","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker.io\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Install Docker Compose\ncurl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\ndocker-compose --version\n\necho \"Creating passwords for /opt/budibase/.env\"\nVAR_JWT_SECRET=$(pwgen 16)\nVAR_MINIO_ACCESS_KEY=$(pwgen 16)\nVAR_MINIO_SECRET_KEY=$(pwgen 16)\nVAR_COUCH_DB_PASSWORD=$(pwgen 16)\nVAR_REDIS_PASSWORD=$(pwgen 16)\nVAR_INTERNAL_API_KEY=$(pwgen 16)\nIP=`hostname -I | awk '{print$1}'`\n\nmkdir -p /opt/budibase\ncd /opt/budibase\necho \"Fetch budibase docker compose file\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/docker-compose.yaml -o /opt/budibase/docker-compose.yml\necho \"Fetch budibase .env template\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/.env -o /opt/budibase/.env\necho \"Set passwords in /opt/budibase/.env\"\nsed -i \"s/JWT_SECRET=testsecret/JWT_SECRET=$VAR_JWT_SECRET/\" /opt/budibase/.env\nsed -i \"s/MINIO_ACCESS_KEY=budibase/MINIO_ACCESS_KEY=$VAR_MINIO_ACCESS_KEY/\" /opt/budibase/.env\nsed -i \"s/MINIO_SECRET_KEY=budibase/MINIO_SECRET_KEY=$VAR_MINIO_SECRET_KEY/\" /opt/budibase/.env\nsed -i \"s/COUCH_DB_PASSWORD=budibase/COUCH_DB_PASSWORD=$VAR_COUCH_DB_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/REDIS_PASSWORD=budibase/REDIS_PASSWORD=$VAR_REDIS_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/INTERNAL_API_KEY=budibase/INTERNAL_API_KEY=$VAR_INTERNAL_API_KEY/\" /opt/budibase/.env\nsed -i \"s/MAIN_PORT=10000/MAIN_PORT=$BBPORT/\" /opt/budibase/.env\ndocker-compose up -d\n\ncat </etc/profile.d/budibase_welcome.sh\n#!/bin/sh\n#\nIP=$(hostname -I | awk '{print$1}')\necho \"\n********************************************************************************\nWelcome to Budibase!\nTo help keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH) and the Web UI port $BBPORT.\n********************************************************************************\n # Budibase UI: http://$IP:$BBPORT/\n # Website: https://budibase.com\n # Documentation: https://docs.budibase.com\n # Github: https://github.com/Budibase/budibase\n # Community Support: https://github.com/Budibase/budibase/discussions\n # Restart Budibase: cd /opt/budibase; docker-compose down; docker-compose up -d\n # Budibase config: /etc/budibase/.env\n\"\nEND\nchmod +x /etc/profile.d/budibase_welcome.sh\n# Enable UFW and add some rules to it\nufw enable\nufw limit ssh/tcp comment 'Rate limit the SSH port'\nufw allow $BBPORT/tcp comment \"TCP Listen port for Budibase\"\nufw --force enable\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"BBPORT","label":"Budibase Port","example":"Default: 80","default":"80"}]},{"id":869155,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Chevereto One-Click","description":"Chevereto One-Click","ordinal":22,"logo_url":"assets/chevereto.svg","images":["linode/ubuntu20.04"],"deployments_total":240,"deployments_active":6,"is_public":true,"mine":false,"created":"2021-07-20T19:07:56","updated":"2023-12-21T02:51:10","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/chevereto/linode-marketplace\n\nset -e\n\nCHEVERETO_INSTALLER_TAG=\"3.1.0\"\nWORKING_DIR=\"/var/www/html\"\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php\napt install -y mysql-server\napt install -y php\napt install -y php-{common,cli,curl,fileinfo,gd,imagick,intl,json,mbstring,mysql,opcache,pdo,pdo-mysql,xml,xmlrpc,zip}\napt install -y python3-certbot-apache software-properties-common unzip\n\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\n\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Chevereto at http://\\$myip/installer.php\n * Secure your database by running:\n > mysql_secure_installation\n * Setup email delivery at http://\\$myip/dashboard/settings/email\nFor help and more information visit https://chevereto.com\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\n\ncat >/etc/cron.d/chevereto </etc/php/7.4/apache2/conf.d/chevereto.ini <>/var/log/per-instance.log\n\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\n\nCHEVERETO_DB_HOST=localhost\nCHEVERETO_DB_PORT=3306\nCHEVERETO_DB_NAME=chevereto\nCHEVERETO_DB_USER=chevereto\nCHEVERETO_DB_PASS=$(openssl rand -hex 16)\n\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\n\necho \"[OK] Chevereto Installer $CHEVERETO_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":869158,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ClusterControl One-Click","description":"ClusterControl One-Click","ordinal":23,"logo_url":"assets/clustercontrol.svg","images":["linode/ubuntu20.04"],"deployments_total":176,"deployments_active":2,"is_public":true,"mine":false,"created":"2021-07-20T19:13:44","updated":"2023-12-27T12:55:35","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Severalnines settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\nworkdir=/tmp\nIP=`hostname -I | awk '{print$1}'`\n# if command -v dig &>/dev/null; then\n# echo -e \"\\nDetermining network interfaces.\" \n# ext_ip=$(dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null)\n# [[ ! -z $ext_ip ]] && IP=${ext_ip}\n# fi\nlog_progress() {\n\n echo \"$1\" >> /root/cc_install.log\n}\n\ninstall_cc() {\n export HOME=/root\n export USER=root\n wget --no-check-certificate https://severalnines.com/downloads/cmon/install-cc\n chmod +x install-cc\n echo \"mysql cmon password = $CMONUSER_PASSWORD\" >> /root/.cc_passwords\n echo \"mysql root password = $DBROOT_PASSWORD\" >> /root/.cc_passwords\n SEND_DIAGNOSTICS=0 S9S_CMON_PASSWORD=$CMONUSER_PASSWORD S9S_ROOT_PASSWORD=$DBROOT_PASSWORD INNODB_BUFFER_POOL_SIZE=256 ./install-cc\n}\n\nfirstboot() {\n hostnamectl set-hostname clustercontrol\n\n ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N \"\"\n ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub\n SSH_KEY=$(cat /root/.ssh/id_rsa.pub)\n\n cat < /etc/update-motd.d/99-cc-motd \n#!/bin/sh\necho \"###\"\necho \"\"\necho \"Welcome to Severalnines Database Monitoring and Management Application - ClusterControl\"\necho \"Open your web browser to http://${IP}/clustercontrol to access ClusterControl's web application\"\necho \"\"\necho \"The public SSH key (root) is:\"\necho \"$SSH_KEY\"\necho \"\"\necho \"###\"\nEND\n\n chmod +x /etc/update-motd.d/99-cc-motd\n}\n\nenable_fw() {\n ufw default deny incoming\n ufw default allow outgoing\n ufw allow ssh\n ufw allow http\n ufw allow https\n ufw allow 9999\n ufw allow 9501\n}\n\ncleanup() {\n rm -rf /tmp/* /var/tmp/* /root/scripts\n history -c\n cat /dev/null > /root/.bash_history\n unset HISTFILE\n\n apt-get -y autoremove\n apt-get -y autoclean\n\n cat /dev/null > /var/log/lastlog; cat /dev/null > /var/log/wtmp; cat /dev/null > /var/log/auth.log\n\n ufw enable\n ufw status\n\n touch /.cc-provisioned\n}\n\nlog_progress \"** Installing ClusterControl, this could take several minutes. Please wait ...\"\ninstall_cc\nlog_progress \"** Setting motd ...\"\nfirstboot\nlog_progress \"** Enabling firewall ...\"\nenable_fw\nif [[ \"$SSL\" == \"Yes\" ]]; then\n log_progress \"** Enabling Let's Encrypt SSL ...\"\n python --version | grep -q 3.\n [[ $? -eq 0 ]] && PYTHON3=1\n if [[ -n $PYTHON3 ]]; then\n apt install -y certbot python3-certbot-apache\n else\n apt install -y certbot python-certbot-apache\n fi\n\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\ncleanup\n\n# Clean up\nlog_progress \"** Stackscript cleanup please wait ...\"\nstackscript_cleanup\n\nlog_progress \"** Installation successful...\"\n/etc/update-motd.d/99-cc-motd | tee -a /root/cc_install.log\n\nsystemctl restart sshd","user_defined_fields":[{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"cmonuser_password","label":"CMON user password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above)","oneof":"Yes,No","default":"Yes"}]},{"id":401700,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CS:GO One-Click","description":"CS:GO - Latest One-Click","ordinal":24,"logo_url":"assets/CSGO2.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":2142,"deployments_active":6,"is_public":true,"mine":false,"created":"2019-03-08T21:06:26","updated":"2023-11-02T20:39:58","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"csgoserver\"\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\n#Buyanywhere\nif [[ \"$BUYANYWHERE\" = \"Enabled\" ]]; then\n BUYANYWHERE=1\nelif [[ \"$BUYANYWHERE\" = \"Disabled\" ]]; then\n BUYANYWHERE=0\nelif [[ \"$BUYANYWHERE\" = \"Terrorists Only\" ]]; then\n BUYANYWHERE=2\nelif [[ \"$BUYANYWHERE\" = \"Counter-Terrorists Only\" ]]; then\n BUYANYWHERE=3\nfi\n\n#friendlyfire\n\nif [[ \"$FRIENDLYFIRE\" = \"Enabled\" ]]; then\n FRIENDLYFIRE=1\nelif [[ \"$FRIENDLYFIRE\" = \"Disabled\" ]]; then\n FRIENDLYFIRE=0\nfi\n\nset_hostname\napt_setup_update\n\n\n# CSGO specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install CSGO\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\n> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\n\ncat <> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsv_contact \"\"\nsv_lan 0\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile 0\nsv_hibernate_when_empty 1\nsv_hibernate_ms 5\nhost_name_store 1\nhost_info_show 1\nhost_players_show 2\nexec banned_user.cfg\nexec banned_ip.cfg\nwriteid\nwriteip\nEND\n\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"hostname $SERVERNAME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_roundtime $ROUNDTIME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsed -i s/mp_buy_anywhere.*/mp_buy_anywhere\\ \"$BUYANYWHERE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_maxrounds.*/mp_maxrounds\\ \"$MAXROUNDS\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_friendlyfire.*/mp_friendlyfire\\ \"$FRIENDLYFIRE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"$MOTD\" > /home/csgoserver/serverfiles/csgo/motd.txt\n\n\nif [[ \"$FRIENDLYFIRE\" = \"1\" ]]; then\nsed -i s/ff_damage_reduction_bullets.*/ff_damage_reduction_bullets\\ 0\\.85/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade.*/ff_damage_reduction_gernade\\ 0\\.33/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade_self.*/ff_damage_reduction_gernade_self\\ 0\\.4/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_other.*/ff_damage_reduction_other\\ 1/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"sv_kick_ban_duration 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_disable_autokick 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nfi\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015\nufw allow 27020/udp\nufw allow 27005/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server."},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode CS:GO Server"},{"name":"rconpassword","label":"RCON password"},{"name":"svpassword","label":"CSGO server password","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"roundtime","label":"Round Time Limit","oneof":"5,10,15,20,60","default":"5"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,5,10,15,20","default":"10"},{"name":"buyanywhere","label":"Buy Anywhere ","oneof":"Disabled,Enabled,Counter-Terrorists Only, Terrorists Only","default":"Disabled"},{"name":"friendlyfire","label":"Friendly Fire Enabled","oneof":"Enabled,Disabled","default":"Disabled"}]},{"id":688891,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Discourse One-Click","description":"Discourse One-Click","ordinal":25,"logo_url":"assets/discourse.svg","images":["linode/ubuntu20.04"],"deployments_total":1221,"deployments_active":62,"is_public":true,"mine":false,"created":"2020-11-17T20:55:26","updated":"2023-12-23T06:50:14","rev_note":"","script":"#!/bin/bash\n\n## Discourse Settings\n\n#\n#\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n#Install dependencies needed for Discourse\napt install git apt-transport-https ca-certificates curl software-properties-common net-tools -y\n\n#Clone Discourse Docker repo for install and management\ngit clone https://github.com/discourse/discourse_docker.git /var/discourse\n#UFW Firewall Rules\nufw allow http\nufw allow https\nufw allow 25\nufw allow 465\nufw allow 587\nufw enable <\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Python & Django\napt-get install -y python3 python3-pip\npip3 install Django\n\n# Create & Setup Django APP\nmkdir /var/www/\ncd /var/www/\ndjango-admin startproject DjangoApp\ncd DjangoApp\npython3 manage.py migrate\necho \"from django.contrib.auth.models import User; User.objects.create_superuser('$DJANGOUSER', '$DJANGOUSEREMAIL', '$DJANGOUSERPASSWORD')\" | python3 manage.py shell\nsed -i \"s/ALLOWED_HOSTS = \\[\\]/ALLOWED_HOSTS = \\['$IP'\\]/g\" DjangoApp/settings.py\npython3 manage.py runserver 0.0.0.0:8000 &\n\n# Start Django app on reboot\ncrontab -l | { cat; echo \"@reboot cd /var/www/DjangoApp && python3 manage.py runserver 0.0.0.0:8000 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"djangouser","label":"Django USER","example":"user1"},{"name":"djangouserpassword","label":"Django Password","example":"s3cure_p4ssw0rd"},{"name":"djangouseremail","label":"Django USER email","example":"user@email.tld"}]},{"id":607433,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Docker One-Click","description":"Docker One Click App","ordinal":27,"logo_url":"assets/docker.svg","images":["linode/ubuntu22.04"],"deployments_total":36335,"deployments_active":1824,"is_public":true,"mine":false,"created":"2019-10-31T20:14:04","updated":"2023-12-28T19:38:20","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Docker Settings\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-docker\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":401698,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Drupal One-Click","description":"Drupal One-Click","ordinal":28,"logo_url":"assets/Drupal.svg","images":["linode/ubuntu22.04"],"deployments_total":1863,"deployments_active":83,"is_public":true,"mine":false,"created":"2019-03-08T21:04:47","updated":"2023-12-27T00:32:33","rev_note":"","script":"#!/usr/bin/env bash\n## Drupal Settings\n# \n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, apt configuration and update/upgrade\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Install/configure UFW\nufw allow http\nufw allow https\n\n# Install/configure MySQL\napt-get install mariadb-server -y\nsystemctl start mariadb\nsystemctl enable mariadb\nmysql_root_preinstall\nrun_mysql_secure_installation\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE drupaldb\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT ALL ON drupaldb.* TO 'drupal'@'localhost' IDENTIFIED BY '$DB_PASSWORD'\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\n# Install & Configure Apache\napt-get install -y apache2\ntouch /var/log/apache2/drupal-error_log /var/log/apache2/drupal-access_log\ncp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/drupal.conf\ncat < /etc/apache2/sites-available/drupal.conf\n\n DocumentRoot /var/www/drupal\n ServerName $FQDN\n ServerAlias www.$FQDN\n \n Options FollowSymLinks\n AllowOverride All\n Order allow,deny\n allow from all\n RewriteEngine on\n RewriteBase /\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteCond %{REQUEST_URI} !=/favicon.ico\n RewriteRule ^ index.php [L]\n\n ErrorLog /var/log/apache2/drupal-error_log\n CustomLog /var/log/apache2/drupal-access_log common\n\nEND\na2enmod rewrite\na2dissite 000-default.conf\na2ensite drupal.conf\nsed -ie \"s/KeepAlive Off/KeepAlive On/g\" /etc/apache2/apache2.conf\nsystemctl restart apache2\nsystemctl enable apache2\n\n# Install PHP 8.1\napt-get install php libapache2-mod-php php-mysql php-curl php-cgi php-gd php-mbstring php-xml php-xmlrpc -y\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat < /etc/php/$PHP_VERSION/apache2/php.ini\nerror_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR\nerror_log = /var/log/php/error.log\nmax_input_time = 30\nEND\nmkdir /var/log/php\nchown www-data /var/log/php\n\n# Install Drupal\nrm -r /var/www/html\ncd ~; wget -4 https://www.drupal.org/download-latest/tar.gz\ntar -xf tar.gz -C /var/www/ && mv /var/www/drupal* /var/www/drupal\nrm tar.gz\nmkdir /var/www/drupal/sites/default/files\nchmod a+w /var/www/drupal/sites/default/files\ncp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php\nchmod a+w /var/www/drupal/sites/default/settings.php\ncat <> /var/www/drupal/sites/default/settings.php\n\\$settings['trusted_host_patterns'] = [\n '^$FQDN\\$',\n];\nEND\n\n# Cleanup\nsystemctl restart apache2\nsystemctl restart mysql\n\n# SSL\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"dbroot_password","label":"MySQL root Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"db_password","label":"Database Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Drupal server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1008125,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Easypanel One-Click","description":"Easypanel One-Click","ordinal":29,"logo_url":"assets/easypanel.svg","images":["linode/ubuntu22.04"],"deployments_total":1453,"deployments_active":79,"is_public":true,"mine":false,"created":"2022-05-18T16:43:00","updated":"2023-12-27T21:35:54","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nsh get-docker.sh\n\n# setup easypanel\ndocker run --rm \\\n -v /etc/easypanel:/etc/easypanel \\\n -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n easypanel/easypanel setup","user_defined_fields":[]},{"id":691620,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"FileCloud One-Click","description":"FileCloud One-Click","ordinal":30,"logo_url":"assets/filecloud.svg","images":["linode/ubuntu20.04"],"deployments_total":806,"deployments_active":12,"is_public":true,"mine":false,"created":"2020-11-30T21:16:19","updated":"2023-12-26T18:13:28","rev_note":"","script":"#!/bin/bash \n\n## Domain Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source and run the New Linode Setup script for DNS configuration\n# This also sets some useful variables, like $IP and $FQDN\n\nsource \n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nset pipefail -o\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Allow traffic on ports 80 and 443\nufw allow 80\nufw allow 443\n\n# Installing Filecloud and Prequisites\nwget -qO - https://repo.filecloudlabs.com/static/pgp/filecloud.asc | sudo apt-key add -\nwget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\necho \"deb [ arch=amd64 ] https://repo.filecloudlabs.com/apt/ubuntu focal/filecloud/22.1 main\" | sudo tee /etc/apt/sources.list.d/filecloud.list\napt-get update -y\napt-get install apache2 mongodb-org -y\napt install -y --no-install-recommends php8.1*\nACCEPT_EULA=Y apt-get install filecloud -y\n\nif [[ \"$SSL\" == \"Yes\" ]]; then\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"ssl","label":"Would you like to use a free CertBot SSL certificate?","oneof":"Yes,No","default":"No"},{"name":"soa_email_address","label":"Email Address for Lets' Encrypt Certificate","default":""},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":609392,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Flask One-Click","description":"Flask One-Click","ordinal":31,"logo_url":"assets/flask.svg","images":["linode/debian10"],"deployments_total":2189,"deployments_active":135,"is_public":true,"mine":false,"created":"2019-11-07T06:24:17","updated":"2023-12-28T06:10:27","rev_note":"Initial import","script":"#!/bin/bash\n\n## Enable logging\nexec > /var/log/stackscript.log 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\nufw_install\nufw allow http\n\n# Install Prereq's & Flask APP\napt install -y git\ncd /home\ngit clone https://github.com/abalarin/Flask-on-Linode.git flask_app_project\n\n# Install & configure Nginx\napt install -y nginx\ncat < /etc/nginx/sites-enabled/flask_app\nserver {\n listen 80;\n server_name $IP;\n location / {\n proxy_pass http://127.0.0.1:8000;\n proxy_set_header Host \\$host;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\n\nunlink /etc/nginx/sites-enabled/default\nnginx -s reload\n\n# Install python & Packages\napt install -y python3 python3-pip\ncd /home/flask_app_project\npip3 install -r flask_app/requirements.txt\n\n# Configure Flask\ncat < /etc/config.json\n{\n \"SECRET_KEY\": \"$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)\",\n \"SQLALCHEMY_DATABASE_URI\": \"sqlite:///site.db\"\n}\nEND\n\ncat < /home/flask_app_project/flask_app/__init__.py\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_login import LoginManager\nimport json\nimport urllib3\napp = Flask(__name__)\nwith open('/etc/config.json') as config_file:\n config = json.load(config_file)\napp.config['SECRET_KEY'] = config.get('SECRET_KEY')\napp.config['SQLALCHEMY_DATABASE_URI'] = config.get('SQLALCHEMY_DATABASE_URI')\ndb = SQLAlchemy(app)\nlogin_manager = LoginManager()\nlogin_manager.init_app(app)\nfrom flask_app import routes\nEND\n\n# Install and Configure Gunicorn\napt install -y gunicorn3\ngunicorn3 --workers=3 flask_app:app &\n\n# Install and Configure Supervisor\napt install -y supervisor\ncat < /etc/supervisor/conf.d/flask_app.conf\n[program:flask_app]\ndirectory=/home/flask_app_project\ncommand=gunicorn3 --workers=3 flask_app:app\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/flask_app/flask_app.err.log\nstdout_logfile=/var/log/flask_app/flask_app.out.log\nEND\n\nmkdir /var/log/flask_app\ntouch /var/log/flask_app/flask_app.out.log\ntouch /var/log/flask_app/flask_app.err.log\nsupervisorctl reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":971045,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Focalboard One-Click","description":"Focalboard One-Click","ordinal":32,"logo_url":"assets/focalboard.svg","images":["linode/ubuntu22.04"],"deployments_total":486,"deployments_active":19,"is_public":true,"mine":false,"created":"2022-02-08T16:23:08","updated":"2023-12-23T19:23:05","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Focalboard Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-focalboard\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n #Focalboard vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1088136,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster One-Click","description":"Galera Cluster One-Click","ordinal":33,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":143,"deployments_active":9,"is_public":true,"mine":false,"created":"2022-11-15T20:41:27","updated":"2023-12-24T01:01:57","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/galera-occ\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/galera-occ\" ]; then\n rm -rf /tmp/galera-occ\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n export DEBIAN_FRONTEND=non-interactive\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # add private IP address\n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/galera-occ\n cd /tmp/galera-occ/\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip3 install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"cluster_name","label":"Cluster Name"},{"name":"token_password","label":"Your Linode API token"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Galera CA"},{"name":"common_name","label":"Common Name","default":"Galera Server"},{"name":"cluster_size","label":"Galera cluster size","default":"3","oneof":"3"}]},{"id":688911,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gitea One-Click","description":"Gitea One-Click","ordinal":34,"logo_url":"assets/gitea.svg","images":["linode/debian10"],"deployments_total":1032,"deployments_active":67,"is_public":true,"mine":false,"created":"2020-11-17T21:16:09","updated":"2023-12-27T00:54:10","rev_note":"","script":"#! /bin/bash\n\n## Database Settings\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n#assigns var for IP address\nreadonly ip=$(hostname -I | awk '{print$1}')\n\n#intall git\napt install -y git\n\n#install nginx\napt install -y nginx\n\n#install mysql and secure\nmysql_root_preinstall\napt-get install -y mariadb-server\nsystemctl start mariadb\nsystemctl enable mariadb\nrun_mysql_secure_installation\n\n#create mysql db and user\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE gitea;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE USER 'gitea'@'localhost' IDENTIFIED BY '$(printf '%q' \"$DB_PASSWORD\")';\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' WITH GRANT OPTION;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES;\"\n\n#create user for gitea\nadduser --system --disabled-password --group --shell /bin/bash --gecos 'Git Version Control' --home /home/git git\n\n#create directories for gitea\nmkdir -p /var/lib/gitea/{custom,data,log}\nchown -R git:git /var/lib/gitea/\nchmod -R 750 /var/lib/gitea/\nmkdir /etc/gitea\nchown root:git /etc/gitea\nchmod 770 /etc/gitea\n\n#pull down gitea binary\nwget -O gitea https://dl.gitea.io/gitea/1.13.0/gitea-1.13.0-linux-amd64\nchmod +x gitea\n\n#validate gpg\napt install gnupg -y\ngpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2\ngpg --verify gitea-1.13.0-linux-amd64.asc gitea-1.13.0-linux-amd64\n\n#copy gitea to global location\ncp gitea /usr/local/bin/gitea\n\n#download systemd file from gitea\nwget https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service -P /etc/systemd/system/\n\n#add requires mysql to the systemd file\nsed -i 's/#Requires=mariadb.service/Requires=mariadb.service/' /etc/systemd/system/gitea.service\n\n#start gitea as systemd service\nsystemctl daemon-reload\nsystemctl start gitea\nsystemctl enable gitea\n\n#configures ufw rules before nginx\nsystemctl start ufw\nufw allow http\nufw allow https\nufw enable\n\n#set absolute domain if any, otherwise use localhost\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=localhost\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:3000;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx\n\nsleep 60\n\n#sets certbot ssl\nif [[ $SSL = \"Yes\" ]]; then\n check_dns_propagation ${ABS_DOMAIN} ${ip}\n apt install python3-certbot-nginx -y\n certbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${EMAIL_ADDRESS} -w /var/www/html/\nfi\n\nstackscript_cleanup","user_defined_fields":[{"name":"dbroot_password","label":"MySQL root Password"},{"name":"db_password","label":"gitea Database Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records.","default":""},{"name":"subdomain","label":"The subdomain for your server (Domain required)","default":""},{"name":"domain","label":"Your domain (API Token required)","default":""},{"name":"soa_email_address","label":"SOA Email for your domain (Required for new domains)","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate for your domain?","oneof":"Yes,No","default":"No"},{"name":"email_address","label":"Admin Email for Let's Encrypt certificate","default":""}]},{"id":401707,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"GitLab One-Click","description":"GitLab One-Click","ordinal":35,"logo_url":"assets/GitLab.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":3292,"deployments_active":137,"is_public":true,"mine":false,"created":"2019-03-08T21:12:21","updated":"2023-12-26T19:10:16","rev_note":"Remove SSH Pubkey UDF","script":"#!/usr/bin/env bash\n\n## Gitlab Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction gitlab {\n # Install dependencies\n apt-get install curl ca-certificates apt-transport-https gnupg2 -y\n\n curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash\n apt-get update -y\n EXTERNAL_URL=\"https://$FQDN\" apt-get install gitlab-ce -y\n\n}\n\nfunction sslgitlab {\n # Taking advantage of Gitlab's Let's Encrypt cert capabilities\n sed -i \"s/# letsencrypt\\['enable'\\] = nil/letsencrypt\\['enable'\\] = true/g\" /etc/gitlab/gitlab.rb\n sed -i -E \"s/(# )(letsencrypt\\['auto_renew*)/\\2/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/letsencrypt['auto_renew_minute'] = nil/letsencrypt['auto_renew_minute'] = 0/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/# letsencrypt\\['contact_emails'\\] = \\[\\]/letsencrypt\\['contact_emails'\\] = \\['$SOA_EMAIL_ADDRESS']/g\" /etc/gitlab/gitlab.rb\n\n gitlab-ctl reconfigure\n}\n\nfunction firewallgitlab {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n gitlab\n firewallgitlab\n sslgitlab\n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Gitlab server's DNS records","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""}]},{"id":1102905,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gopaddle One-Click","description":"Gopaddle One-Click app","ordinal":36,"logo_url":"assets/gopaddle.svg","images":["linode/ubuntu22.04"],"deployments_total":47,"deployments_active":3,"is_public":true,"mine":false,"created":"2022-12-20T17:44:47","updated":"2023-12-28T01:26:45","rev_note":"","script":"#!/bin/bash\nexec >/var/log/stackscript.log 2>&1\n# Install Docker\napt-get update -y\napt-get install -y ca-certificates curl gnupg lsb-release\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\napt-get update -y\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get update -y\napt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\n\n# Install microk8s\napt-get install snapd -y \nsudo snap install core\nexport PATH=$PATH:/snap/bin\nsnap install microk8s --classic --channel=1.25\nsnap refresh microk8s --channel=1.25\nmicrok8s status --wait-ready\n\n\n# Install gopaddle\nmicrok8s addons repo add gp-lite https://github.com/gopaddle-io/microk8s-community-addons-gplite.git\nmicrok8s enable gopaddle-lite\n\necho Waiting for gopaddle services to move to running state ...\nmicrok8s.kubectl wait --for=condition=ready pod -l released-by=gopaddle -n gp-lite --timeout=15m\n\nRDNS=$(dnsdomainname -A | awk '{print $1}')\n\necho gopaddle-lite installation is complete ! You can now access the gopaddle dashboard @ http://$RDNS:30003/","user_defined_fields":[]},{"id":607256,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Grafana One-Click","description":"Grafana One Click App","ordinal":37,"logo_url":"assets/grafana.svg","images":["linode/debian11"],"deployments_total":847,"deployments_active":56,"is_public":true,"mine":false,"created":"2019-10-30T20:43:07","updated":"2023-12-28T16:05:01","rev_note":"","script":"#!/usr/bin/env bash\n\n### Grafana OCA\n\n## Grafana Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Source the Bash StackScript Library\nsource \n\n# Source and run the New Linode Setup script for SSH configuration\nsource \n\n# Install PreReqs\napt-get install -y apt-transport-https \\\nsoftware-properties-common \\\nwget \\\ngnupg2 \\\nsqlite3\n\nwget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\necho \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\napt-get -y update\napt-get -y install grafana\nsystemctl start grafana-server\nsystemctl enable grafana-server\n\n## reset Grafana admin password\n#grafana-cli --homepath \"/usr/share/grafana\" admin reset-admin-password $grafana_password. --not working -hmorris\necho \"Initializing DB.....\" && sleep 25\nsqlite3 /var/lib/grafana/grafana.db <\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction grav {\n apt-get install -y apache2 php libapache2-mod-php php-mysql mysql-server composer php-curl php-common php-gd php-json php-mbstring php-xml php-zip\n run_mysql_secure_installation_ubuntu20\n cd /var/www/html\n git clone https://github.com/getgrav/grav.git\n cd grav\n chown www-data:www-data -R .\n su -l www-data -s /bin/bash -c \"cd /var/www/html/grav && composer install --no-dev -o && bin/grav install && bin/gpm install admin\"\n chown www-data:www-data -R .\n}\n\nfunction apache_conf {\n cat < /etc/apache2/sites-available/grav.conf\n\nServerAdmin $SOA_EMAIL_ADDRESS\nDocumentRoot /var/www/html/grav/\nServerName $FQDN\nServerAlias www.$FQDN\n\nOptions FollowSymLinks\nAllowOverride All\nOrder allow,deny\nallow from all\n\nErrorLog /var/log/apache2/$FQDN-error_log\nCustomLog /var/log/apache2/$FQDN-access_log common\n\n\nEND\n a2enmod rewrite\n a2ensite grav.conf\n a2dissite 000-default.conf\n service apache2 restart\n}\n\nfunction ssl {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n firewall\n grav\n apache_conf\n ssl\n\n}\n\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":688914,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Guacamole One-Click","description":"Guacamole One-Click","ordinal":39,"logo_url":"assets/guacamole.svg","images":["linode/ubuntu22.04"],"deployments_total":4503,"deployments_active":67,"is_public":true,"mine":false,"created":"2020-11-17T21:28:05","updated":"2023-12-28T14:57:28","rev_note":"","script":"#!/usr/bin/env bash\n### Apache Guacamole OCA\n### Required UDFs\n## Guacamole Settings\n#\n#\n#\n#\n#\n### Optional UDFs\n## Linode/SSH Security Settings\n#\n#\n## Domain Settings\n#\n#\n#\n## Logging and other debugging helpers\n# Put bash into verbose mode\nset -o pipefail\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Imports\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n### Main Script\n## Open the needed firewall ports\nufw allow http\nufw allow https\n# Install dependencies\nsystem_install_package build-essential libcairo2-dev libpng-dev libtool-bin libossp-uuid-dev libvncserver-dev freerdp2-dev libssh2-1-dev \\\nlibtelnet-dev libwebsockets-dev libpulse-dev libvorbis-dev libwebp-dev \\\nlibssl-dev libpango1.0-dev libswscale-dev libavcodec-dev libavutil-dev \\\nlibavformat-dev\n# Download the Guacamole Server source code\n# Fetch the latest release page\nlatest_release_page=$(curl -sL https://guacamole.apache.org/releases/ | grep -m 1 -o 'href=\"/releases/[0-9.]\\+/\"')\n# Extract the version number from the release page URL\nlatest_version=$(echo $latest_release_page | grep -Eo '[0-9]\\.[0-9]+.[0-9]+')\n# Download the server component\nwget https://downloads.apache.org/guacamole/$latest_version/source/guacamole-server-$latest_version.tar.gz\ntar -xvf guacamole-server-$latest_version.tar.gz\ncd guacamole-server-$latest_version\n# Build Guacamole Server using the downloaded source code\n./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots\nmake\nmake install\n# Update installed library cache and reload systemd\nldconfig\nsystemctl daemon-reload\n# Start guacd\nsystemctl enable guacd\n## Install Guacamole Web App\n# Install Apache Tomcat\nsystem_install_package tomcat9 tomcat9-admin tomcat9-common tomcat9-user\n# Download and install the Guacamole Client\nwget https://downloads.apache.org/guacamole/$latest_version/binary/guacamole-$latest_version.war\nmv guacamole-$latest_version.war /var/lib/tomcat9/webapps/guacamole.war\nsystemctl restart tomcat9 guacd\n## Guacamole configs\nmkdir /etc/guacamole\nreadonly ENCRYPTED_GUACAMOLE_PASSWORD=\"$(echo -n \"$GUACAMOLE_PASSWORD\" | openssl md5 | awk '{print $2}')\"\ncat <> /etc/guacamole/user-mapping.xml\n\n \n \n \n \n vnc\n localhost\n 5901\n ${PASSWORD}\n \n \n\nEOF\ncat <> /etc/guacamole/guacd.conf\n[daemon]\npid_file = /var/run/guacd.pid\n#log_level = debug\n[server]\nbind_host = 127.0.0.1\nbind_port = 4822\nEOF\ncat <> /etc/guacamole/guacamole.properties\n# Hostname and port of guacamole proxy\nguacd-hostname: localhost\nguacd-port: 4822\nEOF\nsystemctl restart tomcat9 guacd\n## Install a desktop environment (XFCE) and VNC Server\n# Install XFCE & NVC\nsystem_install_package xfce4 xfce4-goodies tigervnc-standalone-server expect\n# Set the VNC Server password\nreadonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\nsystemctl restart tomcat9 guacd\nkillvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\nkill $killvncprocess\n# Create a systemd service for Tiger VNC\ntouch /etc/systemd/system/vncserver@.service\ncat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n# Start and enable the systemd service\nsystemctl start vncserver@1.service\nsystemctl enable vncserver@1.service\n## Reverse proxy for the Guacamole client\n# Install Apache\napache_install\na2enmod proxy proxy_http headers proxy_wstunnel\n# Create the VirtualHost for Guacamole\ncat < /etc/apache2/sites-available/guacamole.conf\n\n ServerName $FQDN\n ErrorLog ${APACHE_LOG_DIR}/guacamole_error.log\n CustomLog ${APACHE_LOG_DIR}/guacamole_access.log combined\n \n Require all granted\n ProxyPass http://localhost:8080/guacamole/ flushpackets=on\n ProxyPassReverse http://localhost:8080/guacamole/\n \n \n Require all granted\n ProxyPass ws://localhost:8080/guacamole/websocket-tunnel\n ProxyPassReverse ws://localhost:8080/guacamole/websocket-tunnel\n \n Header always unset X-Frame-Options\n\nEOF\n# Enable the VirtualHost\na2ensite guacamole.conf\nsystemctl restart apache2\n## HTTPS\nsystem_install_package python3-certbot-apache\ncertbot -n --apache --agree-tos --redirect --hsts --staple-ocsp --email \"$SOA_EMAIL_ADDRESS\" -d \"$FQDN\" \n## Cleanup after ourselves\nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo/VNC user to be created for the Linode"},{"name":"password","label":"The password for the limited sudo/VNC user"},{"name":"guacamole_user","label":"The username to be used with Guacamole"},{"name":"guacamole_password","label":"The password to be used with Guacamole"},{"name":"soa_email_address","label":"Email for SSL certificate"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required if filling out any of the domain-related fields.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record","default":""},{"name":"domain","label":"The domain for the Linode's DNS record","default":""}]},{"id":1102902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HaltDOS Community WAF One-Click","description":"HaltDOS Community WAF One-Click app","ordinal":40,"logo_url":"assets/haltdos.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":178,"deployments_active":8,"is_public":true,"mine":false,"created":"2022-12-20T17:34:20","updated":"2023-12-19T23:25:10","rev_note":"","script":"#!/bin/bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\necho -e \"\\n---------------HALTDOS COMMUNITY WAF SETUP---------------\"\n\nexport NEEDRESTART_SUSPEND=1\nip=`ip route get 8.8.8.8 | awk -F\"src \" 'NR==1{split($2,a,\" \");print a[1]}'`\necho -e \"Checking OS ...\"\nsource /etc/os-release > /dev/null 2>&1\narch=`uname -m`\nif [[ \"$ID\" == \"ubuntu\" || \"$ID\" == \"debian\" ]]; then\n if [[ \"$VERSION_ID\" == \"18.04\" || \"$VERSION_ID\" == \"20.04\" || \"$VERSION_ID\" == \"22.04\" || \"$VERSION_ID\" == \"11\" ]]; then\n if [ \"$arch\" != \"x86_64\" ]; then\n echo -e \"\\e[1;31m$arch is not yet supported. Supported System Architecture - x86_64 \\e[0m\"\n fi\n else\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported OS - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\n fi\nelse\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported Versions - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\nfi\n\necho -e \"Downloading dependencies ...\"\n\napt-get update &> /dev/null\n\napt-get install -y default-jdk default-jre &> /dev/null\necho \"JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/\" >> /etc/environment\nsource /etc/environment\n\necho -e \"Downloading latest binaries ...\"\n\nsource /etc/os-release > /dev/null 2>&1\nif [ \"$VERSION_ID\" == \"18.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null \n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-18/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"20.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-20/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"22.04\" ]; then\n apt-get install -y libmaxminddb-dev libmaxminddb0 mmdb-bin python2-dev python2 &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-22/hd-community-waf-x86_64.deb &> /dev/null\nelif [[ \"$ID\" == \"debian\" && \"$VERSION_ID\" == \"11\" ]]; then\n apt-get install -y sudo libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/debian-11/hd-community-waf-x86_64.deb &> /dev/null\nfi\n\napt-get install -y ./hd-community-waf.deb &> /dev/null\nrm hd-community-waf.deb\necho -e \"Haltdos Community WAF Installed\"\n\n\ncurl -s -k -o hd-community-controller.deb https://binary.haltdos.com/community/waf/gui/hd-community-controller-x86_64.deb &> /dev/null\napt-get install -y ./hd-community-controller.deb &> /dev/null\nrm hd-community-controller.deb\necho -e \"Haltdos Community Controller Installed\"\n\n\necho -e \"Haltdos Community WAF Setup Done\\n\"\necho -e \"Configure your WAF on https://$ip:9000\\n\"\nexport NEEDRESTART_SUSPEND=0","user_defined_fields":[]},{"id":912262,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Harbor One-Click","description":"Harbor One-Click","ordinal":41,"logo_url":"assets/harbor.svg","images":["linode/ubuntu22.04"],"deployments_total":291,"deployments_active":13,"is_public":true,"mine":false,"created":"2021-09-29T17:06:13","updated":"2023-12-15T12:35:33","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## harbor Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-harbor\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # harbor vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the Harbor server and Let's Encrypt SSL certificate"}]},{"id":1037037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad One-Click","description":"HashiCorp Nomad One Click App","ordinal":42,"logo_url":"assets/nomad.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":106,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-08-02T18:46:19","updated":"2023-12-21T18:36:44","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## set some variables\nexport NOMAD_DIR=/usr/bin\nexport NOMAD_PATH=${NOMAD_DIR}/nomad\nexport NOMAD_CONFIG_DIR=/etc/nomad.d\nexport NOMAD_DATA_DIR=/opt/nomad/data\nexport NOMAD_TLS_DIR=/opt/nomad/tls\nexport NOMAD_ENV_VARS=${NOMAD_CONFIG_DIR}/nomad.conf\nexport IP=$(hostname -I | awk '{print$1}')\n\n\n## install gpg\napt-get install -y gpg\n\n## Install Nomad\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\nsudo apt update -y && sudo apt install -y nomad\n\n#echo \"Start Nomad in -server mode\"\nsudo tee ${NOMAD_ENV_VARS} > /dev/null < ${NOMAD_ENV_VARS}\n[Unit]\nDescription=Nomad Agent\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nRestart=on-failure\nEnvironmentFile=/etc/nomad.d/nomad.conf\nExecStart=/usr/local/bin/nomad agent -config /etc/nomad.d $FLAGS\nExecReload=/bin/kill -HUP $MAINPID\nKillSignal=SIGTERM\nUser=root\nGroup=root\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\n## enable and start nomad\nsystemctl enable nomad\nsystemctl start nomad\n\n## Install Docker\ncurl -fsSL get.docker.com | sudo sh\n\n## Configure nginx container\ncat << EOF > /root/nginx.conf\nevents {}\n\nhttp {\n server {\n location / {\n proxy_pass http://nomad-ws;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n\n # Nomad blocking queries will remain open for a default of 5 minutes.\n # Increase the proxy timeout to accommodate this timeout with an\n # additional grace period.\n proxy_read_timeout 310s;\n\n # Nomad log streaming uses streaming HTTP requests. In order to\n # synchronously stream logs from Nomad to NGINX to the browser\n # proxy buffering needs to be turned off.\n proxy_buffering off;\n\n # The Upgrade and Connection headers are used to establish\n # a WebSockets connection.\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n\n # The default Origin header will be the proxy address, which\n # will be rejected by Nomad. It must be rewritten to be the\n # host address instead.\n proxy_set_header Origin \"\\${scheme}://\\${proxy_host}\";\n }\n }\n\n # Since WebSockets are stateful connections but Nomad has multiple\n # server nodes, an upstream with ip_hash declared is required to ensure\n # that connections are always proxied to the same server node when possible.\n upstream nomad-ws {\n ip_hash;\n server host.docker.internal:4646;\n }\n}\nEOF\n\n## start docker container\ndocker run -d --publish=8080:80 --add-host=host.docker.internal:host-gateway \\\n --mount type=bind,source=$PWD/nginx.conf,target=/etc/nginx/nginx.conf \\\n nginx:latest\n\n## firewall\nufw allow 22\nufw allow 80\nufw allow 443\nufw allow 4646\nufw allow 8080\n\ncat << EOF > /etc/motd\n#################################\n The Nomad GUI is now available at HTTP://${IP}:8080\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Nomad configurations at https://www.nomadproject.io/docs/configuration\n#################################\nEOF\n\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1226544,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster One-Click","description":"Nomad Cluster One-Click","ordinal":43,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":106,"deployments_active":8,"is_public":true,"mine":false,"created":"2023-08-25T19:05:25","updated":"2023-12-24T00:06:53","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\ngit_username=\"akamai-compute-marketplace\"\nexport GIT_REPO_1=\"https://github.com/$git_username/nomad-occ.git\"\nexport GIT_REPO_2=\"https://github.com/$git_username/nomad-client-occ.git\"\nexport DEBIAN_FRONTEND=non-interactive\nexport UUID=$(uuidgen | awk -F - '{print $1}')\nexport CLUSTER_MODE='cluster'\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-server-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n REGION=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .region)\n export REGION=\"${REGION}\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${UUID}-${REGION}\\\"]}\" \\ \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO_1} /tmp/linode\n git clone ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n # clone one branch to test \n # git clone -b develop ${GIT_REPO_1} /tmp/linode\n # git clone -b develop ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Total instance count","default":"6","oneof":"6"},{"name":"servers","label":"Nomad Server count","default":"3","oneof":"3"},{"name":"clients","label":"Nomad client size","default":"3","oneof":"3"}]},{"id":1226545,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Clients Cluster One-Click","description":"Nomad Cluster Clients One-Click","ordinal":44,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":3,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-08-25T19:07:27","updated":"2023-11-14T15:53:47","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-client-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${CLUSTER_UUID}\\\"]}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=noninteractive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n # clone one branch to test \n # git clone -b develop ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Nomad Client Count","default":"3","oneof":"3,5,7"},{"name":"consul_nomad_autojoin_token_password","label":"consul_nomad_autojoin_token generated by Nomad Server OCC"},{"name":"cluster_uuid","label":"cluster_uuid tag for the Nomad Server OCC being joined to.","# git repogit_username":"akamai-compute-marketplace","export git_repo":"https://github.com/$git_username/nomad-client-occ.git"}]},{"id":1037038,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Vault One-Click","description":"HashiCorp Vault One Click App","ordinal":45,"logo_url":"assets/vault.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":220,"deployments_active":14,"is_public":true,"mine":false,"created":"2022-08-02T18:47:32","updated":"2023-12-25T08:55:22","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nexport IP=$(hostname -I | awk '{print$1}')\nexport VAULT_ADDR=\"http://${IP}:8200\"\n\n## install gpg\napt install -y gpg\n\n## add hashicorp gpg key and repo\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg >/dev/null\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\n\n## install vault\napt update && apt install -y vault\n\n## basic vault configs\nmkdir -p /vault/data\nchown -R vault:vault /vault\ncat << EOF > /etc/vault.d/vault.hcl\nstorage \"raft\" {\n path = \"/vault/data\"\n node_id = \"node1\"\n}\n\nlistener \"tcp\" {\n address = \"${IP}:8200\"\n tls_disable = \"true\"\n}\n\ndisable_mlock = true\n\napi_addr = \"http://127.0.0.1:8200\"\ncluster_addr = \"https://127.0.0.1:8201\"\nui = true\nEOF\n\n## systemd for vault\nsystemctl enable vault.service\n\n## Start vault server and stash the tokens\nsystemctl start vault.service\ntouch /root/.vault_tokens.txt\nsleep 20\nvault operator init | grep 'Token\\|Unseal' >> /root/.vault_tokens.txt\n\n## firewall\nufw allow 22\nufw allow 8200\n\n## config info and recommendations\ncat << EOF > /etc/motd\n#####################################\n The Vault server GUI is now available at ${VAULT_ADDR}\n The randomly generate Unseal Tokens and Initial Root Token are listed in /root/.vault_tokens.txt\n ** STORE THESE VALUES SOMEWHERE SAFE AND SECURE **\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Vault configurations at https://www.vaultproject.io/docs/configuration\n######################################\nEOF\n\nsleep 20\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1177605,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Illa Builder One-Click","description":"Illa Builder One-Click App","ordinal":46,"logo_url":"assets/illabuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":101,"deployments_active":3,"is_public":true,"mine":false,"created":"2023-05-17T14:22:00","updated":"2023-12-17T22:23:44","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Sources OCA helpers\nsource \nsource \nsource \nsource \n# Apt update/upgrade\nexport DEBIAN_FRONTEND=non-interactive\napt update && apt upgrade -y\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Env config\nILLA_HOME_DIR=~/illa\nPG_VOLUMN=${ILLA_HOME_DIR}/database\nDRIVE_VOLUMN=${ILLA_HOME_DIR}/drive\n\n\n# Init\nmkdir -p ${ILLA_HOME_DIR}\nmkdir -p ${PG_VOLUMN}\nmkdir -p ${DRIVE_VOLUMN}\n\n# Run\ndocker run -d \\\n --name illa_builder \\\n -v $PG_VOLUMN:/opt/illa/database \\\n -v $DRIVE_VOLUMN:/opt/illa/drive \\\n -p 80:2022 \\\n illasoft/illa-builder:latest\n\necho \"\n********************************************************************************\nWelcome to ILLA Builder!\n********************************************************************************\n # ILLA Builder: http://\"$FQDN\"\n # Website: https://www.illacloud.com\n # Documentation: https://www.illacloud.com/docs/about-illa\n # Github: https://github.com/illacloud\n # Community Support: https://github.com/orgs/illacloud/discussions\n\"","user_defined_fields":[]},{"id":607401,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jenkins One-Click","description":"Jenkins One-Click App","ordinal":47,"logo_url":"assets/jenkins.svg","images":["linode/debian11"],"deployments_total":2025,"deployments_active":135,"is_public":true,"mine":false,"created":"2019-10-31T15:29:54","updated":"2023-12-28T10:16:47","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prereq's & Jenkins\napt install -y default-jre wget gnupg2\nwget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -\nsh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'\napt_setup_update\napt install -y jenkins\nsystemctl enable --now jenkins\n\n# Cleanup \nstackscript_cleanup","user_defined_fields":[]},{"id":869623,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"JetBackup One-Click","description":"JetBackup One-Click","ordinal":48,"logo_url":"assets/jetbackup.svg","images":["linode/centos7","linode/almalinux8"],"deployments_total":102,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-21T12:45:59","updated":"2023-11-21T02:29:13","rev_note":"","script":"#!/bin/bash\n\n# JetBackup StackScript UDF Variables\n# \n# \n#\n# The next line makes the Official cPanel StackScript available if cPanel/WHM is selected as the control panel. Do not remove this line.\n# source \n#\n# Log File Paths:\n# StackScript Log: /var/log/stackscript.log\n# cPanel/WHM installation: /var/log/stackscript-595742.log\n# Debugging: /var/log/stackscript-debug.log\n#\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>/var/log/stackscript-debug.log\necho \"PID: $$\"\nCONTROLPANEL=${CONTROLPANEL}\nRELEASE=${RELEASETIER}\nJBDIR=\"/usr/local/jetapps/etc/jetbackup5\"\n\nif [[ -z ${CONTROLPANEL} ]]; then\necho \"Error: No panel selected. Please select a panel to deploy JetBackup.\"\nexit 1\nelif [[ -d ${JBDIR} ]]; then\necho \"Error: JetBackup already installed. Aborting StackScript.\"\nexit 0\nfi\n\necho \"Installing JetApps Repository\"\nrpm --import http://repo.jetlicense.com/centOS/RPM-GPG-KEY-JETAPPS\nyum -y -q install http://repo.jetlicense.com/centOS/jetapps-repo-latest.rpm\nyum -y -q install jetapps --disablerepo=* --enablerepo=jetapps\necho \"JetApps Repository Successfully Installed.\"\n\ncpanelinstall() {\n\necho \"Running cPanel/WHM Marketplace StackScript. You can track the progress of cPanel/WHM with: tail -f /var/log/stackscript-595742.log \"\n(source /root/ssinclude-595742 >>/var/log/stackscript-595742.log 2>&1)\n\n}\n\n# JETBACKUP 5 FOR LINUX - STANDALONE INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"Linux\" ]; then\necho \"Installing JetBackup 5.\"\npackage='jetbackup5-linux'\njetapps --install $package $RELEASE\njbhostname=$(hostname)\njbhostname=\"https://${jbhostname}:3035\"\necho \"Adding a Firewall rule to open port 3035. Port 3035 must be open for access to the JetBackup 5 Linux UI.\"\nfirewall-cmd --permanent --add-port=3035/tcp\nfirewall-cmd --reload\necho \"To go to JetBackup and Accept the User Agreement, go to ${jbhostname} and enter your root login credentials.\"\necho \"To generate a one-time JetBackup 5 login URL after installation and acceptance of the EULA type the following command in the terminal:\"\necho \"jb5login\"\nfi\n\n# JETBACKUP 5 FOR CPANEL/WHM INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"cPanel/WHM\" ]; then\n\npackage='jetbackup5-cpanel'\ncpanelinstall\nsleep 2\necho \"Installing JetBackup 5.\"\njetapps --install $package $RELEASE\necho \"To log in to cPanel/WHM as root user, please enter the following command to generate a one-time login token:\"\necho \"\"\necho \"whmlogin\"\nfi\n\necho \"Review the JetBackup 5 Getting Started Guide at https://docs.jetbackup.com/v5.1/adminpanel/gettingStarted.html\"\ninstallVersion=\"$(jetbackup5 --version | cut -d ' ' -f 1,3,4 | sed \"2 d\")\"\necho \"${installVersion} Successfully Installed!\"\nrm /root/ssinclude-595742\nrm /root/StackScript\nexit 0","user_defined_fields":[{"name":"CONTROLPANEL","label":"Choose a Control Panel to use with JetBackup 5. cPanel/WHM or Linux (No Control Panel)","default":"cPanel/WHM","oneof":"cPanel/WHM,Linux"},{"name":"RELEASETIER","label":"Choose a JetBackup Release Tier.","default":"stable","oneof":"stable,beta,edge"}]},{"id":662121,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jitsi One-Click","description":"Jitsi One-Click","ordinal":49,"logo_url":"assets/jitsi.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":4539,"deployments_active":127,"is_public":true,"mine":false,"created":"2020-08-12T16:08:51","updated":"2023-12-28T02:20:05","rev_note":"","script":"#!/bin/bash\n\n## Jitsi Settings\n#\n\n## Domain Settings\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# dependencies\nexport DEBIAN_FRONTEND=noninteractive\napt install apt-transport-https gnupg2 curl wget -y\napt-add-repository universe\napt update -y\n\n#Install Jitisi dep Prosody\necho deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list\nwget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -\napt install lua5.2\n\n#Install Nginx\napt install -y nginx\nsystemctl start nginx\nsystemctl enable nginx\n\n#Install Jitsi Meet\ncurl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg'\necho 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null\n\n# update all package sources\napt update -y\necho \"jitsi-videobridge jitsi-videobridge/jvb-hostname string $FQDN\" | debconf-set-selections\necho \"jitsi-meet-web-config jitsi-meet/cert-choice select 'Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)'\" | debconf-set-selections\napt --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes install jitsi-meet\n\n# Firewall\nsudo ufw allow 80/tcp\nsudo ufw allow 443/tcp\nsudo ufw allow 10000/udp\nsudo ufw allow 22\nsudo ufw allow 3478/udp\nsudo ufw allow 5349/tcp\nsudo ufw enable\n\n# SSL \ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh <\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction lampjoomla {\n apt-get install apache2 mariadb-server php php-common libapache2-mod-php php-cli php-fpm php-mysql php-json php-opcache php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-zip -y\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cat < /etc/php/$PHP_VERSION/apache2/php.ini\nmemory_limit = 512M\nupload_max_filesize = 256M\npost_max_size = 256M \nmax_execution_time = 300\noutput_buffering = off\ndisplay_errors = off\nupload_tmp_dir = \"/var/www/html/joomla/tmp\"\nEND\n}\n\nfunction databaseconf {\n run_mysql_secure_installation\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE DATABASE joomla_db;\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER 'joomla'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla'@'localhost';\"\n}\n\nfunction apachejoomla {\n apt-get install wget unzip -y\n mkdir -p /var/www/html/joomla\n cd /tmp && wget https://downloads.joomla.org/cms/joomla4/4-1-0/Joomla_4-1-0-Stable-Full_Package.zip?format=zip\n unzip Joomla_4* -d /var/www/html/joomla\n chown -R www-data:www-data /var/www/html/joomla \n chmod -R 755 /var/www/html/joomla\n cat < /etc/apache2/sites-available/joomla.conf\n\n ServerAdmin $SOA_EMAIL_ADDRESS\n DocumentRoot /var/www/html/joomla\n ServerName $FQDN\n\n \n Options FollowSymlinks\n AllowOverride All\n Require all granted\n \n\n ErrorLog ${APACHE_LOG_DIR}/$FQDN_error.log\n CustomLog ${APACHE_LOG_DIR}/$FQDN_access.log combined\n\n\nEND\n a2ensite joomla.conf\n a2enmod rewrite\n a2enmod php$PHP_VERSION\n a2dissite 000-default.conf\n systemctl restart apache2\n\n ufw allow http\n ufw allow https\n}\nfunction ssljoomla {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\n\nfunction main {\n lampjoomla\n databaseconf\n apachejoomla\n ssljoomla\n stackscript_cleanup\n}\n# Execute script\nmain","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":985380,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Joplin One-Click","description":"Joplin One-Click","ordinal":51,"logo_url":"assets/joplin.svg","images":["linode/ubuntu22.04"],"deployments_total":430,"deployments_active":31,"is_public":true,"mine":false,"created":"2022-03-08T18:14:30","updated":"2023-12-28T03:10:04","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Joplin setup\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-joplin\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n \n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # Joplin vars\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n \n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":688912,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kepler Builder One-Click","description":"Kepler Builder One-Click","ordinal":52,"logo_url":"assets/keplerbuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":266,"deployments_active":4,"is_public":true,"mine":false,"created":"2020-11-17T21:17:33","updated":"2023-12-19T08:40:20","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-keplerbuilder\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401701,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LAMP One-Click","description":"LAMP One-Click","ordinal":53,"logo_url":"assets/LAMP.svg","images":["linode/ubuntu22.04"],"deployments_total":13799,"deployments_active":1114,"is_public":true,"mine":false,"created":"2019-03-09T02:07:09","updated":"2023-12-28T17:15:58","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LAMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-lamp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lamp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":606691,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LEMP One-Click","description":"LEMP Stack","ordinal":54,"logo_url":"assets/LEMP.svg","images":["linode/ubuntu22.04"],"deployments_total":4189,"deployments_active":309,"is_public":true,"mine":false,"created":"2019-10-27T15:29:04","updated":"2023-12-26T19:15:18","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LEMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-lemp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lemp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923032,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiteSpeed cPanel One-Click","description":"LiteSpeed cPanel One-Click","ordinal":55,"logo_url":"assets/litespeedcpanel.svg","images":["linode/almalinux8"],"deployments_total":1030,"deployments_active":25,"is_public":true,"mine":false,"created":"2021-10-18T00:57:12","updated":"2023-12-26T03:19:41","rev_note":"","script":"#!/bin/bash\n## Logging\nexec > /var/log/stackscript.log 2>&1\n## Install cPanel\nyum install -y kernel grub2\nsed -i -e \"s/GRUB_TIMEOUT=5/GRUB_TIMEOUT=10/\" /etc/default/grub\nsed -i -e \"s/crashkernel=auto rhgb console=ttyS0,19200n8/console=ttyS0,19200n8/\" /etc/default/grub\nmkdir /boot/grub\ngrub2-mkconfig -o /boot/grub/grub.cfg\nsystemctl stop firewalld.service\nsystemctl disable firewalld.service\nsystemctl stop NetworkManager\nsystemctl disable NetworkManager\nsystemctl enable network\nsystemctl start network\nyum remove NetworkManager -y\ncd /home \ncurl -o latest -L https://securedownloads.cpanel.net/latest && sh latest\nyum remove ea-apache24-mod_ruid2 -y\n## Install LSWS on cPanel\nADMIN_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo '')\ncat <>/home/lsws.options\n## 1 = enable, 0 = disable, 2 = user home directory\nphp_suexec=\"2\"\nport_offset=\"0\"\nadmin_user=\"admin\"\nadmin_pass=\"${ADMIN_PASS}\"\nadmin_email=\"root@localhost\"\neasyapache_integration=\"1\"\nauto_switch_to_lsws=\"1\"\ndeploy_lscwp=\"1\"\nEOT\nbash <( curl https://get.litespeed.sh ) TRIAL","user_defined_fields":[]},{"id":1008123,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiveSwitch One-Click","description":"LiveSwitch One-Click","ordinal":56,"logo_url":"assets/liveswitch.svg","images":["linode/ubuntu20.04"],"deployments_total":197,"deployments_active":1,"is_public":true,"mine":false,"created":"2022-05-18T16:41:37","updated":"2023-12-21T13:44:28","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\nsudo dpkg --configure -a\n\n# kill any background updater jobs\nsudo killall apt apt-get\n\n# helpers\nsudo apt-get install dialog apt-utils -y -q\n\nsudo DEBIAN_FRONTEND=noninteractive apt-get update -y\nsudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef -y\n\n# firewall\n# normal defaults\nsudo ufw default deny incoming\nsudo ufw default allow outgoing\n# ssh on\nsudo ufw allow ssh\n# dynamic inbound traffic\nsudo ufw allow 49152:65535/udp\n# TURN\nsudo ufw allow 3478/udp\n# TURN TCP\nsudo ufw allow 80/tcp\n# TURNS\nsudo ufw allow 443/tcp\n# admin (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 9090/tcp\nsudo ufw allow 9443/tcp\n# gateway (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 8080/tcp\nsudo ufw allow 8443/tcp\n\n# sip\n# sudo ufw allow 5061/udp\n# sudo ufw allow 5061/tcp\n\n# we will turn on the firewall at the end because it disconnects us\n\n# install docker\nsudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\napt-cache policy docker-ce\nsudo apt-get install -y docker-ce\n\n# entropy fix for docker\nsudo apt-get install -y haveged\n\n# install docker compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n\n# retrieve docker compose files\nmkdir -p /opt/liveswitch\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose-liveswitch.service\" -o /opt/liveswitch/docker-compose-liveswitch.service\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose.yml\" -o /opt/liveswitch/docker-compose.yml\n\n# install liveswitch docker compose\nsudo cp /opt/liveswitch/docker-compose-liveswitch.service /etc/systemd/system/\nsudo systemctl enable docker\nsudo systemctl enable docker-compose-liveswitch\nsudo systemctl start docker-compose-liveswitch\n\n# clean up some logs\nsudo rm -f /var/log/cloud-init-output.log\nsudo rm -f /var/log/dpkg.log\nsudo rm -f /var/log/kern.log\nsudo rm -f /var/log/ufw.log\n\n# turn on the firewall\nsudo ufw --force enable\nsudo reboot","user_defined_fields":[]},{"id":869159,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MagicSpam One-Click","description":"MagicSpam One-Click","ordinal":57,"logo_url":"assets/magicspam.svg","images":["linode/centos7"],"deployments_total":6,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-20T19:13:52","updated":"2023-12-11T15:26:23","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\n# source the stackscript for the selected control panel\nif [ \"$CONTROL_PANEL\" == \"cPanel\" ]; then\n # redirect ALL output to the stackscript log for future troubleshooting\n exec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n # cPanel Marketplace App install\n source \n\n # set the hostname to replicate Plesk stackscript for consistent behavior\n IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n echo $HOSTNAME > /etc/hostname\n hostname -F /etc/hostname\n echo $IPADDR $HOSTNAME >> /etc/hosts\nelif [ \"$CONTROL_PANEL\" == \"Plesk\" ]; then\n # Plesk Marketplace App install\n # NOTE: do not redirect output to the stackscript log to avoid duplicate log\n # lines as the Plesk stackscript already redirects to it\n source \nelse\n echo \"Invalid control panel option detected. Aborting...\"\n exit 1\nfi\n\n# install MagicSpam via the installer script\nwget https://www.magicspam.com/download/magicspam-installer.sh -O /root/magicspam-installer\nchmod +x /root/magicspam-installer\n/root/magicspam-installer -l \"$MS_LICENSE_KEY\"","user_defined_fields":[{"name":"control_panel","label":"The Control Panel to deploy alongside with MagicSpam. Make sure to select an Image supported by the selected Control Panel. For more information, please refer to the MagicSpam App Information Sidebar.","oneof":"cPanel,Plesk"},{"name":"ms_license_key","label":"The MagicSpam license key. Please make sure to use the appropriate license key for the selected Control Panel. For more information, please refer to the MagicSpam App information sidebar."},{"name":"hostname","label":"The server's hostname."}]},{"id":1243759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept FFmpeg Plugins Demo One-Click","description":"MainConcept FFmpeg Plugins","ordinal":58,"logo_url":"assets/mainconcept.svg","images":["linode/debian11"],"deployments_total":7,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-09-28T15:02:48","updated":"2023-12-28T02:39:55","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\n\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-ffmpeg-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""}]},{"id":1243760,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept Live Encoder Demo One-Click","description":"MainConcept Live Encoder\r\n\r\n","ordinal":59,"logo_url":"assets/mainconcept.svg","images":["linode/centos-stream9"],"deployments_total":25,"deployments_active":3,"is_public":true,"mine":false,"created":"2023-09-28T15:04:08","updated":"2023-12-24T06:51:30","rev_note":"","script":"#!/bin/bash\n\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-live-encoder-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(dnsdomainname -A | awk '{print $1}')\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n yum install dnf -y\n dnf update -y\n dnf upgrade -y\n dnf install -y git python3 python3-pip\n\n dnf makecache\n dnf install epel-release -y\n dnf makecache\n dnf install ansible -y\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SSL Generation","default":""}]},{"id":1243762,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept P2 AVC ULTRA Transcoder Demo One-Click","description":"MainConcept P2 AVC ULTRA Transcoder","ordinal":60,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:01","updated":"2023-12-07T16:54:44","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept P2 AVC Ultra Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-p2-avc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept P2 AVC Ultra Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243763,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XAVC Transcoder Demo One-Click","description":"MainConcept XAVC Transcoder","ordinal":61,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":2,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:47","updated":"2023-12-06T21:20:30","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XAVC Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xavc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XAVC Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243764,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XDCAM Transcoder Demo One-Click","description":"MainConcept XDCAM Transcoder","ordinal":62,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:06:28","updated":"2023-12-06T21:21:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XDCAM Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xdcam-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n \n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XDCAM Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1096122,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mastodon One-Click","description":"Mastodon is an open-source and decentralized micro-blogging platform, supporting federation and public access to the server.","ordinal":63,"logo_url":"assets/mastodon.svg","images":["linode/ubuntu22.04"],"deployments_total":1713,"deployments_active":62,"is_public":true,"mine":false,"created":"2022-12-05T15:57:04","updated":"2023-12-24T22:08:28","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Mastodon Settings\n#\n#\n#\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-mastodon\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n \n # write udf vars\n cat < ${group_vars}\nwebserver_stack: lemp\ndomain: ${DOMAIN}\nsubdomain: ${SUBDOMAIN}\nsoa_email_address: ${SOA_EMAIL_ADDRESS}\nowner_username: ${OWNER_USERNAME}\nowner_email: ${OWNER_EMAIL}\nsingle_user_mode: ${SINGLE_USER_MODE}\ntoken_password: ${TOKEN_PASSWORD}\nEND\n \n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"domain","label":"Domain name for your Mastodon instance.","example":"domain.tld"},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":"www"},{"name":"token_password","label":"Your Linode API token"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"owner_username","label":"Username for Mastodon Owner","example":""},{"name":"owner_email","label":"Email address for Mastodon Owner","example":"user@domain.tld"},{"name":"single_user_mode","label":"Do you want to start Mastodon in single-user mode?","oneof":"Yes,No"}]},{"id":611895,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MEAN One-Click","description":"MEAN One-Click","ordinal":64,"logo_url":"assets/mean.svg","images":["linode/ubuntu20.04"],"deployments_total":727,"deployments_active":36,"is_public":true,"mine":false,"created":"2019-11-14T04:49:44","updated":"2023-12-22T15:08:39","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MEAN Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction dependmean {\n apt-get install -y build-essential git fontconfig libpng-dev ruby ruby-dev wget gnupg\n gem install sass\n}\n\nfunction mongoinstall {\n cd && wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n echo \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\n\nfunction meaninstall {\n apt-get install -y curl software-properties-common\n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n apt-get install -y nodejs\n\n # MEAN APP CONFIGURATION\n cd && mkdir -p /opt/mean\n cd /opt/mean\n cat <> package.json\n{\n\"name\" : \"mean\",\n\"version\": \"0.0.1\"\n}\nEND\n npm install express --save\n npm install angular\n cat <> server.js\nvar express = require('express');\nvar app = express();\nvar port = 3000;\napp.get('/', function(req, res) {\nres.send('Hello World Powered By: Linode Marketplace');\n});\napp.listen(port, function(){\nconsole.log(\"Listening at port: \" + port);\n})\nEND\n # Start App on reboot\n cd && npm install pm2 -g\n pm2 start --name=\"MEAN_APP\" /opt/mean/server.js\n pm2 startup \n pm2 save\n}\n\nfunction nginxmean {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslmean {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallmean {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n dependmean\n firewallmean\n mongoinstall\n meaninstall\n nginxmean\n sslmean\n\n}\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401702,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MERN One-Click","description":"MERN One-Click","ordinal":65,"logo_url":"assets/MERN.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":1435,"deployments_active":57,"is_public":true,"mine":false,"created":"2019-03-08T21:07:40","updated":"2023-12-18T04:45:33","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3000\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install dependencies\napt-get install -y build-essential git \n\n# Install Mongodb\napt-get install -y wget gnupg\nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Install NodeJS and NPM\napt-get install -y curl software-properties-common\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \ncurl -fsSL https://deb.nodesource.com/setup_16.x | bash -\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\ncurl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get install -y nodejs\n\n# Install ExpressJS\nnpm update -g\nnpm install --global express\nnpm link express\nnpm -g install create-react-app\ncd /opt\ncreate-react-app hello-world\nnpm i --package-lock-only\nnpm audit fix\n\n# Start App on reboot\ncat < /lib/systemd/system/hello-world.service\n[Unit]\nDescription=Hello World React Application Service\nRequires=hello-world.service\nAfter=hello-world.service\n\n[Service]\nType=simple\nUser=root\nRemainAfterExit=yes\nRestart=on-failure\nWorkingDirectory=/opt/hello-world\nExecStart=npm start --host 0.0.0.0 --port=3000\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nsystemctl daemon-reload\nsystemctl start hello-world\nsystemctl enable hello-world\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1051714,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Microweber One-Click","description":"Microweber One-Click","ordinal":66,"logo_url":"assets/microweber.svg","images":["linode/ubuntu20.04"],"deployments_total":483,"deployments_active":19,"is_public":true,"mine":false,"created":"2022-09-01T15:43:41","updated":"2023-12-24T00:19:54","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/microweber/microweber\nset -o pipefail\nMICROWEBER_INSTALLER_TAG=\"1.3.1\"\nWORKING_DIR=\"/var/www/html\"\nDOWNLOAD_URL='http://updater.microweberapi.com/builds/master/microweber.zip'\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php8.1\napt install -y mysql-server\napt install -y php8.1-{bcmath,xml,fpm,mysql,iconv,xsl,zip,intl,ldap,gd,cli,dev,bz2,curl,exif,mbstring,pgsql,sqlite3,tokenizer,opcache,soap,cgi,common,imap,opcache}\napt install -y python3-certbot-apache software-properties-common unzip curl\napt install -y php-pear\npecl install -f libsodium\nsed -i 's/;opcache.enable\\s*=.*/opcache.enable=1/g' /etc/php/8.1/cli/php.ini\necho 'extension=sodium.so' > /etc/php/8.1/cli/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/fpm/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/cgi/10-sodium.ini\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Microweber at http://\\$myip/\n * Secure your database by running:\n > mysql_secure_installation\nFor help and more information visit https://microweber.org\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\ncat >/etc/cron.d/microweber </etc/php/8.1/apache2/conf.d/30-microweber.ini <>/var/log/per-instance.log\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\nMICROWEBER_DB_HOST=localhost\nMICROWEBER_DB_PORT=3306\nMICROWEBER_DB_NAME=microweber\nMICROWEBER_DB_USER=microweber\nMICROWEBER_DB_PASS=$(openssl rand -hex 16)\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\necho \"[OK] Microweber Installer $MICROWEBER_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":691614,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mist.io One-Click","description":"Mist.io One-Click","ordinal":67,"logo_url":"assets/mistio.svg","images":["linode/debian10"],"deployments_total":335,"deployments_active":1,"is_public":true,"mine":false,"created":"2020-11-30T20:25:44","updated":"2023-12-27T18:29:12","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\n# \n\n# \n\n## install docker\nsudo apt-get install -y \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n gnupg-agent \\\n software-properties-common\n\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -\n\nsudo add-apt-repository \\\n \"deb [arch=amd64] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) \\\n stable\"\n\nsudo apt-get update\n\nsudo apt-get install -y docker-ce docker-ce-cli containerd.io\n\n## install docker-compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n\nsudo chmod +x /usr/local/bin/docker-compose\n\n## get latest mist\nmkdir ~/mist && cd ~/mist\n\nexport MIST_CE_REPO=https://github.com/mistio/mist-ce/releases/latest\nexport LATEST_TAG=\"$(curl -sI \"${MIST_CE_REPO}\" | grep -Po 'tag\\/\\K(v\\S+)')\"\n\nwget https://github.com/mistio/mist-ce/releases/download/$LATEST_TAG/docker-compose.yml\n\n# set CORE_URI\nmkdir settings\nexport IP=$(ip r | grep /24 | grep -Eo \"([0-9]{1,3}[\\.]){3}[1-9]{1,3}\")\necho 'CORE_URI=\"http://'$IP'\"' > settings/settings.py\n\ndocker-compose up -d\n\nwhile !(curl -sSLf http://localhost >/dev/null); do\n sleep 5\ndone\n\ndocker-compose exec -T api ./bin/adduser --admin \"${MIST_EMAIL}\" --password \"${MIST_PASSWORD}\"","user_defined_fields":[{"name":"mist_email","label":"Mist admin user's email.","example":"Set your admin user's email."},{"name":"mist_password","label":"Mist admin user's password.","example":"Set your admin user's password."}]},{"id":609195,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB One-Click","description":"MongoDB One-Click","ordinal":68,"logo_url":"assets/mongodb.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":1757,"deployments_active":74,"is_public":true,"mine":false,"created":"2019-11-06T07:14:07","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\n## Mongo Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction mongoinstall {\n apt-get install -y wget gnupg\n if [ $MONGOVERSION == \"5.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ $MONGOVERSION == \"4.4\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\n elif [ $MONGOVERSION == \"4.2\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list\n elif [ $MONGOVERSION == \"4.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list\n fi\n\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\nfunction createmongouser {\n echo \"Creating Mongo User\" & sleep 3\n mongo < /etc/mongod.conf\n# mongod.conf\n# for documentation of all options, see:\n# http://docs.mongodb.org/manual/reference/configuration-options/\n# Where and how to store data.\nstorage:\n dbPath: /var/lib/mongodb\n journal:\n enabled: true\n# engine:\n# wiredTiger:\n# where to write logging data.\nsystemLog:\n destination: file\n logAppend: true\n path: /var/log/mongodb/mongod.log\n# network interfaces\nnet:\n port: 27017\n bindIp: 127.0.0.1\n# how the process runs\nprocessManagement:\n timeZoneInfo: /usr/share/zoneinfo\nsecurity:\n authorization: enabled\n#operationProfiling:\n#replication:\n#sharding:\n## Enterprise-Only Options:\n#auditLog:\n#snmp:\nEOF\n service mongod restart\n}\n\nfunction main {\n mongoinstall\n createmongouser \n setauth\n}\n\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"db_password","label":"Mongo Password"},{"name":"mongoversion","label":"Mongo Version","oneof":"5.0,4.4,4.2,4.0","default":"5.0"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for soa record","default":""}]},{"id":1067004,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster One-Click","description":"MongoDB replica set","ordinal":69,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":49,"deployments_active":0,"is_public":true,"mine":false,"created":"2022-09-29T18:32:36","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_PAT=\"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\"\nexport GIT_REPO=\"https://linode-solutions:${GIT_PAT}@github.com/linode-solutions/mongodb-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/mongodb-cluster\" ]; then\n rm -rf /tmp/mongodb-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction destroy_linode {\n curl -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X DELETE \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # Rename Provisioner & add Private IP \n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/mongodb-cluster\n cd /tmp/mongodb-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"cluster_name","label":"Domain Name"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Mongo CA"},{"name":"common_name","label":"Common Name","default":"Mongo Server"},{"name":"cluster_size","label":"MongoDB cluster size","default":"3","oneof":"3"}]},{"id":869127,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Moodle One-Click","description":"Moodle One-Click","ordinal":70,"logo_url":"assets/moodle.svg","images":["linode/ubuntu20.04"],"deployments_total":1326,"deployments_active":94,"is_public":true,"mine":false,"created":"2021-07-20T18:48:49","updated":"2023-12-28T18:27:00","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n## Moodle settings\n#\n#\n#\n#\n\n## Domain settings\n#\n#\n#\n\n## Linode/SSH Security Settings \n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\n# Install dependencies \napt install -y apache2 mysql-client mysql-server php libapache2-mod-php git graphviz aspell ghostscript clamav php7.4-pspell php7.4-curl php7.4-gd php7.4-intl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-ldap php7.4-zip php7.4-soap php7.4-mbstring\n\n# Firewall\nufw allow http \nufw allow https\n\n# Secure MySQL\nrun_mysql_secure_installation_ubuntu20\n\n# Install Moodle\ncd /var/www/html\ngit clone git://git.moodle.org/moodle.git\ncd moodle\ngit branch --track MOODLE_39_STABLE origin/MOODLE_39_STABLE\ngit checkout MOODLE_39_STABLE\n\n# Configure Moodle\nmkdir /var/moodledata\nchmod -R 777 /var/moodledata \nchmod -R 755 /var/www/html/moodle \n\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE USER 'moodle'@'localhost' IDENTIFIED BY '$DB_PASSWORD';\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodle'@'localhost';\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\ncat < /etc/apache2/sites-available/moodle.conf\n\n ServerAdmin admin@$FQDN\n DocumentRoot /var/www/html/moodle/\n ServerName $FQDN\n ServerAlias www.$FQDN \n \n Options +FollowSymlinks\n AllowOverride All\n Require all granted\n \n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEND\n\na2enmod rewrite\na2ensite moodle.conf\na2dissite 000-default.conf\nservice apache2 restart\n\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n/usr/bin/php admin/cli/install.php --chmod=777 --lang=en_us --wwwroot=https://$FQDN --dataroot=/var/moodledata/ --dbtype=mysqli --dbhost=localhost --dbname=moodle --dbuser=moodle --dbpass=$DB_PASSWORD --dbport=3306 --dbsocket=1 --prefix=mdl_ --fullname=moodle --shortname=moodle --summary=\"Moodle: Powered By Linode Marketplace\" --adminuser=moodle --adminpass=\"$ADMIN_PASSWORD\" --adminemail=$SOA_EMAIL_ADDRESS --upgradekey= --non-interactive --agree-license\n\nchown -R www-data: /var/www/html/moodle\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"admin_password","label":"Moodle Admin Password"},{"name":"soa_email_address","label":"Moodle Admin Email"},{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"db_password","label":"Moodle database User password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":607026,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MySQL/MariaDB One-Click","description":"MySql One Click","ordinal":71,"logo_url":"assets/mysql.svg","images":["linode/ubuntu20.04"],"deployments_total":4651,"deployments_active":343,"is_public":true,"mine":false,"created":"2019-10-29T19:03:33","updated":"2023-12-28T08:16:21","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MySQL Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3306\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\nif [[ \"$DATABASE\" == \"MySQL\" ]]; then\n # Install/configure MySQL\n apt install -y mysql-server\n # Secure MySQL install\n run_mysql_secure_installation_ubuntu20 \nelse \n # Install/configure MySQL\n apt install -y mariadb-server\n # Secure MySQL install\n run_mysql_secure_installation\nfi\n\nmysql -uroot -p$DBROOT_PASSWORD -e \"create database $DATABASE_NAME;\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER '$DBUSER' IDENTIFIED BY '$DBUSER_PASSWORD';\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON $DATABASE_NAME.* TO '$DBUSER'@'%' WITH GRANT OPTION;\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"database","label":"Would you like to install MySQL or MariaDB?","oneof":"MySQL,MariaDB"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser","label":"MySQL User","example":"user1"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"database_name","label":"Create Database","example":"testdb"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970561,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NodeJS One-Click","description":"NodeJS One-Click","ordinal":72,"logo_url":"assets/nodejs.svg","images":["linode/ubuntu20.04"],"deployments_total":2193,"deployments_active":263,"is_public":true,"mine":false,"created":"2022-02-07T17:21:41","updated":"2023-12-28T11:35:54","rev_note":"","script":"#!/usr/bin/env bash\n\n## NodeJS Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction nodejs {\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get install -y nodejs\n \n mkdir -p /opt/nodejs\n cat < /opt/nodejs/hello.js\nconst http = require('http');\n\nconst hostname = 'localhost';\nconst port = 3000;\n\nconst server = http.createServer((req, res) => {\n res.statusCode = 200;\n res.setHeader('Content-Type', 'text/plain');\n res.end('Hello World Powered By Linode Marketplace');\n});\n\nserver.listen(port, hostname, () => {\n console.log(`Server running at http://localhost:3000/`);\n});\nEND\n}\n\nfunction pm2nodejs {\n npm install pm2@latest -g --no-audit\n cd /opt/nodejs/\n pm2 start hello.js\n sleep 5\n pm2 startup systemd\n sleep 5\n pm2 save\n}\n\nfunction nginxnodejs {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslnodejs {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallnodejs {\n ufw allow http\n ufw allow https\n\n}\nfunction main {\n nodejs\n pm2nodejs\n firewallnodejs \n nginxnodejs \n sslnodejs \n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":869156,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NirvaShare One-Click","description":"NirvaShare One-Click","ordinal":73,"logo_url":"assets/nirvashare.svg","images":["linode/ubuntu22.04"],"deployments_total":217,"deployments_active":3,"is_public":true,"mine":false,"created":"2021-07-20T19:08:35","updated":"2023-12-24T01:23:57","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Nirvashare Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-nirvashare\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # Nirvashare \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":971043,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Odoo One-Click","description":"Odoo One-Click","ordinal":74,"logo_url":"assets/odoo.svg","images":["linode/ubuntu22.04"],"deployments_total":1890,"deployments_active":95,"is_public":true,"mine":false,"created":"2022-02-08T16:21:37","updated":"2023-12-28T09:33:25","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## ODOO Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-odoo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # ODOO vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1102907,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ONLYOFFICE Docs One-Click","description":"ONLYOFFICE Docs One-Click app","ordinal":75,"logo_url":"assets/onlyoffice.svg","images":["linode/ubuntu22.04"],"deployments_total":294,"deployments_active":14,"is_public":true,"mine":false,"created":"2022-12-20T17:50:23","updated":"2023-12-27T15:34:29","rev_note":"","script":"#!/usr/bin/env bash\n# \n# \n# \n\n# SSL Settings\n# \n# \n# \n# \n\n# Enable Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n\n# Get and install docker\n# curl -fsSL get.docker.com | sudo sh\napt install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \napt update\napt install -y docker-ce\nsystemctl enable --now docker.service\n\nCONTAINER_NAME=\"onlyoffice-docs\"\n\n# Run ONLYOFFICE-Docs with SSL\nif [[ \"${SSL_ENABLED}\" == \"true\" ]]; then\n\tif [[ -z ${ABS_DOMAIN} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_DOMAIN parameter for correct SSL work\"\n\t\texit 1\n\tfi\n\tif [[ -z ${LETS_ENCRYPT_MAIL} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_MAIL parameter for correct SSL work\"\n\t\texit 1\n fi\n\tsudo docker run -i -t -d -p 80:80 -p 443:443 \\\n\t\t-e JWT_ENABLED=${JWT_ENABLED} \\\n \t\t-e JWT_SECRET=${JWT_SECRET} \\\n\t\t-e LETS_ENCRYPT_DOMAIN=${ABS_DOMAIN} \\\n -e LETS_ENCRYPT_MAIL=${LETS_ENCRYPT_MAIL} \\\n\t\t-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n\t\t-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n \t-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n \t-v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n \t-v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n \t-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n\t\t--name ${CONTAINER_NAME} \\\n\t\tonlyoffice/documentserver:${DOCS_VERSION}\n\telse \n# Run ONLYOFFICE-Docs without SSL\n\tsudo docker run -i -t -d -p 80:80 \\\n -e JWT_ENABLED=${JWT_ENABLED} \\\n -e JWT_SECRET=${JWT_SECRET} \\\n -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n -v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n --name ${CONTAINER_NAME} \\\n onlyoffice/documentserver:${DOCS_VERSION}\nfi\n\n# Wait for run\nready_check() {\n echo -e \"\\e[0;32m Waiting for the launch of DocumentServer... \\e[0m\" \n for i in {1..30}; do\n echo \"Getting the DocumentServer status: ${i}\"\n OUTPUT=\"$(curl -Is http://localhost/healthcheck/ | head -1 | awk '{ print $2 }')\"\n if [ \"${OUTPUT}\" == \"200\" ]; then\n echo -e \"\\e[0;32m DocumentServer is ready \\e[0m\"\n local DS_READY\n DS_READY='yes'\n break\n else\n sleep 10\n fi\n done\n if [[ \"${DS_READY}\" != 'yes' ]]; then\n err \"\\e[0;31m Something goes wrong documentserver does not started, check logs with command --> docker logs -f ${CONTAINER_NAME} \\e[0m\"\n exit 1\n fi\n}\n\nready_check\n\n# Enable Docs-example\nsudo docker exec ${CONTAINER_NAME} supervisorctl start ds:example\n\n# Add Docs-example to autostart\nsudo docker exec ${CONTAINER_NAME} sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf\n\n# Add MOTD \ncat >/etc/motd < >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Django\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/djangosetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Reboot server\nreboot","user_defined_fields":[]},{"id":923031,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed NodeJS One-Click","description":"OpenLiteSpeed NodeJS One-Click","ordinal":77,"logo_url":"assets/openlitespeednodejs.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":510,"deployments_active":20,"is_public":true,"mine":false,"created":"2021-10-18T00:52:51","updated":"2023-12-27T19:53:52","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and NodeJS\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/nodejssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":923030,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed Rails One-Click","description":"OpenLiteSpeed Rails One-Click","ordinal":78,"logo_url":"assets/openlitespeedrails.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":52,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T00:51:05","updated":"2023-12-23T19:20:19","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Rails\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/railssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":691622,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed WordPress One-Click","description":"OpenLiteSpeed WordPress One-Click","ordinal":79,"logo_url":"assets/openlitespeedwordpress.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":8078,"deployments_active":648,"is_public":true,"mine":false,"created":"2020-11-30T21:25:01","updated":"2023-12-28T18:18:55","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### linode\n### Install OpenLiteSpeed and WordPress\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/wpimgsetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401719,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenVPN One-Click","description":"OpenVPN OCA Debian 11 & ubuntu 20","ordinal":80,"logo_url":"assets/OpenVPN.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":40613,"deployments_active":1649,"is_public":true,"mine":false,"created":"2019-03-09T03:02:02","updated":"2023-12-28T19:02:34","rev_note":"Install extra dependencies ","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Install OpenVPN dependencies\napt update && apt -y install ca-certificates wget net-tools gnupg\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian bullseye main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian focal main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelse \necho \"Distro Not Supported\"\nfi\n\n## Apt Update & Install OpenVPN\napt update -y && apt -y install openvpn-as\n\n# UFW install\nufw_install\nufw allow 1194/udp\nsed -ie \"s/DEFAULT_FORWARD_POLICY=\\\"DROP\\\"/DEFAULT_FORWARD_POLICY=\\\"ACCEPT\\\"/g\" /etc/default/ufw\n\n# Cleanup\nstackscript_cleanup\n\n# Adding to display default password as last line in LISH console\nsleep 3\ncat /usr/local/openvpn_as/init.log | grep 'To login'; echo \"(password can be changed on Admin UI)\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""}]},{"id":804172,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Owncast One-Click","description":"Owncast One-Click","ordinal":81,"logo_url":"assets/owncast.svg","images":["linode/debian10"],"deployments_total":1823,"deployments_active":83,"is_public":true,"mine":false,"created":"2021-04-01T15:24:50","updated":"2023-12-27T07:40:31","rev_note":"","script":"#!/usr/bin/bash\n#\n#\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Add owncast user\nadduser owncast --disabled-password --gecos \"\"\n\n# Install dependencies\napt-get install -y libssl-dev unzip curl\n\n# Install Owncast\nmkdir -p /opt/owncast\ncd /opt/owncast || exit\n\ncurl -s https://owncast.online/install.sh | bash\nchown -R owncast:owncast /opt/owncast\n\n# Setup Owncast as a systemd service\ncat >/etc/systemd/system/owncast.service </etc/caddy/Caddyfile </etc/motd <\n#\n#\n## LAMP Stack Settings\n#\n#\n#\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\n## Update\napt_setup_update\n\n## Local Functions used by this StackScript\nfunction owncloud_install {\n system_install_package unzip php-gd php-json php-curl php-mbstring \\\n php-intl php-imagick php-xml php-zip\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cd /var/www\n wget https://download.owncloud.com/server/stable/owncloud-complete-latest.zip\n unzip owncloud-complete-latest.zip\n chown -R www-data:www-data owncloud\n rm owncloud-complete-latest.zip\n local -a input_text=(\n \"Alias / \\\"/var/www/owncloud/\\\"\"\n \"\"\n \" Options +FollowSymlinks\"\n \" AllowOverride All\"\n \"\"\n \" Dav off\"\n \"\"\n \"SetEnv HOME /var/www/owncloud\"\n \"SetEnv HTTP_HOME /var/www/owncloud\"\n \"\"\n )\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n a2ensite owncloud\n a2enmod rewrite headers env dir mime\n sed -i '/^memory_limit =/s/=.*/= 512M/' /etc/php/$PHP_VERSION/apache2/php.ini\n systemctl restart apache2\n echo \"ownCloud is installed\"\n}\n\nfunction owncloud_vhost_configure {\n local -r fqdn=\"$1\"\n local -r soa_email_address=\"$2\"\n local -a input_text=(\n \"\"\n \" ServerName ${fqdn}\"\n \" ServerAdmin ${soa_email_address}\"\n \" DocumentRoot /var/www/owncloud\"\n \" \"\n \" Require all granted\"\n \" AllowOverride All\"\n \" Options FollowSymLinks MultiViews\"\n \" SetEnv HOME /var/www/owncloud\"\n \" SetEnv HTTP_HOME /var/www/owncloud\"\n \" \"\n \"\"\n )\n echo \"\" >> /etc/apache2/sites-available/owncloud.conf\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n}\n\n## Main Script\n# Install and configure the LAMP Stack\nlamp_stack \"$DB_NAME\" \"$DB_ROOT_PASSWORD\" \"${DB_USERNAME:-owncloud}\" \"$DB_USER_PASSWORD\"\n\n# Install ownCloud to be accessed via domain and configure the VirtualHost\nowncloud_install \"$FQDN\"\nowncloud_vhost_configure \"$FQDN\" \"$SOA_EMAIL_ADDRESS\"\n\n# Configure ownCloud - This replaces the installer GUI that was in the previous version of this OCA\nsudo -u www-data php /var/www/owncloud/occ maintenance:install \\\n --database \"mysql\" \\\n --database-name \"$DB_NAME\" \\\n --database-user \"${DB_USERNAME:-owncloud}\" \\\n --database-pass \"$DB_USER_PASSWORD\" \\\n --admin-user \"$OC_ADMIN\" \\\n --admin-pass \"$OC_ADMIN_PASSWORD\"\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 1 --value=$FQDN\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 2 --value=$IP\necho \"Trusted Domain setting added\"\n\n# Open the needed firewall ports\nufw allow http\nufw allow https\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"oc_admin","label":"The name of the admin user for ownCloud"},{"name":"oc_admin_password","label":"The password for ownCloud's admin user"},{"name":"soa_email_address","label":"Admin Email for the ownCloud server"},{"name":"db_name","label":"The name of the database","default":"owncloud"},{"name":"db_root_password","label":"The root password for the database"},{"name":"db_username","label":"The name of the database user to create","default":"owncloud"},{"name":"db_user_password","label":"The password for the created database user"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""}]},{"id":1102906,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Passky One-Click","description":"Passky One-Click app","ordinal":83,"logo_url":"assets/passky.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":186,"deployments_active":9,"is_public":true,"mine":false,"created":"2022-12-20T17:48:51","updated":"2023-12-16T14:40:12","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nInstalling...\nPlease logout and come back in few minutes.\nEOF\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\nDEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n\n# Install docker compose\nsystem_install_package docker-compose\n\n#\n# Passky Server\n#\nwget https://github.com/Rabbit-Company/Passky-Server/releases/latest/download/passky-server.tar.xz\ntar -xf passky-server.tar.xz\ncd passky-server\ncp .env.example .env\n\nSERVER_CORES=$(grep -c ^processor /proc/cpuinfo)\nIP_ADDRESS=$(system_primary_ip)\n\nsed -i \"s/SERVER_CORES=1/SERVER_CORES=$SERVER_CORES/g\" .env\nsed -i \"s/ADMIN_USERNAME=admin/ADMIN_USERNAME=$ADMINUSER/g\" .env\nsed -i \"s/ADMIN_PASSWORD=/ADMIN_PASSWORD=$ADMIN_PASSWORD/g\" .env\n\ndocker-compose up -d\n\napache_install\na2enmod proxy && a2enmod proxy_http && systemctl restart apache2\necho \"\" > /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPreserveHost On\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyRequests Off\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ServerName $WEBSITE\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPass / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPassReverse / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \"\" >> /etc/apache2/sites-available/$WEBSITE.conf\na2ensite \"$WEBSITE\"\nsystemctl restart apache2\n\n# Install SSL\nsystem_install_package python3-certbot-apache\ncat << EOF > /usr/local/bin/installCert\n#!/bin/bash\nif ! certbot -n --apache --agree-tos --redirect -d $WEBSITE -m $EMAIL; then\n echo \"There was a problem while installing SSL certificate. Make sure your A record for domain: $WEBSITE does redirect to IP: $IP_ADDRESS\"\nelse\n echo \"Certificate installed successfully.\"\nfi\nEOF\nchmod +x /usr/local/bin/installCert\n\n# Configure auto-renewal for the certificate\ncrontab -l > cron\necho \"0 4 * * * /usr/bin/certbot renew\" >> cron\ncrontab cron\nrm cron\n\nstackscript_cleanup\n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nAdmin Panel:\n Link: http://$IP_ADDRESS (https://$WEBSITE)\n Username: $ADMINUSER\n Password: $ADMIN_PASSWORD\nTo install SSL certificate please run command: installCert\nEOF","user_defined_fields":[{"name":"website","label":"Website","example":"passky.domain.com"},{"name":"email","label":"Email Address","example":"info@rabbit-company.com"},{"name":"adminuser","label":"Admin Username"},{"name":"admin_password","label":"Admin Password"}]},{"id":804143,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Peppermint One-Click","description":"Peppermint One-Click","ordinal":84,"logo_url":"assets/peppermint.svg","images":["linode/ubuntu22.04"],"deployments_total":1931,"deployments_active":114,"is_public":true,"mine":false,"created":"2021-04-01T12:45:15","updated":"2023-12-28T17:48:10","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Peppermint setup\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-peppermint\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":644908,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Percona (PMM) One-Click","description":"Percona One-Click","ordinal":85,"logo_url":"assets/percona.svg","images":["linode/debian10"],"deployments_total":195,"deployments_active":7,"is_public":true,"mine":false,"created":"2020-04-30T14:49:38","updated":"2023-12-08T04:59:34","rev_note":"","script":"#!/bin/bash\n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Docker\napt -y install docker.io\nsystemctl enable docker.service\n\n#PMM \ndocker pull percona/pmm-server:2\ndocker create -v /srv --name pmm2-data percona/pmm-server:2 /bin/true\ndocker run -d -p 80:80 -p 443:443 \\\n --volumes-from pmm2-data \\\n --name pmm2-server \\\n --restart always percona/pmm-server:2\n\necho \"Waiting for PMM to initialize to set password...\"\n\nuntil [ \"`docker inspect -f {{.State.Health.Status}} pmm2-server`\" = \"healthy\" ]; do sleep 1; done\n\ndocker exec -t pmm2-server bash -c \"ln -s /srv/grafana /usr/share/grafana/data; grafana-cli --homepath /usr/share/grafana admin reset-admin-password $PMMPASSWORD\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"pmmpassword","label":"Admin Password","example":"Admin User Password for PMM Server"}]},{"id":609018,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"phpMyAdmin One-Click","description":"phpMyAdmin One-Click","ordinal":86,"logo_url":"assets/phpmyadmin.svg","images":["linode/debian11"],"deployments_total":2202,"deployments_active":113,"is_public":true,"mine":false,"created":"2019-11-05T00:28:33","updated":"2023-12-28T14:44:49","rev_note":"Initial import","script":"#!/bin/bash\n#\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname\nset_hostname\n\n# Update system\napt_setup_update\n\n# Install/configure MySQL, Add Admin User\napt-get install -y mariadb-server\nsystemctl enable mariadb --now\nrun_mysql_secure_installation\nmysql -u root -e \"CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD'\"\nmysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost' WITH GRANT OPTION\"\nmysql -u root -e \"FLUSH PRIVILEGES\"\n\n# Install PHP\necho 'phpmyadmin phpmyadmin/dbconfig-install boolean true' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/mysql/admin-pass password $DBROOT_PASSWORD' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | debconf-set-selections\napt-get install -y phpmyadmin libapache2-mod-php7.4\n\n# Configure ufw\nufw_install\nufw allow http\nufw reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"db_user","label":"phpMyAdmin/MySQL Admin User","example":"admin"},{"name":"dbuser_password","label":"phpMyAdmin/MySQL Admin Password"},{"name":"dbroot_password","label":"MySQL root Password"}]},{"id":970522,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pi-hole One-Click","description":"Pi-hole One-Click","ordinal":87,"logo_url":"assets/pihole.svg","images":["linode/ubuntu20.04"],"deployments_total":3993,"deployments_active":271,"is_public":true,"mine":false,"created":"2022-02-07T16:04:53","updated":"2023-12-28T19:16:14","rev_note":"","script":"#!/usr/bin/env bash\n\n## PIHOLE Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nIPV4=$(ip a | awk '/inet / {print $2}'| sed -n '2 p')\nIPV6=$(ip -6 a | grep inet6 | awk '/global/{print $2}' | cut -d/ -f1)\nGENPIHOLEPASSWD=$(echo -n $PIHOLE_PASSWORD | sha256sum | awk '{printf \"%s\",$1 }' | sha256sum)\nPIHOLE_PASSWD=${GENPIHOLEPASSWD:0:-1}\n\nfunction firewall {\n ufw allow 80\n ufw allow 53\n ufw allow 67\n ufw allow 547\n ufw allow 4711\n}\n\nfunction config_pihole {\n mkdir -p /etc/pihole\n cat < /etc/pihole/setupVars.conf\nPIHOLE_INTERFACE=eth0\nIPV4_ADDRESS=$IPV4\nIPV6_ADDRESS=$IPV6\nPIHOLE_DNS_1=8.8.8.8\nPIHOLE_DNS_2=8.8.4.4\nQUERY_LOGGING=true\nINSTALL_WEB_SERVER=true\nINSTALL_WEB_INTERFACE=true\nLIGHTTPD_ENABLED=true\nCACHE_SIZE=10000\nDNS_FQDN_REQUIRED=true\nDNS_BOGUS_PRIV=true\nDNSMASQ_LISTENING=local\nWEBPASSWORD=$PIHOLE_PASSWD\nBLOCKING_ENABLED=true\nEND\n\ncurl -L https://install.pi-hole.net | bash /dev/stdin --unattended\n}\n\nfunction main {\n config_pihole\n firewall\n}\n\n# Execute script\napt_setup_update\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"pihole_password","label":"PIHOLE USER Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"This is the Email address for the SOA record","default":""}]},{"id":662119,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plex One-Click","description":"Plex One-Click","ordinal":88,"logo_url":"assets/plex.svg","images":["linode/debian10"],"deployments_total":2976,"deployments_active":53,"is_public":true,"mine":false,"created":"2020-08-12T15:54:44","updated":"2023-12-28T07:05:43","rev_note":"","script":"#!/bin/bash\n# INPUT VARIABLES:\n# \n# \n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Limited user setup if username is not \"root\"\nif [ \"$USERNAME\" != \"root\" ]; then\n \n# ensure sudo is installed and configure secure user\n apt -y install sudo\n adduser -uid 1000 $USERNAME --disabled-password --gecos \"\"\n echo \"$USERNAME:$PASSWORD\" | chpasswd\n usermod -aG sudo $USERNAME\n \n# Harden SSH Access\n sed -i -e 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config\n \n# set home directory\n HOME=/home/$USERNAME\n \n# configure ssh key for secure user if provided\n if [ \"$SSHKEY\" != \"\" ]; then\n SSHDIR=$HOME/.ssh\n mkdir $SSHDIR && echo \"$SSHKEY\" >> $SSHDIR/authorized_keys\n chmod -R 700 $SSHDIR && chmod 600 $SSHDIR/authorized_keys\n chown -R $USERNAME:$USERNAME $SSHDIR\n fi\n \n# Enable SSH hardening\n systemctl restart sshd\n \n# Create docker group, add limited user, and enable\n groupadd docker\n usermod -aG docker $USERNAME\nfi\n\n# Install and configure UFW for Plex\nufw_install\nufw allow 32400,3005,8324,32469/tcp\nufw allow 1900,32410,32412,32413,32414/udp\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Install plex as limited user\ndocker pull plexinc/pms-docker\ndocker run \\\n -d \\\n --name plex \\\n --restart always \\\n -p 32400:32400/tcp \\\n -p 3005:3005/tcp \\\n -p 8324:8324/tcp \\\n -p 32469:32469/tcp \\\n -p 1900:1900/udp \\\n -p 32410:32410/udp \\\n -p 32412:32412/udp \\\n -p 32413:32413/udp \\\n -p 32414:32414/udp \\\n -e ADVERTISE_IP=\"http://$IP:32400/\" \\\n -h \"Linode Plex Server\" \\\n -v $HOME/plex/config:/config \\\n -v $HOME/plex/media:/media \\\n -v $HOME/plex/transcode:/transcode \\\n plexinc/pms-docker\n\n# Recursively update ownership of Plex directories after delay\nsleep 1\nchown -R $USERNAME:$USERNAME $HOME/plex\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"USERNAME","label":"Limited User Name (not 'root')"},{"name":"PASSWORD","label":"Limited User Password"},{"name":"SSHKEY","label":"Limited User SSH Key","default":"","example":"Usually found in: ./ssh/id_rsa.pub"}]},{"id":611376,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL One-Click","description":"PostgreSQL One-Click","ordinal":89,"logo_url":"assets/postgresql.svg","images":["linode/debian11"],"deployments_total":2917,"deployments_active":229,"is_public":true,"mine":false,"created":"2019-11-13T06:05:28","updated":"2023-12-28T09:42:44","rev_note":"Initial import","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 22\nufw allow 5432\n\n# Install PostgreSQL\napt install -y postgresql postgresql-contrib\nsystemctl enable postgresql\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1068726,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster One-Click","description":"PostgreSQL Cluster","ordinal":90,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":184,"deployments_active":10,"is_public":true,"mine":false,"created":"2022-10-03T20:11:59","updated":"2023-12-20T17:47:28","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n\n# set force apt non-interactive\nexport DEBIAN_FRONTEND=noninteractive\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/postgresql-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/postgresql-cluster\" ]; then\n rm -rf /tmp/postgresql-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[info] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/postgresql-cluster\n cd /tmp/postgresql-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"cluster_name","label":"Domain Name"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"PostgeSQL cluster size","default":"3","oneof":"3"}]},{"id":985364,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus & Grafana One-Click","description":"Prometheus and Grafana","ordinal":91,"logo_url":"assets/prometheusgrafana.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":597,"deployments_active":62,"is_public":true,"mine":false,"created":"2022-03-08T17:03:20","updated":"2023-12-24T08:21:45","rev_note":"","script":"#!/usr/bin/env bash\n## Updated: 01-17-2023\n## Author: n0vabyte, Elvis Segura, esegura@linode.com\n\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\ncreds=\"/root/credentials.txt\"\nprometheus_htpasswd_file=\"/etc/nginx/.prometheus_htpasswd\"\n\nfunction add_firewalls {\n ufw allow http\n ufw allow https\n}\n\nfunction configure_nginx {\n apt-get install nginx apache2-utils -y\n cat << EOF > /etc/nginx/sites-available/$FQDN.conf\nserver {\n listen 80;\n server_name $FQDN;\n location / {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:3000;\n }\n location /prometheus/ {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:9090;\n auth_basic \"Restricted Area\";\n auth_basic_user_file $prometheus_htpasswd_file;\n }\n# allow let's encrypt\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/html/.well-known;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-{available,enabled}/$FQDN.conf\n unlink /etc/nginx/sites-enabled/default\n systemctl reload nginx\n systemctl enable nginx\n}\n\nfunction install_node_exporter {\n groupadd --system prometheus\n useradd -s /sbin/nologin --system -g prometheus prometheus\n curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '\"' -f 4 | wget -qi - \n tar -xvf node_exporter*.tar.gz\n chmod +x node_exporter-*/node_exporter\n chown prometheus:prometheus node_exporter\n mv node_exporter-*/node_exporter /usr/local/bin\n rm -fr node_exporter-*\n cat < /etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start node_exporter\n systemctl enable node_exporter\n}\n\nfunction configure_prometheus {\n latest_version=$(curl -s https://raw.githubusercontent.com/prometheus/prometheus/main/VERSION)\n prom_conf=\"/etc/prometheus/prometheus.yml\"\n file_sd_targets=\"/etc/prometheus/file_sd_targets\"\n prometheus_conf_dir=\"/etc/prometheus\"\n prometheus_data_dir=\"/var/lib/prometheus\"\n mkdir $prometheus_conf_dir $prometheus_conf_dir/file_sd_targets \\\n $prometheus_conf_dir/rules $prometheus_data_dir\n\n wget https://github.com/prometheus/prometheus/releases/download/v$latest_version/prometheus-$latest_version.linux-amd64.tar.gz\n tar xvf prometheus-$latest_version.linux-amd64.tar.gz\n mv prometheus-$latest_version.linux-amd64/* $prometheus_conf_dir\n chown -R prometheus:prometheus $prometheus_conf_dir $prometheus_data_dir\n mv $prometheus_conf_dir/{prometheus,promtool} /usr/local/bin\n ## cleanup\n rm prometheus-$latest_version.linux-amd64.tar.gz\n rmdir prometheus-$latest_version.linux-amd64\n\n ## backup config before updating\n cp $prom_conf{,.bak}\n sed -i -e '/- job_name: \"prometheus\"/ s/^/#/' $prom_conf\n sed -i -e '/- targets:/ s/^/#/' $prom_conf\n sed -i -e '/static_configs/ s/^/#/g' $prom_conf\n ## add our config\n cat << EOF >> $prom_conf\n#########################################\n## Local Prometheus Instance - This Box #\n#########################################\n - job_name: local_prometheus\n scrape_interval: 3s\n file_sd_configs:\n - files:\n - file_sd_targets/local_prometheus.yml\n honor_labels: true\n relabel_configs:\n - regex: (.*)\n replacement: \\${1}:9100\n source_labels:\n - __address__\n target_label: __address__\n - regex: (.+)\n replacement: \\${1}\n source_labels:\n - __instance\n target_label: instance\nEOF\n ## add to file_sd_targets\n cat << EOF >> $file_sd_targets/local_prometheus.yml\n- labels:\n __instance: prometheus\n cluster: local\n targets:\n - 127.0.0.1\nEOF\n cat << EOF > /etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nGroup=prometheus\nType=simple\nExecStart=/usr/local/bin/prometheus \\\n--config.file /etc/prometheus/prometheus.yml \\\n--storage.tsdb.path $prometheus_data_dir/ \\\n--web.console.templates=$prometheus_conf_dir/consoles \\\n--web.console.libraries=$prometheus_conf_dir/console_libraries \\\n--web.listen-address=127.0.0.1:9090 \\\n--web.external-url=https://$FQDN/prometheus \\\n--storage.tsdb.retention=60d\nRestart=always\nExecReload=/usr/bin/kill -HUP \\$MAINPID\nTimeoutStopSec=20s\nOOMScoreAdjust=-900\nSendSIGKILL=no\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start prometheus\n systemctl enable prometheus\n\n ## protect with htpasswd\n prometheus_htpasswd=$(openssl rand -base64 32)\n htpasswd -cb $prometheus_htpasswd_file prometheus $prometheus_htpasswd\n ## log credentials locally\n cat << EOF >> $creds\n#################\n# Prometheus #\n#################\nLocation: https://$FQDN/prometheus\nUsername: prometheus\nPassword: $prometheus_htpasswd\nEOF\n ## sanity check\n function fallback {\n echo \"[FATAL] Creating custom configuration failed. Restoring old configuration\"\n cp $prom_conf{.bak,}\n systemctl restart prometheus\n sleep 2\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[CRITICAL] Encoutered unexpected error while configuring Prometheus. Please reach out to Support.\"\n exit 2\n fi\n }\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[ERROR] Prometheus is not running. Falling back to default config..\"\n fallback\n fi\n\n}\n\nfunction configure_grafana {\n echo \"[info] configuring Grafana - Installing Packages\"\n apt-get install -y apt-transport-https \\\n software-properties-common \\\n wget \\\n gnupg2 \\\n sqlite3\n\n wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\n echo \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\n apt-get -y update\n apt-get -y install grafana\n\n ## reset Grafana admin password\n grafana_password=$(openssl rand -base64 32)\n\n echo \"[info] updating grafana config\"\n sed -i -e 's/;admin_user = admin/admin_user = admin/g' /etc/grafana/grafana.ini\n sed -i \"s|;admin_password = admin|admin_password = $grafana_password|g\" /etc/grafana/grafana.ini\n\n echo \"[info] starting grafana-server\"\n systemctl start grafana-server\n systemctl enable grafana-server\n\n ## log credentials locally\n cat << EOF >> $creds\n##############\n# Grafana #\n##############\nLocation: https://$FQDN/\nUsername: admin\nPassword: $grafana_password\nEOF\n}\n\nfunction ssl_grafana {\n apt install -y certbot python3-certbot-nginx\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n add_firewalls\n configure_nginx\n install_node_exporter\n configure_prometheus\n configure_grafana\n ssl_grafana\n}\n\n## execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This email is for the LetsEncrypt SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":607034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus One-Click","description":"Prometheus One Click App","ordinal":92,"logo_url":"assets/prometheus.svg","images":["linode/debian10"],"deployments_total":359,"deployments_active":13,"is_public":true,"mine":false,"created":"2019-10-29T20:59:30","updated":"2023-12-24T08:38:08","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prometheus\ngroupadd --system prometheus\nuseradd -s /sbin/nologin --system -g prometheus prometheus\nmkdir /var/lib/prometheus\nfor i in rules rules.d files_sd; do mkdir -p /etc/prometheus/${i}; done\napt-get -y install wget\nmkdir -p /tmp/prometheus && cd /tmp/prometheus\ncurl -s https://api.github.com/repos/prometheus/prometheus/releases/latest \\\n | grep browser_download_url \\\n | grep linux-amd64 \\\n | cut -d '\"' -f 4 \\\n | wget -qi -\ntar xvf prometheus*.tar.gz\ncd prometheus*/\nmv prometheus promtool /usr/local/bin/\nmv prometheus.yml /etc/prometheus/prometheus.yml\nmv consoles/ console_libraries/ /etc/prometheus/\ncd ~/\nrm -rf /tmp/prometheus\n\n# Edit Prometheus config\nsudo tee /etc/prometheus/prometheus.yml</etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nType=simple\nUser=prometheus\nGroup=prometheus\nExecReload=/bin/kill -HUP $MAINPID\nExecStart=/usr/local/bin/prometheus \\\n --config.file=/etc/prometheus/prometheus.yml \\\n --storage.tsdb.path=/var/lib/prometheus \\\n --web.console.templates=/etc/prometheus/consoles \\\n --web.console.libraries=/etc/prometheus/console_libraries \\\n --web.listen-address=0.0.0.0:9090 \\\n --web.external-url=\n\nSyslogIdentifier=prometheus\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nfor i in rules rules.d files_sd; do chown -R prometheus:prometheus /etc/prometheus/${i}; done\nfor i in rules rules.d files_sd; do chmod -R 775 /etc/prometheus/${i}; done\nchown -R prometheus:prometheus /var/lib/prometheus/\n\n# Add node_exporter & Enable services\ncurl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest \\\n| grep browser_download_url \\\n| grep linux-amd64 \\\n| cut -d '\"' -f 4 \\\n| wget -qi -\n\ntar -xvf node_exporter*.tar.gz\ncd node_exporter*/\ncp node_exporter /usr/local/bin\nnode_exporter --version\n\ncat </etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n\n[Install]\nWantedBy=default.target\nEND\n\nsystemctl daemon-reload\nsystemctl start prometheus\nsystemctl enable prometheus\nsystemctl start node_exporter\nsystemctl enable node_exporter\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":688890,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"RabbitMQ One-Click","description":"RabbitMQ One-Click","ordinal":93,"logo_url":"assets/rabbitmq.svg","images":["linode/debian10"],"deployments_total":397,"deployments_active":50,"is_public":true,"mine":false,"created":"2020-11-17T20:53:00","updated":"2023-12-23T14:09:40","rev_note":"","script":"#!/bin/bash\n#\n#\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n## Install prerequisites\napt-get install curl gnupg -y\n\n## Get RabbitMQ \n$ curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -\nsudo apt-key adv --keyserver \"hkps://keys.openpgp.org\" --recv-keys \"0x0A9AF2115F4687BD29803A206B73A36E6026DFCA\"\n## Install apt HTTPS transport\napt-get install apt-transport-https\n\n## Add Bintray repositories that provision latest RabbitMQ and Erlang 23.x releases\ntee /etc/apt/sources.list.d/bintray.rabbitmq.list <\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# System Update\nset_hostname\napt_setup_update\n\nfunction install_redis {\n apt install -y redis-server\n systemctl enable redis-server\n}\n\nfunction redis_config {\n sed -ie \"s/supervised no/supervised systemd/g\" /etc/redis/redis.conf\n sed -ie \"s/appendonly no/appendonly yes/g\" /etc/redis/redis.conf\n systemctl restart redis-server\n}\n\nfunction main {\n install_redis\n redis_config\n}\nmain\n\n# cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1132204,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Marketplace App for Redis® Sentinel Cluster One-Click","description":"Redis Sentinel One-Click Cluster","ordinal":95,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":138,"deployments_active":6,"is_public":true,"mine":false,"created":"2023-02-27T20:05:44","updated":"2023-12-17T23:40:36","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/redis-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\n\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\n\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\n\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\n\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Redis CA"},{"name":"common_name","label":"Common Name","default":"Redis Server"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Redis cluster size","default":"3","oneof":"3,5"}]},{"id":923036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Restyaboard One-Click","description":"Restyaboard One-Click","ordinal":96,"logo_url":"assets/restyaboard.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04"],"deployments_total":209,"deployments_active":2,"is_public":true,"mine":false,"created":"2021-10-18T01:07:09","updated":"2023-12-03T04:43:28","rev_note":"","script":"#!/bin/bash\n#\n# Install script for Restyaboard\n#\n# Usage: ./restyaboard.sh\n#\n# Copyright (c) 2014-2021 Restya.\n# Dual License (OSL 3.0 & Commercial License)\n{\n\tmain() {\n\t\tif [[ $EUID -ne 0 ]];\n\t\tthen\n\t\t\techo \"This script must be run as root\"\n\t\t\texit 1\n\t\tfi\n\t\tset -x\n\t\twhoami\n\t\t#\n\t\t# Checking the OS name and OS version\n\t\t#\n\t\tfind_release ()\n\t\t{\n\t\t\t# Checking the Ubuntu OS\n\t\t\tif [ -f /etc/lsb-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`grep DISTRIB_ID /etc/lsb-release`\"\n\t\t\t\tDISTRIB_ID='DISTRIB_ID='\n\t\t\t\tOS_NAME=$OS_REQUIREMENT$DISTRIB_ID\n\t\t\t\tarray=();\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" != \"$DISTRIB_ID\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_NAME ]]; do\n\t\t\t\t\tarray+=( \"${OS_NAME%%\"$DISTRIB_ID\"*}\" );\n\t\t\t\t\tOS_NAME=${OS_NAME#*\"$DISTRIB_ID\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_REQUIREMENT=${array[1]}\n\t\t\t\tfi\n\t\t\t\tOS_VERSION=\"`grep DISTRIB_RELEASE /etc/lsb-release`\"\n\t\t\t\tDISTRIB_RELEASE='DISTRIB_RELEASE='\n\t\t\t\tOS_Ver=$OS_VERSION$DISTRIB_RELEASE\n\t\t\t\tversion=();\n\t\t\t\tif ([ \"$OS_VERSION\" != \"$DISTRIB_RELEASE\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_Ver ]]; do\n\t\t\t\t\tversion+=( \"${OS_Ver%%\"$DISTRIB_RELEASE\"*}\" );\n\t\t\t\t\tOS_Ver=${OS_Ver#*\"$DISTRIB_RELEASE\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_VERSION=${version[1]}\n\t\t\t\tfi\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Redhat, Fedora, and Centos\n\t\t\tif [ -f /etc/redhat-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/redhat-release | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/redhat-release | cut -d ' ' -f 4 | cut -d '.' -f 1`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Debian OS\n\t\t\tif [ -f /etc/issue ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/issue | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/issue | cut -d ' ' -f 3`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the OpenBSD \n\t\t\tif [ -f /etc/motd ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/motd | head -1 | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/motd | head -1 | cut -d ' ' -f 2`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t}\n\t\tfindbin ()\n {\n ret=0\n newpath=`echo $PATH | tr : ' '`\n for i in ${newpath}; do\n\t\t\t\tif [ -x $i/$1 ]; then\n\t\t\t\t\tret=1\n\t\t\t\t\tbreak\n\t\t\t\tfi\n done\n echo $ret\n return \n }\n checkdeps()\n {\n pkginfo=\"dpkg rpm ipkg pkg_info\"\n for i in $pkginfo; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n\t\t\t\t\tpkginfo=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that for listing packages\"\n\t\t\t\t\tbreak\n fi\n done\n\n if [ ${pkginfo} = \"pkg_info\" ]; then\n # BSD needs PKG_PATH set to load anything over the net.\n if [ x${PKG_PATH} = x ]; then\n\t\t\t\t\techo \"Please set the environment variable PKG_PATH and try again.\"\n\t\t\t\t\texit 1\n fi\n fi\n \n \n pkg_name=\"yum apt-get ipkg pkg_add\"\n for i in ${pkg_name}; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n pkg_name=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that to install packages\"\n\t\t\t\t\tbreak\n fi\n done\n \n\n for i in ${genericdeps} ${gtkdeps} ${kdedeps}; do\n case $pkginfo in\n dpkg)\n deps=\"`dpkg -l \"*$i*\" | grep -- \"^ii\" | cut -d ' ' -f 3`\"\n ;;\n rpm)\n deps=\"`rpm -q $i`\"\n ;;\n pkg_info)\n deps=\"`pkg_info | grep \"$i\" | sed -e 's: .*$::'`\"\n ;;\n ipkg)\n deps=\"todo\"\n ;;\n *)\n echo \"ERROR: No package manager found!\"\n exit 1\n ;;\n esac\n found=`echo ${deps} | grep -v 'not installed' | grep -c \"${i}\" 2>&1`\n if [ $found -gt 0 ]; then\n \techo \"Yes, found $i\"\n else\n\t\t\t\t\techo \"Nope, $i appears to not be installed\"\n\t\t\t\t\tmissing=\"${missing} $i\"\n fi\n done\n\n if [ -n \"${missing}\" ]; then\n echo \"package(s)\\\"${missing}\\\" are missing!\"\n echo \"You will need sudo priviledges to install the packages\"\n if [ x$yes = xno ]; then\n \t$debug sudo ${pkgnet} install ${missing}\n else\n \t$debug sudo ${pkgnet} -y install ${missing}\n fi\n fi\n }\n\t\tinstall_nginx() \n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n apt install -y cron nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"nginx installation failed with error code ${error_code} (nginx installation failed with error code 2)\"\n return 2\n fi\n if [ -f \"/etc/nginx/conf.d/default\" ]; then\n rm -rf /etc/nginx/conf.d/default\n fi\n if [ -f \"/etc/nginx/sites-enabled/default\" ]; then\n rm -rf /etc/nginx/sites-enabled/default\n fi\n if [ -f \"/etc/nginx/sites-available/default\" ]; then\n rm -rf /etc/nginx/sites-available/default\n fi\n service nginx start\n fi\n\t\t\telse\t\t\t\t\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n rpm -Uvh \"http://nginx.org/packages/centos/${OS_VERSION}/noarch/RPMS/nginx-release-centos-${OS_VERSION}-0.el${OS_VERSION}.ngx.noarch.rpm\"\n yum install -y zip cronie nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"cron nginx installation failed with error code ${error_code} cron nginx installation failed with error code 18\"\n return 18\n fi\n if [ -f \"/etc/nginx/conf.d/default.conf\" ]; then\n rm -rf /etc/nginx/conf.d/default.conf\n fi\n if [ -f \"/etc/nginx/sites-enabled/default.conf\" ]; then\n rm -rf /etc/nginx/sites-enabled/default.conf\n fi\n if [ -f \"/etc/nginx/sites-available/default.conf\" ]; then\n rm -rf /etc/nginx/sites-available/default.conf\n fi\n service nginx start\n chkconfig --levels 35 nginx on\n fi\n\t\t\tfi\n\t\t}\n\t\tinstall_php()\n\t\t{\n\t\t\tif ! hash php 2>&-; then\n\t\t\t\techo \"PHP is not installed!\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\t\t\t\t\t\t\t\n echo \"Installing PHP...\"\n apt install -y php7.4 php7.4-common --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"PHP installation failed with error code ${error_code} (PHP installation failed with error code 3)\"\n return 3\n fi\n else \n if ([ \"$pkg_name\" = \"yum\" ])\n then\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n echo \"Note: For the latest version of PHP, we're going to download https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm and https://rpms.remirepo.net/enterprise/remi-release-8.rpm.\"\n echo \"Installing PHP...\"\n dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm\n dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\n dnf module enable php:remi-7.4\n dnf -y install php php-cli php-common\n else\n yum install -y epel-release\n echo \"Note: For the latest version of PHP, we're going to download http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm.\"\n echo \"Installing PHP...\"\n rpm -Uvh \"http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm\"\n yum --enablerepo=remi-php74 install -y php\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"php installation failed with error code ${error_code} (php installation failed with error code 20)\"\n return 20\n fi\n fi\n fi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Installing PHP fpm and cli extension...\"\n\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\tthen\n\t\t\t\tapt install -y php7.4-fpm php7.4-cli --allow-unauthenticated\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"php7.4-cli installation failed with error code ${error_code} (php7.4-cli installation failed with error code 4)\"\n\t\t\t\tfi\n\t\t\t\tservice php7.4-fpm start\n\t\t\telse \n\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\tthen\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n \t\t\tthen\n\t\t\t\t\t\tdnf -y install php-fpm php-devel php-opcache\n\t\t\t\t\t\tdnf -y install php-json\n\t\t\t\t\telse\n\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-fpm php-devel php-cli php-opcache\n\t\t\t\t\tfi\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php-devel installation failed with error code ${error_code} (php-devel installation failed with error code 21)\"\n\t\t\t\t\t\treturn 21\n\t\t\t\t\tfi\t\t\t\t\t\n\t\t\t\t\tservice php-fpm start\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"....\"\n\t\t\telse\n\t\t\t\tchkconfig --levels 35 php-fpm on\t\t\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP curl extension...\"\n\t\t\tphp -m | grep curl\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-curl...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-curl --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-curl installation failed with error code ${error_code} (php7.4-curl installation failed with error code 5)\"\n\t\t\t\t\t\treturn 5\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-curl\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-curl\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-curl installation failed with error code ${error_code} (php-curl installation failed with error code 22)\"\n\t\t\t\t\t\t\treturn 22\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP pgsql extension...\"\n\t\t\tphp -m | grep pgsql\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-pgsql...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install libpq5\n\t\t\t\t\tapt install -y php7.4-pgsql --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-pgsql installation failed with error code ${error_code} (php7.4-pgsql installation failed with error code 6)\"\n\t\t\t\t\t\treturn 6\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pgsql\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pgsql\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-pgsql installation failed with error code ${error_code} (php-pgsql installation failed with error code 23)\"\n\t\t\t\t\t\t\treturn 23\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP mbstring extension...\"\n\t\t\tphp -m | grep mbstring\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-mbstring...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-mbstring --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-mbstring installation failed with error code ${error_code} (php7.4-mbstring installation failed with error code 7)\"\n\t\t\t\t\t\treturn 7\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-mbstring\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-mbstring\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-mbstring installation failed with error code ${error_code} (php-mbstring installation failed with error code 24)\"\n\t\t\t\t\t\t\treturn 24\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP ldap extension...\"\n\t\t\tphp -m | grep ldap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-ldap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-ldap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-ldap installation failed with error code ${error_code} (php7.4-ldap installation failed with error code 8)\"\n\t\t\t\t\t\treturn 8\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-ldap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-ldap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-ldap installation failed with error code ${error_code} (php-ldap installation failed with error code 25)\"\n\t\t\t\t\t\t\treturn 25\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imagick extension...\"\n\t\t\tphp -m | grep imagick\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-imagick...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y gcc\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"gcc installation failed with error code ${error_code} (gcc installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y imagemagick\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"imagemagick installation failed with error code ${error_code} (imagemagick installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y php7.4-imagick --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imagick installation failed with error code ${error_code} (php7.4-imagick installation failed with error code 10)\"\n\t\t\t\t\t\treturn 10\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tyum install -y ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pear\n\t\t\t\t\t\t\tdnf -y install php-gd\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pear\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-gd\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"Installing php-imagick failed with error code ${error_code} (Installing php-imagick failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\n\t\t\t\t\t\tcd /usr/local/src\n\t\t\t\t\t\twget http://pecl.php.net/get/imagick-2.2.2.tgz\n\t\t\t\t\t\ttar zxvf ./imagick-2.2.2.tgz\n\t\t\t\t\t\tcd imagick-2.2.2\n\t\t\t\t\t\tphpize\n\t\t\t\t\t\t./configure\n\t\t\t\t\t\tmake\n\t\t\t\t\t\tmake test\n\t\t\t\t\t\tmake install\n\t\t\t\t\t\techo \"extension=imagick.so\" >> /etc/php.ini\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imap extension...\"\n\t\t\tphp -m | grep imap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php7.4-imap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-imap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imap installation failed with error code ${error_code} (php7.4-imap installation failed with error code 11)\"\n\t\t\t\t\t\treturn 11\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-imap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-imap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-imap installation failed with error code ${error_code} (php-imap installation failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking xml...\"\n\t\t\tphp -m | grep xml\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing xml...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install php7.4-xml --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 56)\"\n\t\t\t\t\t\treturn 56\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-xml\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-xml\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 57)\"\n\t\t\t\t\t\t\treturn 57\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_timezone()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\ttimezone=$(cat /etc/timezone)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php/7.4/fpm/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php/7.4/fpm/php.ini\n\t\t\telse \n\t\t\t\tPHP_VERSION=$(php -v | grep \"PHP 5\" | sed 's/.*PHP \\([^-]*\\).*/\\1/' | cut -c 1-3)\n\t\t\t\techo \"Installed PHP version: '$PHP_VERSION'\"\n\t\t\t\ttimezone=$(cat /etc/sysconfig/clock | grep ZONE | cut -d\"\\\"\" -f2)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php.ini\n\t\t\tfi\n\t\t}\n\t\tinstall_postgresql()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tid -a postgres\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]; then\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n sh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n apt install wget ca-certificates\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n fi\n wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n apt-key add ACCC4CF8.asc\n apt update\n apt install -y postgresql --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n return 13\n fi\n\t\t\t\telse\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ 1 -eq \"$(echo \"${PSQL_VERSION} < 9.3\" | bc)\" ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tsh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n\t\t\t\t\t\tapt install wget ca-certificates\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n\t\t\t\t\t\tfi\n\t\t\t\t\t\twget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n\t\t\t\t\t\tapt-key add ACCC4CF8.asc\n\t\t\t\t\t\tapt update\n\t\t\t\t\t\tapt upgrade\n\t\t\t\t\t\tapt install -y postgresql --allow-unauthenticated\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n\t\t\t\t\t\t\treturn 13\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\tfi\n\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf > /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf.1\n\t\t\t\tcd /etc/postgresql/${PSQL_VERSION}/main || exit\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tservice postgresql restart\n\t\t\telse\n\t\t\t\tif ! which psql > /dev/null 2>&1;\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n if [ $(getconf LONG_BIT) = \"64\" ]; then\n if [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n dnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n else\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n then\n yum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n fi\n fi\n fi\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n dnf module enable postgresql:13\n dnf -y install postgresql-server postgresql-contrib postgresql-libs\n else\n yum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\t\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql13 installation failed with error code ${error_code} (postgresql13 installation failed with error code 29)\"\n return 29\n fi\n\t\t\t\telse \n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tif [[ $PSQL_VERSION < 9.3 ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tif [ $(getconf LONG_BIT) = \"64\" ]; then\n\t\t\t\t\t\t\tif [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n\t\t\t\t\t\t\t\tdnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n\t\t\t\t\t\t\t\tthen\n\t\t\t\t\t\t\t\t\tyum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf module enable postgresql:13\n\t\t\t\t\t\t\tdnf -y install postgresql-server postgresql-contrib postgresql-libs\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 29)\"\n\t\t\t\t\t\t\treturn 29\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^13\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=13\n\t\t\t\tfi\n\t\t\t\tPSQL_FOLDER=$(echo ${PSQL_VERSION} | sed 's/\\.//')\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tpostgresql-setup --initdb\n\t\t\t\telse\n\t\t\t\t\t\"/usr/pgsql-${PSQL_VERSION}/bin/postgresql-${PSQL_VERSION}-setup\" initdb\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl enable postgresql\n\t\t\t\t\tsystemctl start postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl start \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\t\tsystemctl enable \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" start\n\t\t\t\t\t\tchkconfig --levels 35 \"postgresql-${PSQL_VERSION}\" on\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/data/pg_hba.conf\" > \"/var/lib/pgsql/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/data\" || exit\n\t\t\t\telse\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf\" > \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/${PSQL_VERSION}/data\" || exit\n\t\t\t\tfi\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl restart postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl restart \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_geoip()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tif ! hash GeoIP-devel 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-geoip php7.4-dev libgeoip-dev\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code ${error_code} (php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code 50)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\techo \"extension=geoip.so\" >> /etc/php.ini\n\n\t\t\t\tmkdir -v /usr/share/GeoIP\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"GeoIP folder creation failed with error code ${error_code} (GeoIP folder creation failed with error code 52)\"\n\t\t\t\tfi\n\t\t\t\tget_geoip_data\n\t\t\telse\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\t\treturn 47\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tconfigure_restyaboard()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n echo \"Changing server_name in nginx configuration...\"\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\telse\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\tfi\n\t\t}\n\t\tinstall_postfix()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Installing postfix...\"\n\t\t\t\techo \"postfix postfix/mailname string $IPADDR\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\techo \"postfix postfix/main_mailer_type string 'Internet Site'\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\tapt install -y postfix\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"postfix installation failed with error code ${error_code} (postfix installation failed with error code 16)\"\n\t\t\t\tfi\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/fpm/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/fpm/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/cli/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/cli/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php.ini\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tchange_permission()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/media/ $RESTYABOARD_DIR/tmp/cache/ $RESTYABOARD_DIR/client/img/\n\t\t\t\tchcon -Rv --type=httpd_t $RESTYABOARD_DIR/\n\t\t\tfi\n\t\t}\n\t\tpsql_connect()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 34)\"\n\t\t\t\t\treturn 34\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 35)\"\n\t\t\t\t\treturn 35\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 36)\"\n\t\t\t\t\treturn 36\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 37)\"\n\t\t\t\t\treturn 37\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 39)\"\n\t\t\t\t\t\treturn 39\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 40)\"\n\t\t\t\t\treturn 40\n\t\t\t\tfi\t\t\t\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 41)\"\n\t\t\t\t\treturn 41\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 42)\"\n\t\t\t\t\treturn 42\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 43)\"\n\t\t\t\t\treturn 43\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\tif [ \"$?\" = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 45)\"\n\t\t\t\t\t\treturn 45\n\t\t\t\t\tfi\t\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P allow_postfix_local_write_mail_spool 1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tphp_fpm_reset()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \".........\"\n\t\t\telse\n\t\t\t\techo \"Reset php-fpm (use unix socket mode)...\"\n\t\t\t\tif [ -f \"/run/php/php7.4-fpm.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php\\/php7.4-fpm.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\telif [ -f \"/run/php-fpm/www.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php-fpm\\/www.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/unix:\\/run\\/php-fpm\\/www.sock/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\telse\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/127.0.0.1:9000/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_jq()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tapt install -y jq\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 53)\"\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tyum install -y jq\n\t\t\t\terror_code\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 49)\"\n\t\t\t\t\treturn 49\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_db_connection()\n\t\t{\t\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Starting services...\"\n\t\t\t\tservice cron restart\n\t\t\t\tservice php7.4-fpm restart\n\t\t\t\tservice nginx restart\n\t\t\t\tservice postfix restart\n\t\t\t\tapt install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\telse\n\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\telse\n\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\tfi\n\t\t\t\tyum install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P httpd_can_network_connect_db=1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tssl_connectivity()\n\t\t{\n\t\t\tif [[ $IPADDR =~ ^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$ ]]; then\n\t\t\t\techo \"SSL connectivity cannot be set for IP address\"\n\t\t\telse\n\t\t\t\tset +x\n\t\t\t\techo \"Do you want to set up SSL connectivity for your domain and your domain should be publicly accessible Restyaboard instance and your domain should be mappped to this Restyaboard Server, Note: If you're trying to set SSL for Non-publicly accessible instance, then your Restyaboard will not work (y/n)?\"\n\t\t\t\tread -r answer\n\t\t\t\tset -x\n\t\t\t\tcase \"${answer}\" in\n\t\t\t\t\t[Yy])\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tapt install certbot python3-certbot-nginx -y\n\t\t\t\t\t\tservice nginx restart\n\t\t\t\t\t\tservice php7.4-fpm restart\n\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\telse\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install epel-release\n\t\t\t\t\t\t\tdnf -y install certbot python3-certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y epel-release\n\t\t\t\t\t\t\tyum install certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"SSL installation failed with error code ${error_code} (php installation failed with error code 20)\"\n\t\t\t\t\t\t\treturn 20\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tesac\n\t\t\tfi\n\t\t}\n\t\tfind_release\n\t\tcheckdeps\n\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n then\n\t\t\tapt update\n apt install -y net-tools\n\t\t\tapt install -y curl unzip\n\t\telse\n\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n \tthen\n yum install -y net-tools\n\t\t\t\tyum install -y curl unzip\n\t\t\tfi\n\t\tfi\n IFCONFIG_PATH=$(which ifconfig)\n IPADDR=$(${IFCONFIG_PATH} eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n\t\tRESTYABOARD_VERSION=$(curl --silent https://api.github.com/repos/RestyaPlatform/board/releases | grep tag_name -m 1 | awk '{print $2}' | sed -e 's/[^v0-9.]//g')\n\t\tPOSTGRES_DBHOST=localhost\n\t\tPOSTGRES_DBNAME=restyaboard\n\t\tPOSTGRES_DBUSER=restya\n\t\tPOSTGRES_DBPASS=hjVl2!rGd\n\t\tPOSTGRES_DBPORT=5432\n\t\tDOWNLOAD_DIR=/opt/restyaboard\n RESTYABOARD_DIR=/usr/share/nginx/html/restyaboard\n\t\t\n\t\tget_geoip_data () \n\t\t{\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIP.dat.gz\n\t\t\tgunzip GeoIP.dat.gz\n\t\t\tmv GeoIP.dat /usr/share/GeoIP/GeoIP.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz\n\t\t\tgunzip GeoIPv6.dat.gz\n\t\t\tmv GeoIPv6.dat /usr/share/GeoIP/GeoIPv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.xz\n\t\t\tunxz GeoLiteCity.dat.xz\n\t\t\tmv GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCityv6.dat.gz\n\t\t\tgunzip GeoLiteCityv6.dat.gz\n\t\t\tmv GeoLiteCityv6.dat /usr/share/GeoIP/GeoLiteCityv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNum.dat.gz\n\t\t\tgunzip GeoIPASNum.dat.gz\n\t\t\tmv GeoIPASNum.dat /usr/share/GeoIP/GeoIPASNum.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNumv6.dat.gz\n\t\t\tgunzip GeoIPASNumv6.dat.gz\n\t\t\tmv GeoIPASNumv6.dat /usr/share/GeoIP/GeoIPASNumv6.dat\n\t\t}\n\n\t\tupgrade-0.3-0.4()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.4-0.4.1()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.5.2-0.6()\n\t\t{\n\t\t\tsed -i \"s/rewrite ^\\/ical\\/.*/rewrite ^\\/ical\\/([0-9]*)\\/([0-9]*)\\/([a-z0-9]*).ics\\$ \\/server\\/php\\/ical.php?board_id=\\$1\\&user_id=\\$2\\&hash=\\$3 last;/\" /etc/nginx/conf.d/restyaboard.conf\n\t\t}\n\n\t\tupgrade-0.6.3-0.6.4()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_created_date\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_created_date/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.4-0.6.5()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_id\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_id/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.2.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.5-0.6.6()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\t\t\n\t\tupgrade-0.6.6-0.6.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_card_counter-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_card_counter-v0.1.1.zip\n\t\t\tunzip /tmp/r_card_counter-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.2.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_eu_gdpr-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_eu_gdpr-v0.1.2.zip\n\t\t\tunzip /tmp/r_eu_gdpr-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.1.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\t\t\t\n\t\t\t\n\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.3.zip\n\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\t: > /var/spool/cron/crontabs/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n\t\t\telse\n\t\t\t\t: > /var/spool/cron/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.7-0.6.8(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.3.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\n\t\tupgrade-0.6.8-0.6.9(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.4.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.4.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.4.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\t\tupgrade-0.6.9-1.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_togetherjs\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_togetherjs/\n\t\t\tfi\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.5.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.5.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.5.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.2.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\n\t\t\techo \"Applying permission...\"\n\t\t\tuseradd restyaboard\n\t\t\tusermod --password 'hjVl2!rGd' restyaboard\n\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tuser www-data;\n\t\t\t\tusermod -a -G restyaboard www-data\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\telse\n\t\t\t\tuser nginx;\n\t\t\t\tusermod -a -G restyaboard nginx\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\tfi\n\t\t\tchown -R restyaboard:restyaboard $RESTYABOARD_DIR\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n\t\t\tchmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tfi\n\t\t}\n\n\t\tupdate_version()\n\t\t{\n\t\t\tset +x\n\t\t\techo -e \"A newer version ${RESTYABOARD_VERSION} of Restyaboard is available.\\n\\nImportant: Please note that upgrading will remove any commercial apps that were free in previous version.\\nFor more details about commercial apps, please visit https://restya.com/board/pricing\\n\\nDo you want to get it now y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tset +x\n\t\t\t\tset -x\n\t\t\t\t\n\t\t\t\techo \"Downloading files...\"\n\t\t\t\tcurl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n\t\t\t\tunzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n\t\t\t\t\n\t\t\t\techo \"Updating files...\"\n\t\t\t\tcp -r ${DOWNLOAD_DIR}/. \"$RESTYABOARD_DIR\"\n\t\t\t\t\n\t\t\t\techo \"Connecting database to run SQL changes...\"\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$? \n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database connection failed with error code ${error_code} (PostgreSQL database connection failed with error code 32)\"\n\t\t\t\t\treturn 32\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\t\n\t\t\t\techo \"Changing PostgreSQL database name, user and password...\"\n\t\t\t\tsed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\t\tdeclare -a upgrade;\n\t\t\t\tif [[ $version < \"v0.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.3-0.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.4.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4-0.4.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4.2-0.5\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.1-0.5.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.2-0.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6-0.6.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.1-0.6.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.3\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.2-0.6.3\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.3-0.6.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.4-0.6.5\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v0.6.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.5-0.6.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tset +x\n\t\t\t\t\techo \"Before updating make sure to remove duplicate username's and emails used by more than one user, otherwise unique indexing for users will be thrown an error But all other queries will be executed without any issue.\"\n\t\t\t\t\tread -r -s -p $'Press [Enter] key to continue...'\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.6-0.6.7\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.8\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.7-0.6.8\")\n\t\t\t\tfi\t\t \n\t\t\t\tif [[ $version < \"v0.6.9\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.8-0.6.9\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v1.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.9-1.7\")\n\t\t\t\tfi\n\t\t\t\t# use for loop to read all values and indexes\n\t\t\t\tfor i in \"${upgrade[@]}\"\n\t\t\t\tdo\n\t\t\t\t\tif [ \"$(type -t ${i})\" = function ];\n\t\t\t\t\tthen\n\t\t\t\t\t\teval ${i}\n\t\t\t\t\tfi\n\t\t\t\t\tif [ -f \"$RESTYABOARD_DIR/sql/${i}.sql\" ];\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"Updating SQL...\"\n\t\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/${i}.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"PostgreSQL updation of SQL failed with error code ${error_code} (PostgreSQL updation of SQL failed with error code 33)\"\n\t\t\t\t\t\t\treturn 33\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tdone\n\t\t\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\tthen\t\t\t\t \n service nginx restart\n\t\t\t\t\tservice php${PHP_VERSION}-fpm restart\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\telse\n\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\tesac\n\t\t}\n\n\t\tif [ -f \"$DOWNLOAD_DIR/release\" ];\n\t\tthen\n\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\tif [[ $version < $RESTYABOARD_VERSION ]];\n\t\t\tthen\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\telse\n\t\t\t\techo \"No new version available\"\n\t\t\t\texit;\n\t\t\tfi\n\t\telse\n\t\t\tset +x\n\t\t\techo \"Is Restyaboard already installed and configured/working y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\tesac\n\t\tfi\n\n if ([ \"$OS_REQUIREMENT\" = \"Debian\" ])\n then\n sed -i -e 's/deb cdrom/#deb cdrom/g' /etc/apt/sources.list\n sh -c 'echo \"deb http://ftp.de.debian.org/debian jessie main\" > /etc/apt/sources.list.d/debjessie.list'\n apt install apt-transport-https lsb-release ca-certificates -y\n wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg\n echo \"deb https://packages.sury.org/php/ $(lsb_release -sc) main\" | tee /etc/apt/sources.list.d/php.list\n fi\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n apt install debian-keyring debian-archive-keyring -y\n apt update -y\n apt upgrade -y\n apt install python-software-properties -y\n apt install software-properties-common -y\n if ! hash php 2>&-; then\n add-apt-repository -y ppa:ondrej/php\n apt update -y\n apt install libjpeg8 -y --allow-unauthenticated\n fi\n fi\n install_nginx\n \n echo \"Checking PHP...\"\n install_php\n\n echo \"Setting up timezone...\"\n set_timezone\n \n echo \"Checking PostgreSQL...\"\n install_postgresql\n\n install_geoip\n \n echo \"Downloading Restyaboard script...\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\n apt install -y curl\n fi\n mkdir ${DOWNLOAD_DIR}\n curl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n unzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n rm /tmp/restyaboard.zip\n\n configure_restyaboard\n \n \n echo \"Copying Restyaboard script to root directory...\"\n cp -r ${DOWNLOAD_DIR}/* \"$RESTYABOARD_DIR\"\n \n install_postfix\n \n echo \"Changing permission...\"\n useradd restyaboard\n usermod --password 'hjVl2!rGd' restyaboard\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n user www-data;\n usermod -a -G restyaboard www-data\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n else\n user nginx;\n usermod -a -G restyaboard nginx\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n fi\n chown -R restyaboard:restyaboard $RESTYABOARD_DIR\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n chmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n change_permission\n\n psql_connect\n \n echo \"Changing PostgreSQL database name, user and password...\"\n sed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n \n echo \"Setting up cron for every 5 minutes..\"\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n else\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n fi\n php_fpm_reset\n \n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n service nginx restart\n service php7.4-fpm restart\n else\n if [ -f \"/bin/systemctl\" ]; then\n echo \"Starting services with systemd...\"\n systemctl restart nginx\n systemctl restart php-fpm\n else\n echo \"Starting services...\"\n /etc/init.d/php-fpm restart\n /etc/init.d/nginx restart\n fi\n fi\n set_db_connection\n\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\tthen\n\t\t\tssl_connectivity\n\t\telse\n\t\t\tssl_connectivity\n\t\tfi\n\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n\t\t\tsemanage permissive -a httpd_t\n\t\tfi\n\t\tset +x\n\t\techo \"Checking Hosting...\"\n\t\tresponse=$(curl -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2017-04-02 --write-out %{http_code} --connect-timeout 10 --max-time 10 --silent --output /dev/null)\n\t\t\n\t\tif [ -f /etc/ImageMagick-6/policy.xml ]; then\n \t\tsed -i -e 's///g' /etc/ImageMagick-6/policy.xml\n\t\tfi\n\n\t\tif [ -f /etc/ImageMagick/policy.xml ]; then\n\t\t\tsed -i -e 's///g' /etc/ImageMagick/policy.xml\n\t\tfi\n\n\t\tif [ ${response} -eq 200 ];then\n\t\t\techo \"Note: PHP Mailer will not work in Azure. Kindly use external SMTP mail server.\"\n\t\tfi\n\t\tset +x\n\t\tcurl -v -L -G -d \"app=board&os=${os}&version=${version}\" -k \"https://restya.com/success_installation.php\"\n\t\techo \"Restyaboard URL : $IPADDR\"\n\n\t\techo \"Login with username admin and password restya\"\n\t\texit 1\n\t}\n\tmain\n\terror=$?\n\tos=$(lsb_release -i -s)\n\tcurl -v -L -G -d \"app=board&os=${os}&error=${error}\" -k \"https://restya.com/error_installation.php\"\n\techo \"If you're finding it difficult to install Restyaboard from your end, we do also offer installation support that you may consider https://restya.com/contact\"\n\texit 1\n} 2>&1 | tee -a /tmp/restyaboard_install.log","user_defined_fields":[]},{"id":912264,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rocket.Chat One-Click","description":"Rocket.Chat One-Click","ordinal":97,"logo_url":"assets/rocketchat.svg","images":["linode/ubuntu20.04"],"deployments_total":1840,"deployments_active":86,"is_public":true,"mine":false,"created":"2021-09-29T17:16:16","updated":"2023-12-26T03:51:35","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nufw allow 3000\nfail2ban_install\n\n# Snapd & rocketchat install\napt install snapd -y\nsnap install rocketchat-server\nsnap info rocketchat-server\n\n# Check DNS\ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n# SSL\nsnap set rocketchat-server siteurl=https://$FQDN\nsystemctl enable --now snap.rocketchat-server.rocketchat-caddy \nsnap restart rocketchat-server\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA","default":""}]},{"id":609048,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ruby on Rails One-Click","description":"Ruby on Rails One-Click","ordinal":98,"logo_url":"assets/rubyonrails.svg","images":["linode/ubuntu20.04"],"deployments_total":460,"deployments_active":20,"is_public":true,"mine":false,"created":"2019-11-05T07:22:54","updated":"2023-12-14T17:59:49","rev_note":"Initial import","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Ruby on Rails\napt install -y ruby rails\n\n# Configure rails Directory\nmkdir /home/railsapp\ncd /home/railsapp\nrails new $RAILSAPP\ncd $RAILSAPP\nrails s -b 0.0.0.0 &\n\n# Start rails app on reboot\ncrontab -l | { cat; echo \"@reboot cd /home/railsapp/app1/ && rails s -b 0.0.0.0 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"railsapp","label":"Rails Application name","example":"railsapp"}]},{"id":401703,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rust One-Click","description":"Rust - Latest One-Click","ordinal":99,"logo_url":"assets/Rust.svg","images":["linode/ubuntu20.04"],"deployments_total":2477,"deployments_active":7,"is_public":true,"mine":false,"created":"2019-03-08T21:09:34","updated":"2023-12-27T05:15:15","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \nsource \n\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"rustserver\"\n\nset_hostname\napt_setup_update\n\n\nif [[ \"$RUSTHOSTNAME\" = \"\" ]]; then\n RUSTHOSTNAME=\"Linode Rust Server\"\nfi\n\nif [[ \"$LEVEL\" = \"Procedural Map\" ]]; then\n LEVEL=\"\"\nfi\n\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix curl \\\nwget file bzip2 gzip unzip bsdmainutils python \\\nutil-linux ca-certificates binutils bc jq tmux \\\nlib32gcc1 libstdc++6 libstdc++6:i386 lib32z1\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Rust\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\ncp /home/rustserver/lgsm/config-lgsm/rustserver/_default.cfg /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nchown -R rustserver:rustserver /home/rustserver/\n\necho \"server.globalchat $GLOBALCHAT/\" > /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.pve $PVE\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.description \\\"$DESCRIPTION\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.maxplayers $MAXPLAYERS\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.seed \\\"$SEED\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.level $LEVEL\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.hostname \\\"$RUSTHOSTNAME\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.ip $IP\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\nsed -i \"s/rconpassword=\\\"CHANGE_ME\\\"/rconpassword=\\\"$RCONPASSWORD\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/worldsize=\\\"3000\\\"/worldsize=\\\"$WORLDSIZE\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/maxplayers=\\\"50\\\"/maxplayers=\\\"$MAXPLAYERS\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\n\n\n# Start the service and setup firewall\nufw allow 28015\nufw allow 28016\n\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rusthostname","label":"Server Hostname","default":"Linode Rust Server"},{"name":"description","label":"Server Description","default":"Powered by Linode!"},{"name":"rconpassword","label":"RCON Password"},{"name":"maxplayers","label":"Maximum Players","oneof":"10,25,50,75,100","default":"50"},{"name":"level","label":"World","oneof":"Procedural Map,Barren,HapisIsland,SavasIsland_koth","default":"Procedural Map"},{"name":"worldsize","label":"World Size","oneof":"1000,3000,6000","default":"3000"},{"name":"seed","label":"Seed","default":"50000"},{"name":"globalchat","label":"Global Chat Enabled","oneof":"true,false","default":"true"},{"name":"pve","label":"PvE Enabled","oneof":"true,false","default":"false"}]},{"id":971042,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Saltcorn One-Click","description":"Saltcorn One-Click","ordinal":100,"logo_url":"assets/saltcorn.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":308,"deployments_active":7,"is_public":true,"mine":false,"created":"2022-02-08T16:21:05","updated":"2023-12-26T16:00:57","rev_note":"","script":"#!/bin/bash\n## Saltcorn Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction saltcorninstall {\n wget -qO - https://deb.nodesource.com/setup_14.x | sudo bash -\n apt-get install -qqy nodejs\n npx saltcorn-install -y\n systemctl enable saltcorn\n systemctl stop saltcorn\n cat < /lib/systemd/system/saltcorn.service\n[Unit]\nDescription=saltcorn\nDocumentation=https://saltcorn.com\nAfter=network.target\n\n[Service]\nType=notify\nWatchdogSec=5\nUser=saltcorn\nWorkingDirectory=/home/saltcorn\nExecStart=/home/saltcorn/.local/bin/saltcorn serve -p 8080\nRestart=always\nEnvironment=\"NODE_ENV=production\"\n\n[Install]\nWantedBy=multi-user.target\nEND\n systemctl daemon-reload\n systemctl start saltcorn\n}\n\nfunction firewallsaltcorn {\n ufw allow 22\n ufw allow 80\n ufw allow 443\n}\n\nfunction nginxreversesaltcorn {\n apt-get install nginx -y\n cat < /etc/nginx/conf.d/saltcorn.conf\nserver {\n listen 80;\n server_name $FQDN $IP;\n\n location / {\n proxy_set_header X-Forwarded-For \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:8080;\n }\n}\nEND\n nginx -t\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\n\nfunction ssl_saltcorn {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n saltcorninstall\n nginxreversesaltcorn\n firewallsaltcorn\n ssl_saltcorn\n\n}\n# Execute\nmain \nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for Letsencrypt SSL","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":774829,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ServerWand One-Click","description":"ServerWand One-Click","ordinal":101,"logo_url":"assets/serverwand.svg","images":["linode/ubuntu22.04"],"deployments_total":1104,"deployments_active":10,"is_public":true,"mine":false,"created":"2021-02-19T17:28:16","updated":"2023-12-28T04:02:56","rev_note":"","script":"#!/bin/bash\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# serverwand ssh key\nmkdir -p /root/.ssh/\nchmod 700 /root/.ssh/\ncurl https://serverwand.com/api/servers/connect > ~/.ssh/authorized_keys\nchmod 600 /root/.ssh/authorized_keys","user_defined_fields":[]},{"id":1177225,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Seatable One-Click","description":"Seatable One-Click App","ordinal":102,"logo_url":"assets/seatable.svg","images":["linode/debian11"],"deployments_total":45,"deployments_active":2,"is_public":true,"mine":false,"created":"2023-05-16T19:56:00","updated":"2023-12-28T00:03:08","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\nsource \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION \n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Update and basic installs\nsystem_update\ndebian_upgrade\nenable_fail2ban\nsystem_install_package ufw ca-certificates curl gnupg lsb-release curl pwgen\n\n# Install docker\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \\\n \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get -y update\napt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose\n\n# Pull current seatable container\ndocker pull seatable/seatable-enterprise:latest\nmkdir /opt/seatable\nwget -O \"/opt/seatable/docker-compose.yml\" \"https://manual.seatable.io/docker/Enterprise-Edition/docker-compose.yml\"\n\n# Prepare SeaTable\nMYSQL_PASSWORD=`pwgen -s 30 1`\nsed -i \"s|DB_ROOT_PASSWD=.*|DB_ROOT_PASSWD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|MYSQL_ROOT_PASSWORD=.*|MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_LETSENCRYPT=.*|SEATABLE_SERVER_LETSENCRYPT=${LE}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_HOSTNAME=.*|SEATABLE_SERVER_HOSTNAME=${URL}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|TIME_ZONE=.*|TIME_ZONE=${TIMEZONE}|\" /opt/seatable/docker-compose.yml\n\n# Add a license\nmkdir -p /opt/seatable/seatable-data/seatable\ntouch /opt/seatable/seatable-data/seatable/seatable-license.txt\ncat << EOF > /opt/seatable/seatable-data/seatable/seatable-license.txt\n#SeaTable server licence\nName = \"Cloud Trial\"\nLicencetype = \"User\"\nLicenceKEY = \"1672935702\"\nProductID = \"SeaTable server\"\nExpiration = \"2024-01-31\"\nMaxUsers = \"3\"\nMode = \"subscription\"\nHash = \"045af708265d7d549cad51fc2b678272a1d15ab8cbfbf05734e371504bb72b388f4441493c7bfeccce7c19ac9c6877cb8f3aecc3beebe685db007832e1c0231728a92772d45dc1c08facbc225d90776f86d34cb4154bafe7c983b6767ffb31a74b133de61edf15c170564fcefb6e457012f63b95ed4aaf6fd2e1e1cfc2ad93a682cfab2fe86f427f7d93ae9b69cbaf02a7565074a95a8c1176402f250d2e815ab206a6b65009c65d94259772ab31a00c11e5c6b57fda0fbb1b22a69734c10214594a5d7b4c88a995eaeb3a65f9aa5d163d9e5c09f73105a4ef760a8421fb66d1982da739c42808fded9a95e456090747e494b0a1aee2a40f388d9f1146051754\"\nEOF\n\n# firewall\nufw limit ssh\nufw allow 80\nufw allow 443\nufw --force enable\n\n# Message of the day\ncat << EOF > /etc/motd\n#############################\n#############################\nSeaTable Enterprise Server\n\nTo finish the installation, change to the directory /opt/seatable and follow our deployment instructions at https://manual.seatable.io/docker/Enterprise-Edition/Deploy%20SeaTable-EE%20with%20Docker/.\nYou can skip the beginning and start directly with the adjustment of the docker-compose.yml file.\n\nPlease visit https://forum.seatable.io for SeaTable community support.\n#############################\n#############################\n\nEOF\n\necho \"Installation complete\"\nall_set\nstackscript_cleanup","user_defined_fields":[{"name":"url","label":"The domain/subdomain for SeaTable Server","example":"https://seatable.example.org"},{"name":"le","label":"Get a Let's Encrypt certificate","default":"True","oneof":"True,False"},{"name":"timezone","label":"Choose your timezone (e.g Europe/Berlin)","example":"Choices can be found here: http://en.wikipedia.org/wiki/List_of_tz_zones_by_name","default":"Etc/UTC"}]},{"id":604068,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Shadowsocks One-Click","description":"Shadowsocks One-Click","ordinal":103,"logo_url":"assets/shadowsocks.svg","images":["linode/ubuntu20.04"],"deployments_total":9445,"deployments_active":373,"is_public":true,"mine":false,"created":"2019-10-22T16:11:39","updated":"2023-12-28T14:29:52","rev_note":"final edit","script":"#!/usr/bin/env bash\n\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Install & configure shadowsocks\nfunction install_shadowsocks {\n apt-get install shadowsocks-libev -y\n cat </etc/shadowsocks-libev/config.json\n{\n\"server\":\"$IP\",\n\"server_port\":8000,\n\"local_port\":1080,\n\"password\":\"$SHADOWPASSWORD\",\n\"timeout\":60,\n\"method\":\"aes-256-gcm\"\n}\nEND\n systemctl start shadowsocks-libev\n systemctl enable shadowsocks-libev\n systemctl restart shadowsocks-libev\n}\n\nfunction shadowsocks_firewall {\n ufw allow 8000\n}\n\nfunction main {\n install_shadowsocks\n shadowsocks_firewall\n stackscript_cleanup\n}\n\n# Execute function\nmain","user_defined_fields":[{"name":"shadowpassword","label":"Shadowsocks Password","example":"Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1243780,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"SimpleX Chat One-Click","description":"SimpleX Chat","ordinal":104,"logo_url":"assets/simplexchat.svg","images":["linode/ubuntu22.04"],"deployments_total":74,"deployments_active":10,"is_public":true,"mine":false,"created":"2023-09-28T15:20:59","updated":"2023-12-26T16:46:34","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Simplex Settings\n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-simplex-chat\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n # Simplex variables\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n if [[ -n ${DOMAIN} && -n ${SUBDOMAIN} ]]; then\n echo \"addr: ${SUBDOMAIN}.${DOMAIN}\" >> ${group_vars}\n elif [[ -n ${DOMAIN} ]]; then\n echo \"addr: ${DOMAIN}\" >> ${group_vars}\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n\n if [[ -n ${SMP_PASSWORD} ]]; then\n echo \"smp_password: ${SMP_PASSWORD}\" >> ${group_vars};\n fi\n\n if [[ -n ${XFTP_QUOTA} ]]; then\n case ${XFTP_QUOTA} in\n *gb) echo \"xftp_quota: ${XFTP_QUOTA}\" >> ${group_vars} ;;\n *) echo \"xftp_quota: ${XFTP_QUOTA}gb\" >> ${group_vars} ;;\n esac\n fi\n\n # Linode variables\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"smp_password","label":"Set password for smp-server.","example":"123qwe","default":""},{"name":"xftp_quota","label":"Set xftp-server file storage quota in GB.","example":"1/5/10/100gb","default":"10gb"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":869153,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Splunk One-Click","description":"Splunk One-Click","ordinal":105,"logo_url":"assets/splunk.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":977,"deployments_active":93,"is_public":true,"mine":false,"created":"2021-07-20T19:04:43","updated":"2023-12-24T03:14:20","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Splunk settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# Configure Splunk\nwget https://download.splunk.com/products/splunk/releases/8.2.0/linux/splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz\nwget \ntar zxvf splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz -C /opt/\nuseradd splunk --system --shell=/usr/sbin/nologin\nchown -R splunk:splunk /opt/splunk\n\napt install -y expect\n SPLUNK_INSTALL=$(expect -c \"\n set timeout 10\n spawn /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 1 --accept-license\n expect \\\"Please enter an administrator username:\\\"\n send \\\"$SPLUNK_USER\\r\\\"\n expect \\\"Please enter a new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect \\\"Please confirm new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect eof\n \")\n\n# Start daemon\nsystemctl start Splunkd\nsystemctl status Splunkd\n\n# Firewall\nufw allow 22 \nufw allow 8000\nufw allow 8089\nufw allow 9997\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"splunk_user","label":"Splunk Admin User"},{"name":"splunk_password","label":"Splunk Admin password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1","default":""},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd","default":""},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1102904,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Superinsight One-Click","description":"Superinsight One-Click app","ordinal":106,"logo_url":"assets/superinsight.svg","images":["linode/ubuntu22.04"],"deployments_total":30,"deployments_active":2,"is_public":true,"mine":false,"created":"2022-12-20T17:43:01","updated":"2023-12-25T03:06:24","rev_note":"","script":"#!/usr/bin/bash\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Install docker\ncurl -fsSL get.docker.com | sudo sh\n\n# Creating Password\necho \"Superinsight setting up password....\"\nADMIN_PASSWORD=$(openssl rand -hex 12)\nNODE_IP=$(hostname -I | cut -f1 -d' ')\necho \"Downloading and Installing Superinsight instance......\"\n\n# Install Superinsight\ndocker run \\\n--detach \\\n--name superinsight-db-standalone \\\n--restart always \\\n-p 5432:5432 \\\n-v vol-superinsight:/db \\\n-e SUPERINSIGHT_USER=admin \\\n-e SUPERINSIGHT_PASSWORD=\"${ADMIN_PASSWORD}\" \\\nsuperinsight/superinsight-db-standalone:latest\n\n\n# Print instructions\ncat << EOF > /etc/motd\n\n################################################################################################################################################\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSUPERINSIGHT\n################################################################################################################################################\n\nSuperinsight created the user admin with password: ${ADMIN_PASSWORD}\nYou can can connect using a database client with the following connection string postgres://admin:${ADMIN_PASSWORD}@${NODE_IP}:5432/superinsight\nFor complete source code and information, visit: https://github.com/superinsight/superinsight-db\n\n################################################################################################################################################\nEOF","user_defined_fields":[]},{"id":401705,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Terraria One-Click","description":"Terraria One-Click","ordinal":107,"logo_url":"assets/Terraria.svg","images":["linode/ubuntu20.04"],"deployments_total":708,"deployments_active":5,"is_public":true,"mine":false,"created":"2019-03-08T21:10:49","updated":"2023-12-21T16:23:20","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n\n#Game config options\n\n#\n#\n#\n#\n#\n#\n#\n\n\n#Non-MVP config options\n#name=\"autocreate\" label=\"autocreate\" default=\"1\"/>\n#name=\"worldpath\" label=\"worldpath\" default=\"~/.local/share/Terraria/Worlds/\"/>\n#name=\"banlist\" label=\"banlist\" default=\"banlist.txt\"/>\n#name=\"priority\" label=\"priority\" default=\"1\"/>\n#name=\"upnp\" label=\"upnp\" default=\"1\"/>\n#name=\"npcstream\" label=\"npcstream\" default=\"60\"/>\n#name=\"secure\" label=\"secure\" default=\"1\"/>\n#name=\"language\" label=\"language\" default=\"en-US\"/>\n\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\nGAMESERVER=\"terrariaserver\"\n\n### UDF to config\n\nif [[ \"$DIFFICULTY\" = \"Normal\" ]]; then\n DIFFICULTY=\"0\"\nelif [[ \"$DIFFICULTY\" = \"Expert\" ]]; then\n DIFFICULTY=\"1\"\nfi\n\nset_hostname\napt_setup_update\n\n\n# Terraria specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\necho Requires Steam username and password to install\nsu - $GAMESERVER -c \"mkdir -p /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER\"\nsu - $GAMESERVER -c \"touch /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steamuser=\\\"$STEAMUSER\\\" >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steampass=\\''$STEAMPASSWORD'\\' >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\n\n# Install Terraria\ngame_install\n\nsed -i s/#seed=AwesomeSeed/seed=\"$SEED\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/worldname=world1/worldname=\"$WORLDNAME\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/difficulty=0/difficulty=\"$DIFFICULTY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/maxplayers=20/maxplayers=\"$MAXPLAYERS\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/port=7777/port=\"$PORT\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/password=/password=\"$PASSWORD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/motd=.*/motd=\"$MOTD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n#Non-MVP config options\n# sed -i s/autocreate=1/autocreate=\"$AUTOCREATE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/worldpath=\\~\\/\\.local\\/share\\/Terraria\\/Worlds\\//worldpath=\"$WORLDPATH\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/banlist=banlist.txt/banlist=\"$BANLIST\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/\\#priority=1/priority=\"$PRIORITY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#npcstream=60/npcstream=\"$NPCSTREAM\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#upnp=1/upnp=\"$UPNP\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/secure=1/secure=\"$SECURE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/language=en\\-US/language=\"$LANGUAGE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n# Setup crons and create systemd service file\nservice_config\n\n# Start the service and setup firewall\nufw_install\nufw allow \"$PORT\"/tcp\nufw allow \"$PORT\"/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"steamuser","label":"Steam Username","example":"username"},{"name":"steampassword","label":"Steam Password, must have Steam Guard turned off for deployment","example":"YourSteamPassword"},{"name":"worldname","label":"World Name","default":"world1"},{"name":"password","label":"Server Password","default":""},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"difficulty","label":"Difficulty Level","oneof":"Normal,Expert","default":"Normal"},{"name":"maxplayers","label":"Maximum Players","oneof":"1,10,20,50,100,200,255,","default":"20"},{"name":"port","label":"Port","default":"7777"},{"name":"seed","label":"Seed","default":"AwesomeSeed"}]},{"id":401704,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"TF2 One-Click","description":"TF2 One-Click","ordinal":108,"logo_url":"assets/TF2.svg","images":["linode/debian11"],"deployments_total":354,"deployments_active":2,"is_public":true,"mine":false,"created":"2019-03-08T21:10:23","updated":"2023-12-12T02:02:35","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nGAMESERVER=\"tf2server\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\nif [[ \"$SERVERNAME\" = \"\" ]]; then\n SERVERNAME=\"Linode TF2 Server\"\nfi\n\n\n# Server config\nset_hostname\napt_setup_update\n\n\n# Teamfortress2 specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\napt -q -y install mailutils postfix curl wget file \\\nbzip2 gzip unzip bsdmainutils python util-linux \\\nca-certificates binutils bc jq tmux lib32gcc-s1 libstdc++6 \\\nlibstdc++6:i386 libcurl4-gnutls-dev:i386 libtcmalloc-minimal4:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Teamfortress2\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\ncp /home/tf2server/lgsm/config-lgsm/tf2server/_default.cfg /home/tf2server/lgsm/config-lgsm/tf2server/common.cfg\n\n# Custom game configs\n> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\ncat <> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile\nEND\n\necho \"hostname $SERVERNAME\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_maxrounds $MAXROUNDS\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_timelimit $TIMELIMIT\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"\\\"$MOTD\\\"\" > /home/tf2server/serverfiles/tf/cfg/motd_default.txt\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27014:27050/tcp\nufw allow 3478:4380/udp\nufw allow 27000:27030/udp\nufw allow 26901\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode TF2 Server"},{"name":"svpassword","label":"Server Password","default":""},{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,3,5,10,15,20","default":"5"},{"name":"timelimit","label":"Round Time Limit","oneof":"10,15,35,45,60","default":"35"},{"name":"rconpassword","label":"RCON password"}]},{"id":1051711,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UniFi Network Application One-Click","description":"UniFi Network Application One-Click","ordinal":109,"logo_url":"assets/unifi.svg","images":["linode/debian10"],"deployments_total":493,"deployments_active":23,"is_public":true,"mine":false,"created":"2022-09-01T15:41:39","updated":"2023-10-18T12:38:34","rev_note":"","script":"#!/bin/bash\n#\n# Script to install UniFi Controller on Linode\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n## install depends \nexport DEBIAN_FRONTEND=noninteractive\napt-get install apt-transport-https ca-certificates wget dirmngr gpg software-properties-common multiarch-support libcommons-daemon-java jsvc openjdk-11-jre-headless -y \n\n# install mongodb req libssl1\nwget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\ndpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\n\n# install mongodb-3.4\nwget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | apt-key add -\necho \"deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main\" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list\napt update && apt upgrade -y\napt install mongodb-org -y \n \n# install latest UniFi Controller \necho 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list\nsudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg \napt update && apt install unifi -yq \n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n location /wss/ {\n proxy_pass https://localhost:8443;\n proxy_http_version 1.1;\n proxy_buffering off;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"Upgrade\";\n proxy_read_timeout 86400;\n }\n location / {\n proxy_pass https://localhost:8443;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http\nufw allow https\nufw allow 53\nufw allow 3479/udp\nufw allow 5514/udp\nufw allow 8080/tcp\nufw allow 8443/tcp\nufw allow 8880/tcp\nufw allow 8843/tcp\nufw allow 27117/tcp\nufw allow 5656:5699/udp\nufw allow 10001/udp \nufw allow 1900/udp\nufw allow 123/udp\nufw enable \n\nsleep 60 \n\n## install SSL certs. required \napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n \n## add some details \ncat << EOF > /etc/motd\n###################\n\n The installation is now complete, and you can access the UniFi Network Controller GUI from https://${ABS_DOMAIN}\n We recommend using the GUI to complete your configurations of the service\n\n################### \nEOF\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970523,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Uptime Kuma One-Click","description":"Uptime Kuma One-Click","ordinal":110,"logo_url":"assets/uptimekuma.svg","images":["linode/ubuntu22.04"],"deployments_total":2330,"deployments_active":407,"is_public":true,"mine":false,"created":"2022-02-07T16:06:08","updated":"2023-12-25T12:50:06","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## KUMA Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-uptimekuma\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n # Uptimekuma vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":925530,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UTunnel VPN One-Click","description":"UTunnel VPN One-Click","ordinal":111,"logo_url":"assets/utunnel.svg","images":["linode/ubuntu20.04"],"deployments_total":1206,"deployments_active":17,"is_public":true,"mine":false,"created":"2021-10-25T18:55:37","updated":"2023-12-27T20:51:42","rev_note":"","script":"#!/bin/bash\n# Update the packages on the system from the distribution repositories.\t\napt-get update\nDEBIAN_FRONTEND=noninteractive apt-get upgrade -y\n\n# Install pre-requisites for docker-ce\n\nDEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common\n\n#Add Docker official GPG key\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\n#Add repository\n\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n\n# Download and install utnservice\n\nmkdir /utunnel\n\ncd /utunnel \n\nwget https://files.utunnel.io/production/deploy/install_bundle_20.tar\n\ntar -xf install_bundle_20.tar\n\nrm -f install_bundle_20.tar","user_defined_fields":[]},{"id":781317,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Valheim One-Click","description":"Valheim One-Click","ordinal":112,"logo_url":"assets/valheim.svg","images":["linode/debian10"],"deployments_total":2437,"deployments_active":54,"is_public":true,"mine":false,"created":"2021-03-01T13:26:36","updated":"2023-12-26T18:44:04","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Valheim Server Settings - Required\n#\n#\n\n## Linode/SSH Security Settings - Required\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n\n# Download and install dependencies\ndpkg --add-architecture i386\nsystem_update\nsystem_install_package curl wget file tar expect bzip2 gzip unzip \\\n bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 \\\n libc6-dev libsdl2-2.0-0:i386\n\n\n# Open the needed firewall ports\nufw allow 2456:2458/udp\nufw allow 4380/udp\nufw allow 27000:27030/udp\n\n# Install linuxGSM\nGAMESERVER='vhserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Set the Valheim dedicated server's name and password\ncat /home/$USERNAME/lgsm/config-lgsm/vhserver/_default.cfg >> /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/servername=\\\"Valheim Server\\\"/servername=\\\"$SERVER_NAME\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/serverpassword=\\\"\\\"/serverpassword=\\\"$SERVER_PASSWORD\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\n\n# Start and enable the Valheim services\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"server_name","label":"The name of the Valheim dedicated server"},{"name":"server_password","label":"The password for the Valheim dedicated server","example":"S3cuReP@s$w0rd"},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":954759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VictoriaMetrics Single One-Click","description":"VictoriaMetrics Single","ordinal":113,"logo_url":"assets/victoriametricssingle.svg","images":["linode/ubuntu20.04"],"deployments_total":40,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-01-06T18:53:56","updated":"2023-12-07T22:56:22","rev_note":"","script":"#!/bin/bash\n# \nsource \nsystem_set_hostname \"$HOSTNAME\"\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=noninteractive\napt update && apt upgrade -y && apt install -y curl wget net-tools traceroute jq\n# Generate files\nmkdir -p /etc/victoriametrics/single\nmkdir -p /var/lib/victoria-metrics-data\nmkdir -p /var/lib/cloud/scripts/per-instance\n# Create victoriametrics user\ngroupadd -r victoriametrics\nuseradd -g victoriametrics -d /var/lib/victoria-metrics-data -s /sbin/nologin --system victoriametrics\nchown -R victoriametrics:victoriametrics /var/lib/victoria-metrics-data\n# Install VictoriaMetrics Single\nVM_VERSION=`curl -sg \"https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/tags\" | jq -r '.[0].name'`\nwget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/${VM_VERSION}/victoria-metrics-linux-amd64-${VM_VERSION}.tar.gz -O /tmp/victoria-metrics.tar.gz\ntar xvf /tmp/victoria-metrics.tar.gz -C /usr/bin\nchmod +x /usr/bin/victoria-metrics-prod\nchown root:root /usr/bin/victoria-metrics-prod\ntouch /etc/victoriametrics/single/scrape.yml\nchown root:root /etc/victoriametrics/single/scrape.yml\ncat </etc/systemd/system/vmsingle.service\n[Unit]\nDescription=VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database.\n# https://docs.victoriametrics.com\nAfter=network.target\n[Service]\nType=simple\nUser=victoriametrics\nGroup=victoriametrics\nWorkingDirectory=/var/lib/victoria-metrics-data\nStartLimitBurst=5\nStartLimitInterval=0\nRestart=on-failure\nRestartSec=5\nEnvironmentFile=-/etc/victoriametrics/single/victoriametrics.conf\nExecStart=/usr/bin/victoria-metrics-prod \\$ARGS\nExecStop=/bin/kill -s SIGTERM \\$MAINPID\nExecReload=/bin/kill -HUP \\$MAINPID\n# See docs https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#tuning\nProtectSystem=full\nLimitNOFILE=1048576\nLimitNPROC=1048576\nLimitCORE=infinity\nStandardOutput=syslog\nStandardError=syslog\nSyslogIdentifier=vmsingle\n[Install]\nWantedBy=multi-user.target\nEND\ncat </etc/victoriametrics/single/victoriametrics.conf\n# See https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#list-of-command-line-flags to get more information about supported command-line flags\n# \n# If you use IPv6 pleas add \"-enableTCP6\" to args line\nARGS=\"-promscrape.config=/etc/victoriametrics/single/scrape.yml -storageDataPath=/var/lib/victoria-metrics-data -retentionPeriod=12 -httpListenAddr=:8428 -graphiteListenAddr=:2003 -opentsdbListenAddr=:4242 -influxListenAddr=:8089 -enableTCP6\"\nEND\ncat < /etc/profile.d/victoriametrics_welcome.sh\n#!/bin/sh\n#\nmyip=$(hostname -I | awk '{print$1}')\n******************************************************************************** \nWelcome to VictoriaMetrics Single.\nTo keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH), 80 (HTTP), and 443 (HTTPS), 8428 (VictoriaMetrics HTTP), 8089 (VictoriaMetrics Influx),\n4242 (VictoriaMetrics OpenTSDB), 2003 (VictoriaMetrics Graphite)\nIn a web browser, you can view:\n * The VictoriaMetrics Quickstart guide: https://kutt.it/1click-quickstart\nOn the server:\n * The default VictoriaMetrics root is located at /var/lib/victoria-metrics-data\n * VictoriaMetrics is running on ports: 8428, 8089, 4242, 2003 and they are bound to the local interface.\n********************************************************************************\n # This image includes version v1.74.0 of VictoriaMetrics. \n # See Release notes https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.70.0\n # Welcome to VictoriaMetrics droplet!\n # Website: https://victoriametrics.com\n # Documentation: https://docs.victoriametrics.com\n # VictoriaMetrics Github : https://github.com/VictoriaMetrics/VictoriaMetrics\n # VictoriaMetrics Slack Community: https://slack.victoriametrics.com\n # VictoriaMetrics Telegram Community: https://t.me/VictoriaMetrics_en\n # VictoriaMetrics config: /etc/victoriametrics/single/victoriametrics.conf\n # VictoriaMetrics scrape config: /etc/victoriametrics/single/scrape.yml\n # VictoriaMetrics UI accessable on: http://your_droplet_public_ipv4:8428/vmui/\nEND\n# Enable UFW and add some rules to it\nsed -e 's|DEFAULT_FORWARD_POLICY=.*|DEFAULT_FORWARD_POLICY=\"ACCEPT\"|g' \\\n -i /etc/default/ufw\nufw allow ssh comment \"SSH port\"\nufw allow http comment \"HTTP port\"\nufw allow https comment \"HTTPS port\"\nufw allow 8428 comment \"VictoriaMetrics Single HTTP port\"\nufw allow 8089/tcp comment \"TCP Influx Listen port for VictoriaMetrics\"\nufw allow 8089/udp comment \"UDP Influx Listen port for VictoriaMetrics\"\nufw allow 2003/tcp comment \"TCP Graphite Listen port for VictoriaMetrics\"\nufw allow 2003/udp comment \"UDP Graphite Listen port for VictoriaMetrics\"\nufw allow 4242 comment \"OpenTSDB Listen port for VictoriaMetrics\"\nufw --force enable\n# Cleaning up\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n# Start VictoriaMetrics\nsystemctl enable vmsingle.service\nsystemctl start vmsingle.service\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]},{"id":662117,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Virtualmin One-Click","description":"Virtualmin One-Click","ordinal":114,"logo_url":"assets/virtualmin.svg","images":["linode/debian10","linode/ubuntu22.04"],"deployments_total":2218,"deployments_active":138,"is_public":true,"mine":false,"created":"2020-08-12T15:46:13","updated":"2023-12-27T00:05:37","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nIFS=$'\\n\\t'\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n# Import the OCA Helper Functions\nsource \n\nfunction install_virtualmin {\n if [ $(cat /etc/os-release | grep -i 'ubuntu' )]; then\n if [ ! $(cat /etc/os-release | grep -i 'lts') ]; then\n printf \"Virtualmin only works with LTS versions of Ubuntu\\n\"\n exit 1;\n fi\n else\n wget http://software.virtualmin.com/gpl/scripts/virtualmin-install.sh -O /root/virtualmin-install.sh && {\n chmod +x /root/virtualmin-install.sh\n /bin/sh /root/virtualmin-install.sh -f -v\n }\n fi\n}\n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Configure firewall and install Fail2Ban\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\nfail2ban_install\n\n# Install Webmin and Virtualmin\nsource \ninstall_virtualmin\n\n# Disable SSL so that everything works\nsed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n# Restart Webmin\nsystemctl restart webmin\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated intrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688903,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VS Code Server One-Click","description":"Visual Studio Code One-Click","ordinal":115,"logo_url":"assets/vscodeserver.svg","images":["linode/debian10"],"deployments_total":5320,"deployments_active":114,"is_public":true,"mine":false,"created":"2020-11-17T21:10:25","updated":"2023-12-28T17:33:24","rev_note":"","script":"#!/usr/bin/env bash\n\n## VS Code Server OCA Script\n\n### UDF Variables\n\n## VS Code Web Password\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n\nfunction get_code_server {\n local -r username=\"$1\" vs_code_ver=\"$2\"\n\n cd \"/home/$username\"\n\n wget \"https://github.com/cdr/code-server/releases/download/v${vs_code_ver}/code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n tar -xf \"code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n mv code-server-*/ bin/\n\n chown -R \"${username}:${username}\" bin/\n chmod +x bin/code-server\n mkdir data/\n chown -R \"${username}:${username}\" data/\n\n cd /root/\n}\n\nfunction enable_code_service {\n local -r vs_code_password=\"$1\" username=\"$2\"\n\n # Set the password in /etc/systemd/system/code-server.service\n cat << EOF > /etc/systemd/system/code-server.service\n[Unit]\nDescription=code-server\nAfter=nginx.service\n[Service]\nUser=$username\nWorkingDirectory=/home/$username\nEnvironment=PASSWORD=$vs_code_password\nExecStart=/home/${username}/bin/code-server --host 127.0.0.1 --user-data-dir /home/${username}/data --auth password\nRestart=always\n[Install]\nWantedBy=multi-user.target\nEOF\n\n # Enable code-server as a service\n systemctl daemon-reload\n systemctl start code-server\n systemctl enable code-server\n}\n\nfunction certbot_standalone {\n local -r email_address=\"$1\" ssl_domain=\"$2\"\n\n # Get an SSL certificate from CertBot\n system_install_package \"certbot\"\n certbot -n certonly --standalone --agree-tos -m \"$email_address\" -d \"$ssl_domain\"\n}\n\nfunction nginx_reverse_proxy {\n local -r ssl_domain=\"$1\"\n\n ## Setup a reverse proxy with Nginx\n system_install_package \"nginx\"\n\n cat << EOF > /etc/nginx/sites-available/code-server\nserver {\n listen 80;\n server_name $ssl_domain;\n # enforce https\n return 301 https://\\$server_name:443\\$request_uri;\n}\nserver {\n listen 443 ssl http2;\n server_name $ssl_domain;\n ssl_certificate /etc/letsencrypt/live/${ssl_domain}/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/${ssl_domain}/privkey.pem;\n location / {\n proxy_pass http://127.0.0.1:8080/;\n proxy_set_header Host \\$host;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection upgrade;\n proxy_set_header Accept-Encoding gzip;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-available/code-server /etc/nginx/sites-enabled\n nginx -t\n systemctl restart nginx\n}\n\n### Install UFW and open the needed firewall ports\nufw allow 80,443/tcp\n\n### Install and configure VS Code Server\nget_code_server \"$USERNAME\" \"$VS_CODE_VER\"\nenable_code_service \"$VS_CODE_PASSWORD\" \"$USERNAME\"\ncheck_dns_propagation \"$FQDN\" \"$IP\"\ncertbot_standalone \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\nnginx_reverse_proxy \"$FQDN\"\n\n### Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"vs_code_password","label":"The password to login to the VS Code Web UI"},{"name":"vs_code_ver","label":"The version of VS Code Server you'd like installed","default":"3.10.2"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"disable_root","label":"Would you like to disable root login over SSH? (Recommended)","oneof":"Yes,No","default":"Yes"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address for your VirtualHost configuration, DNS records (If Required), and SSL certificates (If Required)."},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above","oneof":"Yes,No","default":"No"}]},{"id":923037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WarpSpeed One-Click","description":"WarpSpeed One-Click","ordinal":116,"logo_url":"assets/warpspeed.svg","images":["linode/ubuntu20.04"],"deployments_total":888,"deployments_active":14,"is_public":true,"mine":false,"created":"2021-10-18T01:12:49","updated":"2023-12-27T15:34:40","rev_note":"","script":"#!/bin/bash\nset -o errexit\nset -o nounset\nset -o pipefail\nset -o xtrace\n\n# \n# \n# \n# \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=\"noninteractive\"\napt-get \\\n -o 'Acquire::ForceIPv4=true' \\\n --yes \\\n update\n\napt-get \\\n -o 'DPkg::options::=--force-confdef' \\\n -o 'DPkg::options::=--force-confold' \\\n --yes \\\n install grub-pc\n\napt-get \\\n -o Acquire::ForceIPv4=true \\\n --yes \\\n update\n# # END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Handle the arguments.\nWIRESPEED_ADMIN_EMAIL=\"$(echo -e \"${WIRESPEED_ADMIN_EMAIL}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"$(echo -e \"${WIRESPEED_HTTP_HOST}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//\\//}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//https:/}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//http:/}\"\n\nif [[ -z \"${WIRESPEED_ADMIN_EMAIL}\" ]]; then\n echo \"Missing required parameter: admin email\"\n exit 101\nfi\n\nif [[ -z \"${WIRESPEED_HTTP_HOST}\" ]]; then\n echo \"Missing required parameter: http host\"\n exit 102\nfi\n\nif [[ -z \"${WIRESPEED_DATA_DIR}\" ]]; then\n WIRESPEED_DATA_DIR=\"/wirespeed\"\nfi\n\n# Set hostname\nIP=\"$(hostname --all-ip-addresses | awk '{ print $1 }')\"\nhostnamectl set-hostname \"${WIRESPEED_HTTP_HOST}\"\necho \"${IP} ${WIRESPEED_HTTP_HOST}\" >>/etc/hosts\n\nwget https://bunker.services/wirespeed-installer.sh\nchmod +x wirespeed-installer.sh\n./wirespeed-installer.sh \\\n \"${WIRESPEED_HTTP_HOST}\" \\\n \"${WIRESPEED_DATA_DIR}\" \\\n \"${WIRESPEED_ADMIN_EMAIL}\" \\\n \"${WIRESPEED_ADMIN_PASSWORD}\" \\\n --non-interactive\n\n# Force IPv4 and noninteractive upgrade after script runs to prevent breaking nf_conntrack for UFW\necho 'Acquire::ForceIPv4 \"true\";' >/etc/apt/apt.conf.d/99force-ipv4\napt-get upgrade --yes\n\nfor file in /root/StackScript /root/ssinclude* /root/wirespeed-installer.sh; do\n rm \"${file}\"\ndone\n\necho 'WireSpeed Installation complete!'","user_defined_fields":[{"name":"wirespeed_admin_email","label":"Admin Email","default":"","example":"it@example.com"},{"name":"wirespeed_admin_password","label":"Admin Password","default":"","example":"Password"},{"name":"wirespeed_http_host","label":"DNS Name","default":"","example":"vpn.example.com"},{"name":"wirespeed_data_dir","label":"Data Directory","default":"/wirespeed","example":"/wirespeed"}]},{"id":913276,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Wazuh One-Click","description":"Wazuh One-Click","ordinal":117,"logo_url":"assets/wazuh.svg","images":["linode/ubuntu22.04"],"deployments_total":5611,"deployments_active":825,"is_public":true,"mine":false,"created":"2021-09-30T18:27:36","updated":"2023-12-28T19:27:04","rev_note":"","script":"#!/bin/bash\n\n# #\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings \n#\n#\n#\n\n## Enable logging\n# set -o pipefail\nset -x\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# UFW https://documentation.wazuh.com/current/getting-started/architecture.html\nufw allow 1514\nufw allow 1515\nufw allow 1516\nufw allow 514\nufw allow 55000\nufw allow 443\nufw allow 80\nufw allow 9200\nufw allow 9300\n\n# NGINX\napt install git nginx certbot python3-certbot-nginx -y\n\nmkdir -p /var/www/certs/.well-known\nchown -R www-data:www-data /var/www/certs/\ncat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\nln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\nunlink /etc/nginx/sites-enabled/default\nsystemctl restart nginx\n\n# SSL Certbot\n#certbot certonly --agree-tos --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n\nfunction get_cert {\n if [ \"$1\" == \"dry_run\" ]; then\n certbot certonly --dry-run --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n elif [ \"$1\" == \"run\" ]; then\n certbot certonly --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n fi\n}\n\nfunction propagate {\n while [[ $count -le $retries ]]; do\n echo \"[Info] Let's Encrypt validation failed. Retrying...\"\n sleep 5\n count=$(( $count + 1 ))\n get_cert dry_run\n\n if [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful..\"\n get_cert run\n return 0\n \n fi\n\n # no more retries left. Exit\n if [[ $count -eq $retries ]]; then\n echo \"[Error] Unable to get Let's Encrypt certificate for $FQDN\"\n return 1\n fi\n done\n}\n\ncount=1\nretries=24\nget_cert dry_run\nif [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful. Getting certificate\"\n get_cert run\nelse\n propagate\nfi\n\n# reorder Wazuh script\ncurl -sO https://packages.wazuh.com/4.4/wazuh-install.sh && sudo bash ./wazuh-install.sh -a \ntar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt >> .deployment-secrets.txt\n\n# Set Variables\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\n\n# Place certificates in /etc/wazuh-dashboard/certs/\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\n\n# Restart Kibana\nservice wazuh-dashboard restart\n\n# Create Cert renewal cron script\ncat </root/certbot-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & Kibana\n# Debug\n# set -xo pipefail\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\nservice wazuh-dashboard restart\nEND\n\nchmod +x /root/certbot-renewal.sh\n\n# Setup Cron\ncrontab -l > cron\necho \"* 1 * * 1 bash /root/certbot-renewal.sh\" >> cron\ncrontab cron\nrm cron\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":662116,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webmin One-Click","description":"Webmin One-Click","ordinal":118,"logo_url":"assets/webmin.svg","images":["linode/debian10"],"deployments_total":1209,"deployments_active":34,"is_public":true,"mine":false,"created":"2020-08-12T15:41:21","updated":"2023-12-27T14:09:52","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n#Check if the script is being sourced by another script\n[[ $_ != $0 ]] && readonly SOURCED=1\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction webmin_install {\n # Install webmin\n echo \"deb http://download.webmin.com/download/repository sarge contrib\" >> /etc/apt/sources.list\n wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add\n system_update\n system_install_package \"webmin\"\n}\n\nfunction webmin_configure {\n local -r email_address=\"$1\"\n local -r fqdn=\"$2\"\n\n # Configure the Virtual Host\n cat < /etc/apache2/sites-available/\"${fqdn}.conf\"\n\n ServerAdmin ${email_address}\n ServerName ${fqdn}\n ProxyPass / http://localhost:10000/\n ProxyPassReverse / http://localhost:10000/\n\nEOF\n # Disable SSL in Webmin so Apache can handle it instead\n sed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n # Add FQDN to the list of allowed domains\n echo \"referers=${fqdn}\" >> /etc/webmin/config\n\n # Restart Webmin\n systemctl restart webmin\n\n # Enable proxy_http module\n a2enmod proxy_http\n systemctl restart apache2\n\n # Enable the Virtual Host\n a2ensite \"${fqdn}\"\n systemctl reload apache2\n}\n\n\n# Open the needed firewall ports\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\n\n# Make sure unzip is installed, or else the webmin install will fail\n[ ! -x /usr/bin/unzip ] && system_install_package \"unzip\"\n\n# \"${package_list[@]}\" contains a list of packages to be installed on the system\npackage_list=(\n \"gnupg1\" \\\n \"python\" \\\n \"apt-show-versions\" \\\n \"libapt-pkg-perl\" \\\n \"libauthen-pam-perl\" \\\n \"libio-pty-perl\" \\\n \"libnet-ssleay-perl\"\n)\n\n# Install all of the packages specified in ${package_list[@]}\nsystem_install_package \"${package_list[@]}\"\n\n# Intall Webmin\nwebmin_install\napache_install\nwebmin_configure \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\n\n# Install SSL Certificate - NOT READY YET\n#certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n## Cleanup before exiting\nif [ \"$SOURCED\" -ne 1 ]; then\n stackscript_cleanup\nfi","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webuzo One-Click","description":"Webuzo One-Click","ordinal":119,"logo_url":"assets/webuzo.svg","images":["linode/ubuntu20.04"],"deployments_total":920,"deployments_active":20,"is_public":true,"mine":false,"created":"2020-11-17T21:04:21","updated":"2023-12-27T14:19:40","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library & Helpers\nsource \nsource \nsource \nsource \n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n# Install Prereq's & Services\napt install -y wget\nwget -N http://files.webuzo.com/install.sh\nchmod +x install.sh\n./install.sh\nsleep 2\nsystemctl start webuzo.service\n\n# firewall\nufw allow 25\nufw allow 53\nufw allow 587\nufw allow 2002\nufw allow 2003\nufw allow 2004\nufw allow 2005\n\n# Cleanup \nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":401706,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WireGuard® One-Click","description":"WireGuard One-Click","ordinal":120,"logo_url":"assets/Wireguard.svg","images":["linode/ubuntu22.04"],"deployments_total":9474,"deployments_active":295,"is_public":true,"mine":false,"created":"2019-03-08T21:11:36","updated":"2023-12-28T16:08:20","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n# \n\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### Set hostname, Apt configuration and update/upgrade\n\nset_hostname\napt_setup_update\n\napt install wireguard wireguard-tools linux-headers-$(uname -r) -y\n\nif [[ \"$PORT\" != \"51820\" ]]; then\n PORT=\"$PORT\"\nfi\n\n# Wireguard\n\nwg genkey | tee ~/wg-private.key | wg pubkey > ~/wg-public.key\n\nPRIVATEKEY=`cat ~/wg-private.key`\n\ncat </etc/wireguard/wg0.conf\n[Interface]\nPrivateKey = $PRIVATEKEY\nAddress = $PRIVATEIP\nListenPort = $PORT\nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -A FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -D FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\nSaveConfig = true\n[Peer]\nPublicKey = $PEERPUBKEY\nAllowedIPs = $PRIVATEIP_CLIENT\nEndpoint = $ENDPOINT:$PORT\nEND\n\n### Enable Port Forwarding\nsed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf\nsysctl -p /etc/sysctl.conf\nsysctl --system\n\n### Services\n\n# wg-quick up wg0. #### Removed to let systemctl manage the service\nsystemctl enable wg-quick@wg0\nsystemctl start wg-quick@wg0\nwg show\nufw_install\nufw allow \"$PORT\"/udp\nufw enable\n\nsystemctl restart wg-quick@wg0\n\nstackscript_cleanup","user_defined_fields":[{"name":"port","label":"Port","example":"51820","default":"51820"},{"name":"privateip","label":"Tunnel IP","example":"10.0.0.1/24, 172.16.0.1/24, 192.168.1.1/24, etc","default":"10.0.1.1/24"},{"name":"peerpubkey","label":"WireGuard Public Key (Client)","default":""},{"name":"privateip_client","label":"Tunnel IP (Client)","example":"10.0.0.2/24, 172.16.0.2/24, 192.168.1.2/24 etc","default":"10.0.1.2/24"},{"name":"endpoint","label":"Endpoint IP (Client)","default":""}]},{"id":401708,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WooCommerce One-Click","description":"WooCommerce One-Click","ordinal":121,"logo_url":"assets/WooCommerce.svg","images":["linode/ubuntu22.04"],"deployments_total":4370,"deployments_active":213,"is_public":true,"mine":false,"created":"2019-03-08T21:12:57","updated":"2023-12-27T03:13:32","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-woocommerce\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":741207,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Yacht One-Click","description":"Yacht One-Click","ordinal":122,"logo_url":"assets/yacht.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":990,"deployments_active":17,"is_public":true,"mine":false,"created":"2021-01-26T21:52:26","updated":"2023-12-27T22:07:20","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Yacht Settings \n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-yacht\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # yacht vars\n \n if [[ -n ${YEMAIL} ]]; then\n echo \"yemail: ${YEMAIL}\" >> ${group_vars};\n fi\n\n if [[ -n ${COMPOSE_SUPPORT} ]]; then\n echo \"compose_support: ${COMPOSE_SUPPORT}\" >> ${group_vars};\n fi\n\n if [[ -n ${YTHEME} ]]; then\n echo \"yacht_theme: ${YTHEME}\" >> ${group_vars};\n fi\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"yemail","label":"Yacht Email","example":"admin@yacht.local","default":"admin@yacht.local"},{"name":"compose_support","label":"Yacht Compose Support","example":"Yes","default":"Yes","oneof":"Yes,No"},{"name":"ytheme","label":"Yacht Theme","example":"Default","default":"Default","oneof":"Default,RED,OMV"}]},{"id":741208,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Zabbix One-Click","description":"Zabbix One-Click","ordinal":123,"logo_url":"assets/zabbix.svg","images":["linode/centos-stream8"],"deployments_total":1815,"deployments_active":80,"is_public":true,"mine":false,"created":"2021-01-26T21:56:54","updated":"2023-12-28T12:33:09","rev_note":"","script":"#!/bin/bash\n\n# \n\nsource \n\nsystem_set_hostname \"$HOSTNAME\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Generate files\nmkdir -p /etc/my.cnf.d/\nmkdir -p /etc/nginx/conf.d/\nmkdir -p /etc/php-fpm.d/\nmkdir -p /etc/php.d/\n# mkdir -p /etc/profile.d/\nmkdir -p /etc/motd.d/\nmkdir -p /etc/zabbix/web/\nmkdir -p /var/lib/cloud/scripts/per-instance\n\ncat </etc/my.cnf.d/zabbix.cnf\n[mysqld]\nuser = mysql\nlocal_infile = 0\n\ndatadir = /var/lib/mysql/\n\ndefault-storage-engine = InnoDB\nskip-name-resolve\nkey_buffer_size = 32M\nmax_allowed_packet = 128M\ntable_open_cache = 1024\ntable_definition_cache = 1024\nmax_connections = 2000\njoin_buffer_size = 1M\nsort_buffer_size = 2M\nread_buffer_size = 256K\nread_rnd_buffer_size = 256K\nmyisam_sort_buffer_size = 1M\nthread_cache_size = 512\nopen_files_limit = 10000\nwait_timeout = 86400\n\noptimizer_switch=index_condition_pushdown=off\n\ntmp_table_size = 32M\nmax_heap_table_size = 32M\n\nbinlog_format=mixed\nbinlog_cache_size = 32M\nmax_binlog_size = 256M\nbinlog_expire_logs_seconds = 259200\n\n# innodb_page_size = 32K\ninnodb_buffer_pool_size = 512M\ninnodb_log_file_size = 256M\ninnodb_log_buffer_size = 64M\ninnodb_file_per_table = 1\ninnodb_flush_method = O_DIRECT\ninnodb_buffer_pool_instances = 4\ninnodb_write_io_threads = 4\ninnodb_read_io_threads = 4\ninnodb_adaptive_flushing = 1\ninnodb_lock_wait_timeout = 50\n\ninnodb_flush_log_at_trx_commit = 1\n\ninnodb_io_capacity = 300\ninnodb_io_capacity_max = 400\ninnodb_flush_neighbors = 0\n\ninnodb_doublewrite = 1\ninnodb_thread_concurrency = 0\n\ninnodb_purge_threads = 1\n\nserver_id = 1\nbinlog_checksum = crc32\n\ninnodb_lru_scan_depth = 512\n\ninnodb_stats_on_metadata = 0\n\nEND\n\ncat </etc/nginx/conf.d/zabbix_ssl.conf\nserver {\n listen 0.0.0.0:443 ssl http2;\n # server_name ;\n index index.php;\n\n root \\$webroot;\n charset utf8;\n set \\$webroot '/usr/share/zabbix';\n\n access_log /var/log/nginx/zabbix_access_ssl.log main;\n error_log /var/log/nginx/zabbix_error_ssl.log error;\n\n ssl_stapling on;\n ssl_stapling_verify on;\n\n #resolver 192.168.13.160 192.168.10.24;\n\n ssl_certificate /etc/ssl/certs/zabbix_example.crt;\n ssl_certificate_key /etc/ssl/private/zabbix_example.key;\n\n ssl_dhparam /etc/ssl/private/zabbix_dhparam.pem;\n\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_verify_depth 3;\n #ssl_ciphers HIGH:!aNULL:!MD5;\n ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;\n #ssl_session_cache shared:SSL:10m;\n ssl_session_cache shared:MozSSL:10m;\n ssl_session_timeout 1d;\n ssl_prefer_server_ciphers off;\n ssl_session_tickets off;\n\n add_header Strict-Transport-Security \"max-age=63072000\" always;\n add_header Content-Security-Policy-Report-Only \"default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report\";\n\n location = /favicon.ico {\n log_not_found off;\n }\n\n location / {\n index index.php;\n try_files \\$uri \\$uri/ =404;\n }\n\n location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {\n access_log off;\n expires 10d;\n }\n\n location ~ /\\.ht {\n deny all;\n }\n\n location ~ /(api\\/|conf[^\\.]|include|locale) {\n deny all;\n return 404;\n }\n\n location ~ [^/]\\.php(/|$) {\n fastcgi_pass unix:/run/php-fpm/zabbix.sock;\n fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n fastcgi_index index.php;\n\n fastcgi_param DOCUMENT_ROOT /usr/share/zabbix;\n fastcgi_param SCRIPT_FILENAME /usr/share/zabbix\\$fastcgi_script_name;\n fastcgi_param PATH_TRANSLATED /usr/share/zabbix\\$fastcgi_script_name;\n\n include fastcgi_params;\n fastcgi_param QUERY_STRING \\$query_string;\n fastcgi_param REQUEST_METHOD \\$request_method;\n fastcgi_param CONTENT_TYPE \\$content_type;\n fastcgi_param CONTENT_LENGTH \\$content_length;\n\n fastcgi_intercept_errors on;\n fastcgi_ignore_client_abort off;\n fastcgi_connect_timeout 60;\n fastcgi_send_timeout 180;\n fastcgi_read_timeout 180;\n fastcgi_buffer_size 128k;\n fastcgi_buffers 4 256k;\n fastcgi_busy_buffers_size 256k;\n fastcgi_temp_file_write_size 256k;\n }\n}\n\nEND\n\ncat </etc/nginx/conf.d/zabbix.conf\nserver {\n listen 0.0.0.0:80;\n # server_name zabbix;\n\n return 301 https://\\$host\\$request_uri;\n}\n\nEND\n\ncat </etc/nginx/nginx.conf\n# For more information on configuration, see:\n# * Official English Documentation: http://nginx.org/en/docs/\n# * Official Russian Documentation: http://nginx.org/ru/docs/\n\nuser nginx;\nworker_processes auto;\nworker_priority -5;\nworker_rlimit_nofile 256000;\n\nerror_log /var/log/nginx/error.log;\n\npid /run/nginx.pid;\n\n# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.\ninclude /usr/share/nginx/modules/*.conf;\n\nevents {\n worker_connections 5120;\n use epoll;\n multi_accept on;\n}\n\n\nhttp {\n include /etc/nginx/mime.types;\n default_type application/octet-stream;\n\n log_format main\n '\\$http_x_forwarded_for - \\$remote_user [\\$time_local] '\n '\"\\$request\" \\$status \\$bytes_sent '\n '\"\\$http_referer\" \"\\$http_user_agent\" '\n '\"\\$gzip_ratio\"';\n\n access_log /var/log/nginx/access.log main;\n\n open_file_cache max=200000 inactive=20s;\n open_file_cache_valid 30s;\n open_file_cache_min_uses 2;\n open_file_cache_errors on;\n\n limit_conn_zone \\$binary_remote_addr zone=perip:10m;\n limit_conn_zone \\$server_name zone=perserver:10m;\n\n client_header_timeout 5m;\n client_body_timeout 5m;\n send_timeout 5m;\n\n connection_pool_size 4096;\n client_header_buffer_size 4k;\n large_client_header_buffers 4 4k;\n request_pool_size 4k;\n\n reset_timedout_connection on;\n\n\n gzip on;\n gzip_min_length 100;\n gzip_buffers 4 8k;\n gzip_comp_level 5;\n gzip_types text/plain text/css text/xml application/x-javascript application/xml application/xhtml+xml;\n\n types_hash_max_size 2048;\n\n output_buffers 128 512k;\n postpone_output 1460;\n aio on;\n directio 512;\n\n sendfile on;\n client_max_body_size 8m;\n fastcgi_intercept_errors on;\n\n tcp_nopush on;\n tcp_nodelay on;\n\n keepalive_timeout 75 20;\n\n ignore_invalid_headers on;\n\n index index.php;\n server_tokens off;\n\n # Load modular configuration files from the /etc/nginx/conf.d directory.\n # See http://nginx.org/en/docs/ngx_core_module.html#include\n # for more information.\n include /etc/nginx/conf.d/*.conf;\n}\n\nEND\n\ncat </etc/php-fpm.d/zabbix.conf\n[zabbix]\nuser = apache\ngroup = apache\n\nlisten = /run/php-fpm/zabbix.sock\nlisten.acl_users = apache,nginx\nlisten.allowed_clients = 127.0.0.1\n\npm = dynamic\npm.max_children = 50\npm.start_servers = 5\npm.min_spare_servers = 5\npm.max_spare_servers = 35\n\nphp_value[session.save_handler] = files\nphp_value[session.save_path] = /var/lib/php/session\n\nphp_value[max_execution_time] = 300\nphp_value[memory_limit] = 128M\nphp_value[post_max_size] = 16M\nphp_value[upload_max_filesize] = 2M\nphp_value[max_input_time] = 300\nphp_value[max_input_vars] = 10000\n; php_value[date.timezone] = Europe/Riga\nEND\n\n# cat </etc/php.d/99-zabbix.ini\n# max_execution_time=300\n# memory_limit=128M\n# post_max_size=16M\n# upload_max_filesize=2M\n# max_input_time=300\n# always_populate_raw_post_data=-1\n# max_input_vars=10000\n# date.timezone=UTC\n# session.save_path=/var/lib/php/\n# END\n\n# cat </etc/profile.d/zabbix_welcome.sh\n# #!/bin/sh\n# #\n# myip=\\$(hostname -I | awk '{print\\$1}')\n# cat </etc/motd.d/zabbix\n********************************************************************************\n\nZabbix frontend credentials:\n\nUsername: Admin\n\nPassword: replace_password\n\n\nTo learn about available professional services, including technical suppport and training, please visit https://www.zabbix.com/services\n\nOfficial Zabbix documentation available at https://www.zabbix.com/documentation/current/\n\n\n********************************************************************************\nEND\n\n# cat </etc/systemd/system/zabbix-instance-init.service\n# [Unit]\n# After=mariadb.service\n\n# [Service]\n# ExecStart=/var/lib/cloud/scripts/per-instance/001-zabbix\n\n# [Install]\n# WantedBy=multi-user.target\n# END\n\n# cat </etc/yum.repos.d/MariaDB.repo\n# # MariaDB 10.3 CentOS repository list - created 2019-03-28 10:57 UTC\n# # http://downloads.mariadb.org/mariadb/repositories/\n# [mariadb]\n# name = MariaDB\n# baseurl = http://yum.mariadb.org/10.2/centos7-amd64\n# gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB\n# gpgcheck=1\n# END\n\ncat </etc/yum.repos.d/Nginx.repo\n[nginx-stable]\nname=nginx stable repo\nbaseurl=http://nginx.org/packages/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=1\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\n\n[nginx-mainline]\nname=nginx mainline repo\nbaseurl=http://nginx.org/packages/mainline/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=0\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\nEND\n\ncat </etc/zabbix/web/zabbix.conf.php\n 'http://localhost:9200',\n//\t'text' => 'http://localhost:9200'\n//];\n// Value types stored in Elasticsearch.\n//\\$HISTORY['types'] = ['uint', 'text'];\n\n// Used for SAML authentication.\n// Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings.\n//\\$SSO['SP_KEY']\t\t\t= 'conf/certs/sp.key';\n//\\$SSO['SP_CERT']\t\t\t= 'conf/certs/sp.crt';\n//\\$SSO['IDP_CERT']\t\t= 'conf/certs/idp.crt';\n//\\$SSO['SETTINGS']\t\t= [];\nEND\n\ncat </tmp/zabbix_server_custom.te\nmodule zabbix_server_custom 1.2;\nrequire {\n type zabbix_var_run_t;\n type tmp_t;\n type zabbix_t;\n class sock_file { create unlink write };\n class unix_stream_socket connectto;\n class process setrlimit;\n class capability dac_override;\n}\n#============= zabbix_t ==============\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:process setrlimit;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:unix_stream_socket connectto;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t tmp_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t zabbix_var_run_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:capability dac_override;\nEND\n\n# Installing RPM packages\nyum makecache\nyum -y upgrade\nyum -y install wget\nwget https://dev.mysql.com/get/mysql80-community-release-el8-3.noarch.rpm\ndnf -y install mysql80-community-release-el8-3.noarch.rpm\ndnf -y module disable mysql\ndnf -y install https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm\ndnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\ndnf -y install epel-release\ndnf -y module enable php:remi-8.1\nyum -y install cloud-init cloud-utils-growpart firewalld nginx php-fpm mysql-community-client mysql-community-server java-1.8.0-openjdk-headless zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent zabbix-get zabbix-sender zabbix-java-gateway zabbix-js\n\n\n# Configure firewalld\nsystemctl enable firewalld\nsystemctl start firewalld\nfirewall-cmd --permanent --add-service=ssh --zone=public\nfirewall-cmd --permanent --add-service=http --zone=public\nfirewall-cmd --permanent --add-service=https --zone=public\nfirewall-cmd --permanent --add-port=10051/tcp --zone=public\nfirewall-cmd --reload\n\n# Configure SELinux\nrm -rf /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.pp\ncheckmodule -M -m -o /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.te\nsemodule_package -o /tmp/zabbix_server_custom.pp -m /tmp/zabbix_server_custom.mod\nsemodule -i /tmp/zabbix_server_custom.pp\n\nsetsebool -P httpd_can_connect_zabbix=1\nsetsebool -P zabbix_can_network=1\n\n# Generate SSL certificate\nmkdir -p /etc/ssl/private\nopenssl dhparam -out /etc/ssl/private/zabbix_dhparam.pem 2048\n\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/zabbix_example.key \\\n -out /etc/ssl/certs/zabbix_example.crt -subj \"/C=LV/ST=Riga/L=Riga/O=Global Security/OU=IT Department/CN=example.zabbix.com\"\n\n# Configure Zabbix instance\nsystemctl enable mysqld\nsystemctl disable nginx\nsystemctl disable php-fpm\nsystemctl disable zabbix-server\nsystemctl enable zabbix-agent\nsystemctl enable zabbix-java-gateway\n\nsystemctl stop nginx php-fpm\n\necho \"Requires=multi-user.target\" >> /usr/lib/systemd/system/cloud-init.target\n\nsystemctl set-default cloud-init.target\n\nchown -R apache:apache /var/lib/php/\n\nchmod g+r /etc/zabbix/zabbix_server.conf\nchmod o+w /run/zabbix/\n\nchmod 755 /etc/my.cnf\nchmod -R 755 /etc/my.cnf.d/\n\nsed -i 's/^#PrintMotd yes/&\\nPrintMotd no/g' /etc/ssh/sshd_config\n\nsed -i '/^; php_value\\[date.timezone\\] /s/^; //' /etc/php-fpm.d/zabbix.conf\n\nsed -i 's/^# JavaGateway=.*/&\\nJavaGateway=127.0.0.1/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# StartJavaPollers=.*/&\\nStartJavaPollers=5/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# LISTEN_IP=.*/&\\nLISTEN_IP=\"127.0.0.1\"/g' /etc/zabbix/zabbix_java_gateway.conf\n\nescape_spec_char() {\n local var_value=$1\n\n var_value=\"${var_value//\\\\/\\\\\\\\}\"\n var_value=\"${var_value//[$'\\n']/}\"\n var_value=\"${var_value//\\//\\\\/}\"\n var_value=\"${var_value//./\\\\.}\"\n var_value=\"${var_value//\\*/\\\\*}\"\n var_value=\"${var_value//^/\\\\^}\"\n var_value=\"${var_value//\\$/\\\\$}\"\n var_value=\"${var_value//\\&/\\\\&}\"\n var_value=\"${var_value//\\[/\\\\[}\"\n var_value=\"${var_value//\\]/\\\\]}\"\n\n echo \"$var_value\"\n}\n\nsystemctl start mysqld\nsystemctl enable mysqld\nsystemctl enable nginx\nsystemctl enable php-fpm\nsystemctl enable zabbix-server\n\nDB_ROOT_TMP_PASS=$(grep 'temporary password' /var/log/mysqld.log | awk '{print $13}' | tail -1)\nWEB_PASS=$(openssl rand -base64 14)\nWEB_PASS=${WEB_PASS%?}\nINST_NAME=$(hostname)\n\nrm -f /root/.my.cnf\n\nDB_ROOT_PASS=$(MYSQL_PWD=\"$DB_ROOT_TMP_PASS\" mysql --connect-expired-password -s -N -e \"SET PASSWORD FOR root@localhost TO RANDOM;\" | awk '{print $3}')\nDB_ZBX_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_srv'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\nDB_ZBXWEB_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_web'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"CREATE DATABASE zabbix CHARACTER SET 'utf8' COLLATE 'utf8_bin'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP, ALTER, INDEX, REFERENCES ON zabbix.* TO 'zabbix_srv'@'localhost'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP ON zabbix.* TO 'zabbix_web'@'localhost'\"\n\ncat > /root/.my.cnf << EOF\n[client]\npassword=\"$DB_ROOT_PASS\"\nEOF\n\nzcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -uroot zabbix\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"UPDATE users SET passwd = MD5('$WEB_PASS') WHERE username = 'Admin'\" zabbix\n\nWEB_PASS=$(escape_spec_char \"$WEB_PASS\")\nsed -i \"s/replace_password/$WEB_PASS/g\" /etc/motd.d/zabbix\n\nsed -i \"s/replace_name/$INST_NAME/g\" /etc/zabbix/web/zabbix.conf.php\n\nDB_ZBX_PASS=$(escape_spec_char \"$DB_ZBX_PASS\")\nDB_ZBXWEB_PASS=$(escape_spec_char \"$DB_ZBXWEB_PASS\")\n\nsed -i \"s/^DBUser=.*/DBUser=zabbix_srv/g\" /etc/zabbix/zabbix_server.conf\nsed -i -e \"/^[#;] DBPassword=/s/.*/&\\nDBPassword=$DB_ZBX_PASS/\" /etc/zabbix/zabbix_server.conf\nsed -i \"s/replace_password/$DB_ZBXWEB_PASS/g\" /etc/zabbix/web/zabbix.conf.php\nsed -i \"s/replace_user/zabbix_web/g\" /etc/zabbix/web/zabbix.conf.php\n\n# Cleaning up remote machine\nrm -rf /etc/nginx/conf.d/default.conf\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n\n\n\nsystemctl start zabbix-server zabbix-agent zabbix-java-gateway\nsystemctl start nginx php-fpm\n\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]}],"page":1,"pages":1,"results":129} \ No newline at end of file diff --git a/packages/manager/src/cachedData/regions.json b/packages/manager/src/cachedData/regions.json index 3becff548ed..7aad2b37b8f 100644 --- a/packages/manager/src/cachedData/regions.json +++ b/packages/manager/src/cachedData/regions.json @@ -1 +1 @@ -{"data":[{"id":"ap-west","label":"Mumbai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.34.5, 172.105.35.5, 172.105.36.5, 172.105.37.5, 172.105.38.5, 172.105.39.5, 172.105.40.5, 172.105.41.5, 172.105.42.5, 172.105.43.5","ipv6":"2400:8904::f03c:91ff:fea5:659, 2400:8904::f03c:91ff:fea5:9282, 2400:8904::f03c:91ff:fea5:b9b3, 2400:8904::f03c:91ff:fea5:925a, 2400:8904::f03c:91ff:fea5:22cb, 2400:8904::f03c:91ff:fea5:227a, 2400:8904::f03c:91ff:fea5:924c, 2400:8904::f03c:91ff:fea5:f7e2, 2400:8904::f03c:91ff:fea5:2205, 2400:8904::f03c:91ff:fea5:9207"}},{"id":"ca-central","label":"Toronto, CA","country":"ca","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.0.5, 172.105.3.5, 172.105.4.5, 172.105.5.5, 172.105.6.5, 172.105.7.5, 172.105.8.5, 172.105.9.5, 172.105.10.5, 172.105.11.5","ipv6":"2600:3c04::f03c:91ff:fea9:f63, 2600:3c04::f03c:91ff:fea9:f6d, 2600:3c04::f03c:91ff:fea9:f80, 2600:3c04::f03c:91ff:fea9:f0f, 2600:3c04::f03c:91ff:fea9:f99, 2600:3c04::f03c:91ff:fea9:fbd, 2600:3c04::f03c:91ff:fea9:fdd, 2600:3c04::f03c:91ff:fea9:fe2, 2600:3c04::f03c:91ff:fea9:f68, 2600:3c04::f03c:91ff:fea9:f4a"}},{"id":"ap-southeast","label":"Sydney, AU","country":"au","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.166.5, 172.105.169.5, 172.105.168.5, 172.105.172.5, 172.105.162.5, 172.105.170.5, 172.105.167.5, 172.105.171.5, 172.105.181.5, 172.105.161.5","ipv6":"2400:8907::f03c:92ff:fe6e:ec8, 2400:8907::f03c:92ff:fe6e:98e4, 2400:8907::f03c:92ff:fe6e:1c58, 2400:8907::f03c:92ff:fe6e:c299, 2400:8907::f03c:92ff:fe6e:c210, 2400:8907::f03c:92ff:fe6e:c219, 2400:8907::f03c:92ff:fe6e:1c5c, 2400:8907::f03c:92ff:fe6e:c24e, 2400:8907::f03c:92ff:fe6e:e6b, 2400:8907::f03c:92ff:fe6e:e3d"}},{"id":"us-iad","label":"Washington, DC","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"139.144.192.62, 139.144.192.60, 139.144.192.61, 139.144.192.53, 139.144.192.54, 139.144.192.67, 139.144.192.69, 139.144.192.66, 139.144.192.52, 139.144.192.68","ipv6":"2600:3c05::f03c:93ff:feb6:43b6, 2600:3c05::f03c:93ff:feb6:4365, 2600:3c05::f03c:93ff:feb6:43c2, 2600:3c05::f03c:93ff:feb6:e441, 2600:3c05::f03c:93ff:feb6:94ef, 2600:3c05::f03c:93ff:feb6:94ba, 2600:3c05::f03c:93ff:feb6:94a8, 2600:3c05::f03c:93ff:feb6:9413, 2600:3c05::f03c:93ff:feb6:9443, 2600:3c05::f03c:93ff:feb6:94e0"}},{"id":"us-ord","label":"Chicago, IL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.0.17, 172.232.0.16, 172.232.0.21, 172.232.0.13, 172.232.0.22, 172.232.0.9, 172.232.0.19, 172.232.0.20, 172.232.0.15, 172.232.0.18","ipv6":"2600:3c06::f03c:93ff:fed0:e5fc, 2600:3c06::f03c:93ff:fed0:e54b, 2600:3c06::f03c:93ff:fed0:e572, 2600:3c06::f03c:93ff:fed0:e530, 2600:3c06::f03c:93ff:fed0:e597, 2600:3c06::f03c:93ff:fed0:e511, 2600:3c06::f03c:93ff:fed0:e5f2, 2600:3c06::f03c:93ff:fed0:e5bf, 2600:3c06::f03c:93ff:fed0:e529, 2600:3c06::f03c:93ff:fed0:e5a3"}},{"id":"fr-par","label":"Paris, FR","country":"fr","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.32.21, 172.232.32.23, 172.232.32.17, 172.232.32.18, 172.232.32.16, 172.232.32.22, 172.232.32.20, 172.232.32.14, 172.232.32.11, 172.232.32.12","ipv6":"2600:3c07::f03c:93ff:fef2:2e63, 2600:3c07::f03c:93ff:fef2:2ec7, 2600:3c07::f03c:93ff:fef2:0dee, 2600:3c07::f03c:93ff:fef2:0d25, 2600:3c07::f03c:93ff:fef2:0de0, 2600:3c07::f03c:93ff:fef2:2e29, 2600:3c07::f03c:93ff:fef2:0dda, 2600:3c07::f03c:93ff:fef2:0d82, 2600:3c07::f03c:93ff:fef2:b3ac, 2600:3c07::f03c:93ff:fef2:b3a8"}},{"id":"us-sea","label":"Seattle, WA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.160.19, 172.232.160.21, 172.232.160.17, 172.232.160.15, 172.232.160.18, 172.232.160.8, 172.232.160.12, 172.232.160.11, 172.232.160.14, 172.232.160.16","ipv6":"2600:3c0a::f03c:93ff:fe54:c6da, 2600:3c0a::f03c:93ff:fe54:c691, 2600:3c0a::f03c:93ff:fe54:c68d, 2600:3c0a::f03c:93ff:fe54:c61e, 2600:3c0a::f03c:93ff:fe54:c653, 2600:3c0a::f03c:93ff:fe54:c64c, 2600:3c0a::f03c:93ff:fe54:c68a, 2600:3c0a::f03c:93ff:fe54:c697, 2600:3c0a::f03c:93ff:fe54:c60f, 2600:3c0a::f03c:93ff:fe54:c6a0"}},{"id":"br-gru","label":"Sao Paulo, BR","country":"br","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.0.4, 172.233.0.9, 172.233.0.7, 172.233.0.12, 172.233.0.5, 172.233.0.13, 172.233.0.10, 172.233.0.6, 172.233.0.8, 172.233.0.11","ipv6":"2600:3c0d::f03c:93ff:fe3d:51cb, 2600:3c0d::f03c:93ff:fe3d:51a7, 2600:3c0d::f03c:93ff:fe3d:51a9, 2600:3c0d::f03c:93ff:fe3d:5119, 2600:3c0d::f03c:93ff:fe3d:51fe, 2600:3c0d::f03c:93ff:fe3d:517c, 2600:3c0d::f03c:93ff:fe3d:5144, 2600:3c0d::f03c:93ff:fe3d:5170, 2600:3c0d::f03c:93ff:fe3d:51cc, 2600:3c0d::f03c:93ff:fe3d:516c"}},{"id":"nl-ams","label":"Amsterdam, NL","country":"nl","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.33.36, 172.233.33.38, 172.233.33.35, 172.233.33.39, 172.233.33.34, 172.233.33.33, 172.233.33.31, 172.233.33.30, 172.233.33.37, 172.233.33.32","ipv6":"2600:3c0e::f03c:93ff:fe9d:2d10, 2600:3c0e::f03c:93ff:fe9d:2d89, 2600:3c0e::f03c:93ff:fe9d:2d79, 2600:3c0e::f03c:93ff:fe9d:2d96, 2600:3c0e::f03c:93ff:fe9d:2da5, 2600:3c0e::f03c:93ff:fe9d:2d34, 2600:3c0e::f03c:93ff:fe9d:2d68, 2600:3c0e::f03c:93ff:fe9d:2d17, 2600:3c0e::f03c:93ff:fe9d:2d45, 2600:3c0e::f03c:93ff:fe9d:2d5c"}},{"id":"se-sto","label":"Stockholm, SE","country":"se","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.128.24, 172.232.128.26, 172.232.128.20, 172.232.128.22, 172.232.128.25, 172.232.128.19, 172.232.128.23, 172.232.128.18, 172.232.128.21, 172.232.128.27","ipv6":"2600:3c09::f03c:93ff:fea9:4dbe, 2600:3c09::f03c:93ff:fea9:4d63, 2600:3c09::f03c:93ff:fea9:4dce, 2600:3c09::f03c:93ff:fea9:4dbb, 2600:3c09::f03c:93ff:fea9:4d99, 2600:3c09::f03c:93ff:fea9:4d26, 2600:3c09::f03c:93ff:fea9:4de0, 2600:3c09::f03c:93ff:fea9:4d69, 2600:3c09::f03c:93ff:fea9:4dbf, 2600:3c09::f03c:93ff:fea9:4da6"}},{"id":"in-maa","label":"Chennai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.96.17, 172.232.96.26, 172.232.96.19, 172.232.96.20, 172.232.96.25, 172.232.96.21, 172.232.96.18, 172.232.96.22, 172.232.96.23, 172.232.96.24","ipv6":"2600:3c08::f03c:93ff:fe7c:1135, 2600:3c08::f03c:93ff:fe7c:11f8, 2600:3c08::f03c:93ff:fe7c:11d2, 2600:3c08::f03c:93ff:fe7c:11a7, 2600:3c08::f03c:93ff:fe7c:11ad, 2600:3c08::f03c:93ff:fe7c:110a, 2600:3c08::f03c:93ff:fe7c:11f9, 2600:3c08::f03c:93ff:fe7c:1137, 2600:3c08::f03c:93ff:fe7c:11db, 2600:3c08::f03c:93ff:fe7c:1164"}},{"id":"jp-osa","label":"Osaka, JP","country":"jp","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.64.44, 172.233.64.43, 172.233.64.37, 172.233.64.40, 172.233.64.46, 172.233.64.41, 172.233.64.39, 172.233.64.42, 172.233.64.45, 172.233.64.38","ipv6":"2400:8905::f03c:93ff:fe9d:b085, 2400:8905::f03c:93ff:fe9d:b012, 2400:8905::f03c:93ff:fe9d:b09b, 2400:8905::f03c:93ff:fe9d:b0d8, 2400:8905::f03c:93ff:fe9d:259f, 2400:8905::f03c:93ff:fe9d:b006, 2400:8905::f03c:93ff:fe9d:b084, 2400:8905::f03c:93ff:fe9d:b0ce, 2400:8905::f03c:93ff:fe9d:25ea, 2400:8905::f03c:93ff:fe9d:b086"}},{"id":"it-mil","label":"Milan, IT","country":"it","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.192.19, 172.232.192.18, 172.232.192.16, 172.232.192.20, 172.232.192.24, 172.232.192.21, 172.232.192.22, 172.232.192.17, 172.232.192.15, 172.232.192.23","ipv6":"2600:3c0b::f03c:93ff:feba:d513, 2600:3c0b::f03c:93ff:feba:d5c3, 2600:3c0b::f03c:93ff:feba:d597, 2600:3c0b::f03c:93ff:feba:d5fb, 2600:3c0b::f03c:93ff:feba:d51f, 2600:3c0b::f03c:93ff:feba:d58e, 2600:3c0b::f03c:93ff:feba:d5d5, 2600:3c0b::f03c:93ff:feba:d534, 2600:3c0b::f03c:93ff:feba:d57c, 2600:3c0b::f03c:93ff:feba:d529"}},{"id":"us-mia","label":"Miami, FL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.160.34, 172.233.160.27, 172.233.160.30, 172.233.160.29, 172.233.160.32, 172.233.160.28, 172.233.160.33, 172.233.160.26, 172.233.160.25, 172.233.160.31","ipv6":"2a01:7e04::f03c:93ff:fead:d31f, 2a01:7e04::f03c:93ff:fead:d37f, 2a01:7e04::f03c:93ff:fead:d30c, 2a01:7e04::f03c:93ff:fead:d318, 2a01:7e04::f03c:93ff:fead:d316, 2a01:7e04::f03c:93ff:fead:d339, 2a01:7e04::f03c:93ff:fead:d367, 2a01:7e04::f03c:93ff:fead:d395, 2a01:7e04::f03c:93ff:fead:d3d0, 2a01:7e04::f03c:93ff:fead:d38e"}},{"id":"id-cgk","label":"Jakarta, ID","country":"id","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.224.23, 172.232.224.32, 172.232.224.26, 172.232.224.27, 172.232.224.21, 172.232.224.24, 172.232.224.22, 172.232.224.20, 172.232.224.31, 172.232.224.28","ipv6":"2600:3c0c::f03c:93ff:feed:a90b, 2600:3c0c::f03c:93ff:feed:a9a5, 2600:3c0c::f03c:93ff:feed:a935, 2600:3c0c::f03c:93ff:feed:a930, 2600:3c0c::f03c:93ff:feed:a95c, 2600:3c0c::f03c:93ff:feed:a9ad, 2600:3c0c::f03c:93ff:feed:a9f2, 2600:3c0c::f03c:93ff:feed:a9ff, 2600:3c0c::f03c:93ff:feed:a9c8, 2600:3c0c::f03c:93ff:feed:a96b"}},{"id":"us-lax","label":"Los Angeles, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.128.45, 172.233.128.38, 172.233.128.53, 172.233.128.37, 172.233.128.34, 172.233.128.36, 172.233.128.33, 172.233.128.39, 172.233.128.43, 172.233.128.44","ipv6":"2a01:7e03::f03c:93ff:feb1:b789, 2a01:7e03::f03c:93ff:feb1:b717, 2a01:7e03::f03c:93ff:feb1:b707, 2a01:7e03::f03c:93ff:feb1:b7ab, 2a01:7e03::f03c:93ff:feb1:b7e2, 2a01:7e03::f03c:93ff:feb1:b709, 2a01:7e03::f03c:93ff:feb1:b7a6, 2a01:7e03::f03c:93ff:feb1:b750, 2a01:7e03::f03c:93ff:feb1:b76e, 2a01:7e03::f03c:93ff:feb1:b7a2"}},{"id":"us-central","label":"Dallas, TX","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"72.14.179.5, 72.14.188.5, 173.255.199.5, 66.228.53.5, 96.126.122.5, 96.126.124.5, 96.126.127.5, 198.58.107.5, 198.58.111.5, 23.239.24.5","ipv6":"2600:3c00::2, 2600:3c00::9, 2600:3c00::7, 2600:3c00::5, 2600:3c00::3, 2600:3c00::8, 2600:3c00::6, 2600:3c00::4, 2600:3c00::c, 2600:3c00::b"}},{"id":"us-west","label":"Fremont, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"173.230.145.5, 173.230.147.5, 173.230.155.5, 173.255.212.5, 173.255.219.5, 173.255.241.5, 173.255.243.5, 173.255.244.5, 74.207.241.5, 74.207.242.5","ipv6":"2600:3c01::2, 2600:3c01::9, 2600:3c01::5, 2600:3c01::7, 2600:3c01::3, 2600:3c01::8, 2600:3c01::4, 2600:3c01::b, 2600:3c01::c, 2600:3c01::6"}},{"id":"us-southeast","label":"Atlanta, GA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"74.207.231.5, 173.230.128.5, 173.230.129.5, 173.230.136.5, 173.230.140.5, 66.228.59.5, 66.228.62.5, 50.116.35.5, 50.116.41.5, 23.239.18.5","ipv6":"2600:3c02::3, 2600:3c02::5, 2600:3c02::4, 2600:3c02::6, 2600:3c02::c, 2600:3c02::7, 2600:3c02::2, 2600:3c02::9, 2600:3c02::8, 2600:3c02::b"}},{"id":"us-east","label":"Newark, NJ","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Bare Metal","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"66.228.42.5, 96.126.106.5, 50.116.53.5, 50.116.58.5, 50.116.61.5, 50.116.62.5, 66.175.211.5, 97.107.133.4, 207.192.69.4, 207.192.69.5","ipv6":"2600:3c03::7, 2600:3c03::4, 2600:3c03::9, 2600:3c03::6, 2600:3c03::3, 2600:3c03::c, 2600:3c03::5, 2600:3c03::b, 2600:3c03::2, 2600:3c03::8"}},{"id":"eu-west","label":"London, UK","country":"gb","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"178.79.182.5, 176.58.107.5, 176.58.116.5, 176.58.121.5, 151.236.220.5, 212.71.252.5, 212.71.253.5, 109.74.192.20, 109.74.193.20, 109.74.194.20","ipv6":"2a01:7e00::9, 2a01:7e00::3, 2a01:7e00::c, 2a01:7e00::5, 2a01:7e00::6, 2a01:7e00::8, 2a01:7e00::b, 2a01:7e00::4, 2a01:7e00::7, 2a01:7e00::2"}},{"id":"ap-south","label":"Singapore, SG","country":"sg","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.11.5, 139.162.13.5, 139.162.14.5, 139.162.15.5, 139.162.16.5, 139.162.21.5, 139.162.27.5, 103.3.60.18, 103.3.60.19, 103.3.60.20","ipv6":"2400:8901::5, 2400:8901::4, 2400:8901::b, 2400:8901::3, 2400:8901::9, 2400:8901::2, 2400:8901::8, 2400:8901::7, 2400:8901::c, 2400:8901::6"}},{"id":"eu-central","label":"Frankfurt, DE","country":"de","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.130.5, 139.162.131.5, 139.162.132.5, 139.162.133.5, 139.162.134.5, 139.162.135.5, 139.162.136.5, 139.162.137.5, 139.162.138.5, 139.162.139.5","ipv6":"2a01:7e01::5, 2a01:7e01::9, 2a01:7e01::7, 2a01:7e01::c, 2a01:7e01::2, 2a01:7e01::4, 2a01:7e01::3, 2a01:7e01::6, 2a01:7e01::b, 2a01:7e01::8"}}],"page":1,"pages":1,"results":23} \ No newline at end of file +{"data":[{"id":"ap-west","label":"Mumbai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.34.5, 172.105.35.5, 172.105.36.5, 172.105.37.5, 172.105.38.5, 172.105.39.5, 172.105.40.5, 172.105.41.5, 172.105.42.5, 172.105.43.5","ipv6":"2400:8904::f03c:91ff:fea5:659, 2400:8904::f03c:91ff:fea5:9282, 2400:8904::f03c:91ff:fea5:b9b3, 2400:8904::f03c:91ff:fea5:925a, 2400:8904::f03c:91ff:fea5:22cb, 2400:8904::f03c:91ff:fea5:227a, 2400:8904::f03c:91ff:fea5:924c, 2400:8904::f03c:91ff:fea5:f7e2, 2400:8904::f03c:91ff:fea5:2205, 2400:8904::f03c:91ff:fea5:9207"}},{"id":"ca-central","label":"Toronto, CA","country":"ca","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.0.5, 172.105.3.5, 172.105.4.5, 172.105.5.5, 172.105.6.5, 172.105.7.5, 172.105.8.5, 172.105.9.5, 172.105.10.5, 172.105.11.5","ipv6":"2600:3c04::f03c:91ff:fea9:f63, 2600:3c04::f03c:91ff:fea9:f6d, 2600:3c04::f03c:91ff:fea9:f80, 2600:3c04::f03c:91ff:fea9:f0f, 2600:3c04::f03c:91ff:fea9:f99, 2600:3c04::f03c:91ff:fea9:fbd, 2600:3c04::f03c:91ff:fea9:fdd, 2600:3c04::f03c:91ff:fea9:fe2, 2600:3c04::f03c:91ff:fea9:f68, 2600:3c04::f03c:91ff:fea9:f4a"}},{"id":"ap-southeast","label":"Sydney, AU","country":"au","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.166.5, 172.105.169.5, 172.105.168.5, 172.105.172.5, 172.105.162.5, 172.105.170.5, 172.105.167.5, 172.105.171.5, 172.105.181.5, 172.105.161.5","ipv6":"2400:8907::f03c:92ff:fe6e:ec8, 2400:8907::f03c:92ff:fe6e:98e4, 2400:8907::f03c:92ff:fe6e:1c58, 2400:8907::f03c:92ff:fe6e:c299, 2400:8907::f03c:92ff:fe6e:c210, 2400:8907::f03c:92ff:fe6e:c219, 2400:8907::f03c:92ff:fe6e:1c5c, 2400:8907::f03c:92ff:fe6e:c24e, 2400:8907::f03c:92ff:fe6e:e6b, 2400:8907::f03c:92ff:fe6e:e3d"}},{"id":"us-iad","label":"Washington, DC","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"139.144.192.62, 139.144.192.60, 139.144.192.61, 139.144.192.53, 139.144.192.54, 139.144.192.67, 139.144.192.69, 139.144.192.66, 139.144.192.52, 139.144.192.68","ipv6":"2600:3c05::f03c:93ff:feb6:43b6, 2600:3c05::f03c:93ff:feb6:4365, 2600:3c05::f03c:93ff:feb6:43c2, 2600:3c05::f03c:93ff:feb6:e441, 2600:3c05::f03c:93ff:feb6:94ef, 2600:3c05::f03c:93ff:feb6:94ba, 2600:3c05::f03c:93ff:feb6:94a8, 2600:3c05::f03c:93ff:feb6:9413, 2600:3c05::f03c:93ff:feb6:9443, 2600:3c05::f03c:93ff:feb6:94e0"}},{"id":"us-ord","label":"Chicago, IL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.0.17, 172.232.0.16, 172.232.0.21, 172.232.0.13, 172.232.0.22, 172.232.0.9, 172.232.0.19, 172.232.0.20, 172.232.0.15, 172.232.0.18","ipv6":"2600:3c06::f03c:93ff:fed0:e5fc, 2600:3c06::f03c:93ff:fed0:e54b, 2600:3c06::f03c:93ff:fed0:e572, 2600:3c06::f03c:93ff:fed0:e530, 2600:3c06::f03c:93ff:fed0:e597, 2600:3c06::f03c:93ff:fed0:e511, 2600:3c06::f03c:93ff:fed0:e5f2, 2600:3c06::f03c:93ff:fed0:e5bf, 2600:3c06::f03c:93ff:fed0:e529, 2600:3c06::f03c:93ff:fed0:e5a3"}},{"id":"fr-par","label":"Paris, FR","country":"fr","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.32.21, 172.232.32.23, 172.232.32.17, 172.232.32.18, 172.232.32.16, 172.232.32.22, 172.232.32.20, 172.232.32.14, 172.232.32.11, 172.232.32.12","ipv6":"2600:3c07::f03c:93ff:fef2:2e63, 2600:3c07::f03c:93ff:fef2:2ec7, 2600:3c07::f03c:93ff:fef2:0dee, 2600:3c07::f03c:93ff:fef2:0d25, 2600:3c07::f03c:93ff:fef2:0de0, 2600:3c07::f03c:93ff:fef2:2e29, 2600:3c07::f03c:93ff:fef2:0dda, 2600:3c07::f03c:93ff:fef2:0d82, 2600:3c07::f03c:93ff:fef2:b3ac, 2600:3c07::f03c:93ff:fef2:b3a8"}},{"id":"us-sea","label":"Seattle, WA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.160.19, 172.232.160.21, 172.232.160.17, 172.232.160.15, 172.232.160.18, 172.232.160.8, 172.232.160.12, 172.232.160.11, 172.232.160.14, 172.232.160.16","ipv6":"2600:3c0a::f03c:93ff:fe54:c6da, 2600:3c0a::f03c:93ff:fe54:c691, 2600:3c0a::f03c:93ff:fe54:c68d, 2600:3c0a::f03c:93ff:fe54:c61e, 2600:3c0a::f03c:93ff:fe54:c653, 2600:3c0a::f03c:93ff:fe54:c64c, 2600:3c0a::f03c:93ff:fe54:c68a, 2600:3c0a::f03c:93ff:fe54:c697, 2600:3c0a::f03c:93ff:fe54:c60f, 2600:3c0a::f03c:93ff:fe54:c6a0"}},{"id":"br-gru","label":"Sao Paulo, BR","country":"br","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.0.4, 172.233.0.9, 172.233.0.7, 172.233.0.12, 172.233.0.5, 172.233.0.13, 172.233.0.10, 172.233.0.6, 172.233.0.8, 172.233.0.11","ipv6":"2600:3c0d::f03c:93ff:fe3d:51cb, 2600:3c0d::f03c:93ff:fe3d:51a7, 2600:3c0d::f03c:93ff:fe3d:51a9, 2600:3c0d::f03c:93ff:fe3d:5119, 2600:3c0d::f03c:93ff:fe3d:51fe, 2600:3c0d::f03c:93ff:fe3d:517c, 2600:3c0d::f03c:93ff:fe3d:5144, 2600:3c0d::f03c:93ff:fe3d:5170, 2600:3c0d::f03c:93ff:fe3d:51cc, 2600:3c0d::f03c:93ff:fe3d:516c"}},{"id":"nl-ams","label":"Amsterdam, NL","country":"nl","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.33.36, 172.233.33.38, 172.233.33.35, 172.233.33.39, 172.233.33.34, 172.233.33.33, 172.233.33.31, 172.233.33.30, 172.233.33.37, 172.233.33.32","ipv6":"2600:3c0e::f03c:93ff:fe9d:2d10, 2600:3c0e::f03c:93ff:fe9d:2d89, 2600:3c0e::f03c:93ff:fe9d:2d79, 2600:3c0e::f03c:93ff:fe9d:2d96, 2600:3c0e::f03c:93ff:fe9d:2da5, 2600:3c0e::f03c:93ff:fe9d:2d34, 2600:3c0e::f03c:93ff:fe9d:2d68, 2600:3c0e::f03c:93ff:fe9d:2d17, 2600:3c0e::f03c:93ff:fe9d:2d45, 2600:3c0e::f03c:93ff:fe9d:2d5c"}},{"id":"se-sto","label":"Stockholm, SE","country":"se","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.128.24, 172.232.128.26, 172.232.128.20, 172.232.128.22, 172.232.128.25, 172.232.128.19, 172.232.128.23, 172.232.128.18, 172.232.128.21, 172.232.128.27","ipv6":"2600:3c09::f03c:93ff:fea9:4dbe, 2600:3c09::f03c:93ff:fea9:4d63, 2600:3c09::f03c:93ff:fea9:4dce, 2600:3c09::f03c:93ff:fea9:4dbb, 2600:3c09::f03c:93ff:fea9:4d99, 2600:3c09::f03c:93ff:fea9:4d26, 2600:3c09::f03c:93ff:fea9:4de0, 2600:3c09::f03c:93ff:fea9:4d69, 2600:3c09::f03c:93ff:fea9:4dbf, 2600:3c09::f03c:93ff:fea9:4da6"}},{"id":"in-maa","label":"Chennai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.96.17, 172.232.96.26, 172.232.96.19, 172.232.96.20, 172.232.96.25, 172.232.96.21, 172.232.96.18, 172.232.96.22, 172.232.96.23, 172.232.96.24","ipv6":"2600:3c08::f03c:93ff:fe7c:1135, 2600:3c08::f03c:93ff:fe7c:11f8, 2600:3c08::f03c:93ff:fe7c:11d2, 2600:3c08::f03c:93ff:fe7c:11a7, 2600:3c08::f03c:93ff:fe7c:11ad, 2600:3c08::f03c:93ff:fe7c:110a, 2600:3c08::f03c:93ff:fe7c:11f9, 2600:3c08::f03c:93ff:fe7c:1137, 2600:3c08::f03c:93ff:fe7c:11db, 2600:3c08::f03c:93ff:fe7c:1164"}},{"id":"jp-osa","label":"Osaka, JP","country":"jp","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.64.44, 172.233.64.43, 172.233.64.37, 172.233.64.40, 172.233.64.46, 172.233.64.41, 172.233.64.39, 172.233.64.42, 172.233.64.45, 172.233.64.38","ipv6":"2400:8905::f03c:93ff:fe9d:b085, 2400:8905::f03c:93ff:fe9d:b012, 2400:8905::f03c:93ff:fe9d:b09b, 2400:8905::f03c:93ff:fe9d:b0d8, 2400:8905::f03c:93ff:fe9d:259f, 2400:8905::f03c:93ff:fe9d:b006, 2400:8905::f03c:93ff:fe9d:b084, 2400:8905::f03c:93ff:fe9d:b0ce, 2400:8905::f03c:93ff:fe9d:25ea, 2400:8905::f03c:93ff:fe9d:b086"}},{"id":"it-mil","label":"Milan, IT","country":"it","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.192.19, 172.232.192.18, 172.232.192.16, 172.232.192.20, 172.232.192.24, 172.232.192.21, 172.232.192.22, 172.232.192.17, 172.232.192.15, 172.232.192.23","ipv6":"2600:3c0b::f03c:93ff:feba:d513, 2600:3c0b::f03c:93ff:feba:d5c3, 2600:3c0b::f03c:93ff:feba:d597, 2600:3c0b::f03c:93ff:feba:d5fb, 2600:3c0b::f03c:93ff:feba:d51f, 2600:3c0b::f03c:93ff:feba:d58e, 2600:3c0b::f03c:93ff:feba:d5d5, 2600:3c0b::f03c:93ff:feba:d534, 2600:3c0b::f03c:93ff:feba:d57c, 2600:3c0b::f03c:93ff:feba:d529"}},{"id":"us-mia","label":"Miami, FL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.160.34, 172.233.160.27, 172.233.160.30, 172.233.160.29, 172.233.160.32, 172.233.160.28, 172.233.160.33, 172.233.160.26, 172.233.160.25, 172.233.160.31","ipv6":"2a01:7e04::f03c:93ff:fead:d31f, 2a01:7e04::f03c:93ff:fead:d37f, 2a01:7e04::f03c:93ff:fead:d30c, 2a01:7e04::f03c:93ff:fead:d318, 2a01:7e04::f03c:93ff:fead:d316, 2a01:7e04::f03c:93ff:fead:d339, 2a01:7e04::f03c:93ff:fead:d367, 2a01:7e04::f03c:93ff:fead:d395, 2a01:7e04::f03c:93ff:fead:d3d0, 2a01:7e04::f03c:93ff:fead:d38e"}},{"id":"id-cgk","label":"Jakarta, ID","country":"id","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.224.23, 172.232.224.32, 172.232.224.26, 172.232.224.27, 172.232.224.21, 172.232.224.24, 172.232.224.22, 172.232.224.20, 172.232.224.31, 172.232.224.28","ipv6":"2600:3c0c::f03c:93ff:feed:a90b, 2600:3c0c::f03c:93ff:feed:a9a5, 2600:3c0c::f03c:93ff:feed:a935, 2600:3c0c::f03c:93ff:feed:a930, 2600:3c0c::f03c:93ff:feed:a95c, 2600:3c0c::f03c:93ff:feed:a9ad, 2600:3c0c::f03c:93ff:feed:a9f2, 2600:3c0c::f03c:93ff:feed:a9ff, 2600:3c0c::f03c:93ff:feed:a9c8, 2600:3c0c::f03c:93ff:feed:a96b"}},{"id":"us-lax","label":"Los Angeles, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.128.45, 172.233.128.38, 172.233.128.53, 172.233.128.37, 172.233.128.34, 172.233.128.36, 172.233.128.33, 172.233.128.39, 172.233.128.43, 172.233.128.44","ipv6":"2a01:7e03::f03c:93ff:feb1:b789, 2a01:7e03::f03c:93ff:feb1:b717, 2a01:7e03::f03c:93ff:feb1:b707, 2a01:7e03::f03c:93ff:feb1:b7ab, 2a01:7e03::f03c:93ff:feb1:b7e2, 2a01:7e03::f03c:93ff:feb1:b709, 2a01:7e03::f03c:93ff:feb1:b7a6, 2a01:7e03::f03c:93ff:feb1:b750, 2a01:7e03::f03c:93ff:feb1:b76e, 2a01:7e03::f03c:93ff:feb1:b7a2"}},{"id":"us-central","label":"Dallas, TX","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"72.14.179.5, 72.14.188.5, 173.255.199.5, 66.228.53.5, 96.126.122.5, 96.126.124.5, 96.126.127.5, 198.58.107.5, 198.58.111.5, 23.239.24.5","ipv6":"2600:3c00::2, 2600:3c00::9, 2600:3c00::7, 2600:3c00::5, 2600:3c00::3, 2600:3c00::8, 2600:3c00::6, 2600:3c00::4, 2600:3c00::c, 2600:3c00::b"}},{"id":"us-west","label":"Fremont, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"173.230.145.5, 173.230.147.5, 173.230.155.5, 173.255.212.5, 173.255.219.5, 173.255.241.5, 173.255.243.5, 173.255.244.5, 74.207.241.5, 74.207.242.5","ipv6":"2600:3c01::2, 2600:3c01::9, 2600:3c01::5, 2600:3c01::7, 2600:3c01::3, 2600:3c01::8, 2600:3c01::4, 2600:3c01::b, 2600:3c01::c, 2600:3c01::6"}},{"id":"us-southeast","label":"Atlanta, GA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"74.207.231.5, 173.230.128.5, 173.230.129.5, 173.230.136.5, 173.230.140.5, 66.228.59.5, 66.228.62.5, 50.116.35.5, 50.116.41.5, 23.239.18.5","ipv6":"2600:3c02::3, 2600:3c02::5, 2600:3c02::4, 2600:3c02::6, 2600:3c02::c, 2600:3c02::7, 2600:3c02::2, 2600:3c02::9, 2600:3c02::8, 2600:3c02::b"}},{"id":"us-east","label":"Newark, NJ","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Bare Metal","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"66.228.42.5, 96.126.106.5, 50.116.53.5, 50.116.58.5, 50.116.61.5, 50.116.62.5, 66.175.211.5, 97.107.133.4, 207.192.69.4, 207.192.69.5","ipv6":"2600:3c03::7, 2600:3c03::4, 2600:3c03::9, 2600:3c03::6, 2600:3c03::3, 2600:3c03::c, 2600:3c03::5, 2600:3c03::b, 2600:3c03::2, 2600:3c03::8"}},{"id":"eu-west","label":"London, UK","country":"gb","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"178.79.182.5, 176.58.107.5, 176.58.116.5, 176.58.121.5, 151.236.220.5, 212.71.252.5, 212.71.253.5, 109.74.192.20, 109.74.193.20, 109.74.194.20","ipv6":"2a01:7e00::9, 2a01:7e00::3, 2a01:7e00::c, 2a01:7e00::5, 2a01:7e00::6, 2a01:7e00::8, 2a01:7e00::b, 2a01:7e00::4, 2a01:7e00::7, 2a01:7e00::2"}},{"id":"ap-south","label":"Singapore, SG","country":"sg","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.11.5, 139.162.13.5, 139.162.14.5, 139.162.15.5, 139.162.16.5, 139.162.21.5, 139.162.27.5, 103.3.60.18, 103.3.60.19, 103.3.60.20","ipv6":"2400:8901::5, 2400:8901::4, 2400:8901::b, 2400:8901::3, 2400:8901::9, 2400:8901::2, 2400:8901::8, 2400:8901::7, 2400:8901::c, 2400:8901::6"}},{"id":"eu-central","label":"Frankfurt, DE","country":"de","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.130.5, 139.162.131.5, 139.162.132.5, 139.162.133.5, 139.162.134.5, 139.162.135.5, 139.162.136.5, 139.162.137.5, 139.162.138.5, 139.162.139.5","ipv6":"2a01:7e01::5, 2a01:7e01::9, 2a01:7e01::7, 2a01:7e01::c, 2a01:7e01::2, 2a01:7e01::4, 2a01:7e01::3, 2a01:7e01::6, 2a01:7e01::b, 2a01:7e01::8"}},{"id":"ap-northeast","label":"Tokyo, JP","country":"jp","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.66.5, 139.162.67.5, 139.162.68.5, 139.162.69.5, 139.162.70.5, 139.162.71.5, 139.162.72.5, 139.162.73.5, 139.162.74.5, 139.162.75.5","ipv6":"2400:8902::3, 2400:8902::6, 2400:8902::c, 2400:8902::4, 2400:8902::2, 2400:8902::8, 2400:8902::7, 2400:8902::5, 2400:8902::b, 2400:8902::9"}}],"page":1,"pages":1,"results":24} \ No newline at end of file diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 2f594045b45..18aad8f60b1 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -1,4 +1,4 @@ -import { Button, Colors } from '@linode/design-language-system'; +import { Button, Color } from '@linode/design-language-system'; import { ThemeOptions } from '@mui/material/styles'; import { breakpoints } from 'src/foundations/breakpoints'; @@ -7,75 +7,75 @@ import { latoWeb } from 'src/foundations/fonts'; const inputMaxWidth = 416; export const bg = { - app: Colors.Neutrals[5], - bgAccessRow: Colors.Neutrals[5], + app: Color.Neutrals[5], + bgAccessRow: Color.Neutrals[5], bgAccessRowTransparentGradient: 'rgb(255, 255, 255, .001)', - bgPaper: Colors.Neutrals.White, - lightBlue1: Colors.Brand[10], - lightBlue2: Colors.Brand[40], - main: Colors.Neutrals[5], - mainContentBanner: Colors.Neutrals[100], - offWhite: Colors.Neutrals[5], - primaryNavPaper: Colors.Neutrals[100], - tableHeader: Colors.Neutrals[10], - white: Colors.Neutrals.White, + bgPaper: Color.Neutrals.White, + lightBlue1: Color.Brand[10], + lightBlue2: Color.Brand[40], + main: Color.Neutrals[5], + mainContentBanner: Color.Neutrals[100], + offWhite: Color.Neutrals[5], + primaryNavPaper: Color.Neutrals[100], + tableHeader: Color.Neutrals[10], + white: Color.Neutrals.White, } as const; const primaryColors = { - dark: Colors.Brand[90], - divider: Colors.Neutrals[5], - headline: Colors.Neutrals[100], - light: Colors.Brand[60], - main: Colors.Brand[80], - text: Colors.Neutrals[70], - white: Colors.Neutrals.White, + dark: Color.Brand[90], + divider: Color.Neutrals[5], + headline: Color.Neutrals[100], + light: Color.Brand[60], + main: Color.Brand[80], + text: Color.Neutrals[70], + white: Color.Neutrals.White, }; export const color = { - black: Colors.Neutrals.Black, - blue: Colors.Brand[80], - blueDTwhite: Colors.Brand[80], - border2: Colors.Neutrals[40], - border3: Colors.Neutrals[20], - boxShadow: Colors.Neutrals[30], - boxShadowDark: Colors.Neutrals[50], - disabledText: Colors.Neutrals[40], + black: Color.Neutrals.Black, + blue: Color.Brand[80], + blueDTwhite: Color.Brand[80], + border2: Color.Neutrals[40], + border3: Color.Neutrals[20], + boxShadow: Color.Neutrals[30], + boxShadowDark: Color.Neutrals[50], + disabledText: Color.Neutrals[40], drawerBackdrop: 'rgba(255, 255, 255, 0.5)', - green: Colors.Green[70], - grey1: Colors.Neutrals[50], - grey2: Colors.Neutrals[30], - grey3: Colors.Neutrals[40], - grey4: Colors.Neutrals[60], - grey5: Colors.Neutrals[5], - grey6: Colors.Neutrals[30], - grey7: Colors.Neutrals[20], - grey8: Colors.Neutrals[30], - grey9: Colors.Neutrals[5], + green: Color.Green[70], + grey1: Color.Neutrals[50], + grey2: Color.Neutrals[30], + grey3: Color.Neutrals[40], + grey4: Color.Neutrals[60], + grey5: Color.Neutrals[5], + grey6: Color.Neutrals[30], + grey7: Color.Neutrals[20], + grey8: Color.Neutrals[30], + grey9: Color.Neutrals[5], headline: primaryColors.headline, - label: Colors.Neutrals[70], - offBlack: Colors.Neutrals[90], - orange: Colors.Amber[70], - red: Colors.Red[70], + label: Color.Neutrals[70], + offBlack: Color.Neutrals[90], + orange: Color.Amber[70], + red: Color.Red[70], tableHeaderText: 'rgba(0, 0, 0, 0.54)', - tagButton: Colors.Brand[10], - tagIcon: Colors.Brand[60], - teal: Colors.Teal[70], - white: Colors.Neutrals.White, - yellow: Colors.Yellow[70], + tagButton: Color.Brand[10], + tagIcon: Color.Brand[60], + teal: Color.Teal[70], + white: Color.Neutrals.White, + yellow: Color.Yellow[70], } as const; export const textColors = { - headlineStatic: Colors.Neutrals[100], - linkActiveLight: Colors.Brand[80], - tableHeader: Colors.Neutrals[60], - tableStatic: Colors.Neutrals[70], - textAccessTable: Colors.Neutrals[70], + headlineStatic: Color.Neutrals[100], + linkActiveLight: Color.Brand[80], + tableHeader: Color.Neutrals[60], + tableStatic: Color.Neutrals[70], + textAccessTable: Color.Neutrals[70], } as const; export const borderColors = { - borderTable: Colors.Neutrals[5], - borderTypography: Colors.Neutrals[30], - divider: Colors.Neutrals[30], + borderTable: Color.Neutrals[5], + borderTypography: Color.Neutrals[30], + divider: Color.Neutrals[30], } as const; const iconCircleAnimation = { @@ -223,8 +223,8 @@ export const lightTheme: ThemeOptions = { transition: 'color 400ms cubic-bezier(0.4, 0, 0.2, 1) 0ms', }, '& svg': { - fill: Colors.Brand[80], - stroke: Colors.Brand[80], + fill: Color.Brand[80], + stroke: Color.Brand[80], }, '&.Mui-expanded': { '& .caret': { @@ -269,7 +269,7 @@ export const lightTheme: ThemeOptions = { }, paddingRight: 4, svg: { - color: Colors.Neutrals[40], + color: Color.Neutrals[40], }, top: 'unset', }, @@ -354,7 +354,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { colorDefault: { backgroundColor: 'unset', - color: Colors.Neutrals[40], // TODO: This was the closest color according to our palette + color: Color.Neutrals[40], // TODO: This was the closest color according to our palette }, }, }, @@ -413,9 +413,9 @@ export const lightTheme: ThemeOptions = { }, outlined: { '&:hover, &:focus': { - backgroundColor: Colors.Neutrals[5], // TODO: This was the closest color according to our palette - border: `1px solid ${Colors.Neutrals[30]}`, // TODO: This was the closest color according to our palette - color: Colors.Brand[80], + backgroundColor: Color.Neutrals[5], // TODO: This was the closest color according to our palette + border: `1px solid ${Color.Neutrals[30]}`, // TODO: This was the closest color according to our palette + color: Color.Brand[80], }, backgroundColor: 'transparent', border: `1px solid ${primaryColors.main}`, @@ -450,14 +450,14 @@ export const lightTheme: ThemeOptions = { minWidth: 0, }, root: { - backgroundColor: Colors.Neutrals[5], + backgroundColor: Color.Neutrals[5], }, }, }, MuiCheckbox: { styleOverrides: { root: { - color: Colors.Neutrals[40], + color: Color.Neutrals[40], }, }, }, @@ -465,12 +465,12 @@ export const lightTheme: ThemeOptions = { styleOverrides: { clickable: { '&:focus': { - bbackgroundColor: Colors.Brand[40], // TODO: This was the closest color according to our palette + bbackgroundColor: Color.Brand[40], // TODO: This was the closest color according to our palette }, '&:hover': { - bbackgroundColor: Colors.Brand[40], // TODO: This was the closest color according to our palette + bbackgroundColor: Color.Brand[40], // TODO: This was the closest color according to our palette }, - backgroundColor: Colors.Brand[10], // TODO: This was the closest color according to our palette + backgroundColor: Color.Brand[10], // TODO: This was the closest color according to our palette }, colorError: { color: color.white, @@ -508,7 +508,7 @@ export const lightTheme: ThemeOptions = { }, root: { '&:focus': { - outline: `1px dotted ${Colors.Neutrals[60]}`, // TODO: This was the closest color according to our palette + outline: `1px dotted ${Color.Neutrals[60]}`, // TODO: This was the closest color according to our palette }, '&:last-child': { marginRight: 0, @@ -548,7 +548,7 @@ export const lightTheme: ThemeOptions = { MuiDialog: { styleOverrides: { paper: { - boxShadow: `0 0 5px ${Colors.Neutrals[50]}`, // TODO: This was the closest color according to our palette + boxShadow: `0 0 5px ${Color.Neutrals[50]}`, // TODO: This was the closest color according to our palette [breakpoints.down('sm')]: { margin: 24, maxHeight: 'calc(100% - 48px)', @@ -585,7 +585,7 @@ export const lightTheme: ThemeOptions = { '& h2': { lineHeight: 1.2, }, - borderBottom: `1px solid ${Colors.Neutrals[20]}`, + borderBottom: `1px solid ${Color.Neutrals[20]}`, color: primaryColors.headline, marginBottom: 20, padding: '16px 24px', @@ -604,7 +604,7 @@ export const lightTheme: ThemeOptions = { MuiDrawer: { styleOverrides: { paper: { - boxShadow: `0 0 5px ${Colors.Neutrals[50]}`, // TODO: This was the closest color according to our palette + boxShadow: `0 0 5px ${Color.Neutrals[50]}`, // TODO: This was the closest color according to our palette /** @todo This is breaking typing. */ // overflowY: 'overlay', display: 'block', @@ -618,7 +618,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { root: { '&.copy > div': { - backgroundColor: Colors.Neutrals[5], + backgroundColor: Color.Neutrals[5], }, [breakpoints.down('xs')]: { width: '100%', @@ -652,7 +652,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { root: { '&$error': { - color: Colors.Red[70], + color: Color.Red[70], }, fontSize: '0.875rem', lineHeight: 1.25, @@ -664,16 +664,16 @@ export const lightTheme: ThemeOptions = { styleOverrides: { root: { '&$disabled': { - color: Colors.Neutrals[70], + color: Color.Neutrals[70], opacity: 0.5, }, '&$error': { - color: Colors.Neutrals[70], + color: Color.Neutrals[70], }, '&.Mui-focused': { - color: Colors.Neutrals[70], + color: Color.Neutrals[70], }, - color: Colors.Neutrals[70], + color: Color.Neutrals[70], fontFamily: latoWeb.bold, fontSize: '.875rem', marginBottom: 8, @@ -725,32 +725,32 @@ export const lightTheme: ThemeOptions = { root: { '& svg': { '&:hover': { - color: Colors.Brand[60], + color: Color.Brand[60], }, color: primaryColors.main, fontSize: 18, }, '&$disabled': { - borderColor: Colors.Neutrals[40], + borderColor: Color.Neutrals[40], color: 'rgba(0, 0, 0, 0.75)', opacity: 0.5, }, '&.Mui-error': { - borderColor: Colors.Red[70], + borderColor: Color.Red[70], }, '&.Mui-focused': { '& .select-option-icon': { paddingLeft: `30px !important`, }, borderColor: primaryColors.main, - boxShadow: `0 0 2px 1px ${Colors.Neutrals[30]}`, + boxShadow: `0 0 2px 1px ${Color.Neutrals[30]}`, }, '&.affirmative': { - borderColor: Colors.Green[70], + borderColor: Color.Green[70], }, alignItems: 'center', - backgroundColor: Colors.Neutrals.White, - border: `1px solid ${Colors.Neutrals[40]}`, + backgroundColor: Color.Neutrals.White, + border: `1px solid ${Color.Neutrals[40]}`, boxSizing: 'border-box', [breakpoints.down('xs')]: { maxWidth: '100%', @@ -774,13 +774,13 @@ export const lightTheme: ThemeOptions = { [breakpoints.only('xs')]: { fontSize: '1rem', }, - color: Colors.Neutrals[70], + color: Color.Neutrals[70], fontSize: '0.9rem', }, [breakpoints.only('xs')]: { fontSize: '1rem', }, - color: Colors.Neutrals[70], + color: Color.Neutrals[70], fontSize: '0.9rem', whiteSpace: 'nowrap', }, @@ -809,7 +809,7 @@ export const lightTheme: ThemeOptions = { MuiLinearProgress: { styleOverrides: { colorPrimary: { - backgroundColor: Colors.Brand[40], // TODO: This was the closest color according to our palette + backgroundColor: Color.Brand[40], // TODO: This was the closest color according to our palette }, }, }, @@ -930,7 +930,7 @@ export const lightTheme: ThemeOptions = { MuiPaper: { styleOverrides: { outlined: { - border: `1px solid ${Colors.Neutrals[30]}`, + border: `1px solid ${Color.Neutrals[30]}`, }, root: {}, rounded: { @@ -942,7 +942,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { paper: { borderRadius: 0, - boxShadow: `0 0 5px ${Colors.Neutrals[30]}`, + boxShadow: `0 0 5px ${Color.Neutrals[30]}`, [breakpoints.up('lg')]: { minWidth: 250, }, @@ -977,10 +977,10 @@ export const lightTheme: ThemeOptions = { }, '&.Mui-disabled': { '& .defaultFill': { - fill: Colors.Neutrals[5], + fill: Color.Neutrals[5], }, - color: `${Colors.Neutrals[40]} !important`, - fill: `${Colors.Neutrals[5]} !important`, + color: `${Color.Neutrals[40]} !important`, + fill: `${Color.Neutrals[5]} !important`, pointerEvents: 'none', }, '&:hover': { @@ -990,7 +990,7 @@ export const lightTheme: ThemeOptions = { color: theme.palette.primary.main, fill: theme.color.white, }, - color: Colors.Neutrals[40], + color: Color.Neutrals[40], padding: '10px 10px', transition: theme.transitions.create(['color']), }), @@ -1000,7 +1000,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { disabled: {}, icon: { - color: `${Colors.Neutrals[50]} !important`, + color: `${Color.Neutrals[50]} !important`, height: 28, marginRight: 4, marginTop: -2, @@ -1034,8 +1034,8 @@ export const lightTheme: ThemeOptions = { backgroundColor: 'white', borderLeft: `6px solid transparent`, borderRadius: 4, - boxShadow: `0 0 5px ${Colors.Neutrals[30]}`, - color: Colors.Neutrals[70], + boxShadow: `0 0 5px ${Color.Neutrals[30]}`, + color: Color.Neutrals[70], }, }, }, @@ -1068,8 +1068,8 @@ export const lightTheme: ThemeOptions = { '& $disabled': { '&$switchBase': { '& + $track': { - backgroundColor: Colors.Neutrals[30], - borderColor: Colors.Neutrals[40], + backgroundColor: Color.Neutrals[30], + borderColor: Color.Neutrals[40], }, '& .square': { fill: 'white', @@ -1107,15 +1107,15 @@ export const lightTheme: ThemeOptions = { }, '&.Mui-disabled': { '& +.MuiSwitch-track': { - backgroundColor: Colors.Neutrals[30], - borderColor: Colors.Neutrals[40], + backgroundColor: Color.Neutrals[30], + borderColor: Color.Neutrals[40], }, }, color: primaryColors.main, padding: 16, }, track: { - backgroundColor: Colors.Neutrals[40], + backgroundColor: Color.Neutrals[40], borderRadius: 1, boxSizing: 'content-box', height: 24, @@ -1163,7 +1163,7 @@ export const lightTheme: ThemeOptions = { selected: {}, textColorPrimary: { '&$selected': { - color: Colors.Neutrals[100], + color: Color.Neutrals[100], }, }, }, @@ -1195,7 +1195,7 @@ export const lightTheme: ThemeOptions = { MuiTableRow: { styleOverrides: { head: { - backgroundColor: Colors.Neutrals[5], + backgroundColor: Color.Neutrals[5], height: 'auto', }, hover: { @@ -1213,7 +1213,7 @@ export const lightTheme: ThemeOptions = { root: { '&:hover, &:focus': { '&$hover': { - backgroundColor: Colors.Neutrals[5], + backgroundColor: Color.Neutrals[5], [breakpoints.up('md')]: { boxShadow: `inset 5px 0 0 ${primaryColors.main}`, }, @@ -1245,7 +1245,7 @@ export const lightTheme: ThemeOptions = { color: textColors.tableHeader, }, '&:focus': { - outline: `1px dotted ${Colors.Neutrals[60]}`, // TODO: This was the closest color according to our palette + outline: `1px dotted ${Color.Neutrals[60]}`, // TODO: This was the closest color according to our palette }, '&:hover': { color: primaryColors.main, @@ -1292,7 +1292,7 @@ export const lightTheme: ThemeOptions = { width: 38, }, }, - boxShadow: `inset 0 -1px 0 ${Colors.Neutrals[40]}`, + boxShadow: `inset 0 -1px 0 ${Color.Neutrals[40]}`, margin: '16px 0', minHeight: 48, position: 'relative', @@ -1310,12 +1310,12 @@ export const lightTheme: ThemeOptions = { tooltip: { backgroundColor: 'white', borderRadius: 0, - boxShadow: `0 0 5px ${Colors.Neutrals[50]}`, // TODO: This was the closest color according to our palette + boxShadow: `0 0 5px ${Color.Neutrals[50]}`, // TODO: This was the closest color according to our palette [breakpoints.up('sm')]: { fontSize: '.9rem', padding: '8px 10px', }, - color: Colors.Neutrals[70], + color: Color.Neutrals[70], maxWidth: 200, textAlign: 'left', }, @@ -1350,7 +1350,7 @@ export const lightTheme: ThemeOptions = { maxHeight: 34, minWidth: 100, }, - color: Colors.Neutrals.White, + color: Color.Neutrals.White, cursor: 'pointer', fontFamily: latoWeb.bold, fontSize: '1rem', @@ -1438,30 +1438,30 @@ export const lightTheme: ThemeOptions = { }, divider: primaryColors.divider, error: { - dark: Colors.Red[70], - light: Colors.Red[10], - main: Colors.Red[40], + dark: Color.Red[70], + light: Color.Red[10], + main: Color.Red[40], }, info: { - dark: Colors.Ultramarine[70], - light: Colors.Ultramarine[10], - main: Colors.Ultramarine[40], + dark: Color.Ultramarine[70], + light: Color.Ultramarine[10], + main: Color.Ultramarine[40], }, mode: 'light', primary: primaryColors, secondary: primaryColors, success: { - dark: Colors.Green[70], - light: Colors.Green[10], - main: Colors.Green[40], + dark: Color.Green[70], + light: Color.Green[10], + main: Color.Green[40], }, text: { primary: primaryColors.text, }, warning: { - dark: Colors.Amber[70], - light: Colors.Amber[10], - main: Colors.Amber[40], + dark: Color.Amber[70], + light: Color.Amber[10], + main: Color.Amber[40], }, }, shadows: [ From 55cb2c82a8dadccf4d02313109955de9200ef0df Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Thu, 28 Dec 2023 15:10:47 -0500 Subject: [PATCH 09/42] Revert --- packages/manager/src/cachedData/marketplace.json | 2 +- packages/manager/src/cachedData/regions.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/manager/src/cachedData/marketplace.json b/packages/manager/src/cachedData/marketplace.json index 883cf532ff2..05f9e9284d7 100644 --- a/packages/manager/src/cachedData/marketplace.json +++ b/packages/manager/src/cachedData/marketplace.json @@ -1 +1 @@ -{"data":[{"id":1146319,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster Null One-Click","description":"MongoDB Cluster Null One-Click\r\nNull stackscript for 1067004","ordinal":0,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":38,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-03-23T14:00:01","updated":"2023-10-18T12:38:31","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1146324,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster Null One-Click","description":"Galera Cluster Null One-Click\r\nNull Stackscript for 1088136","ordinal":0,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":156,"deployments_active":15,"is_public":true,"mine":false,"created":"2023-03-23T14:19:14","updated":"2023-12-24T01:05:24","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1142293,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Redis Sentinel Cluster Null One-Click","description":"Redis Sentinel Cluster Null One-Click\r\nNull stackscript for 1132204","ordinal":0,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":175,"deployments_active":8,"is_public":true,"mine":false,"created":"2023-03-16T14:20:59","updated":"2023-12-17T23:45:42","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1146322,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster Null One-Click","description":"PostgreSQL Cluster Null One-Click\r\nNull Stackscript for 1068726","ordinal":0,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":230,"deployments_active":12,"is_public":true,"mine":false,"created":"2023-03-23T14:17:07","updated":"2023-12-20T17:50:48","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1226546,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Null One-Click","description":"Nomad Cluster Null One-Click","ordinal":0,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":392,"deployments_active":20,"is_public":true,"mine":false,"created":"2023-08-25T19:08:21","updated":"2023-12-14T17:37:41","rev_note":"","script":"#!/bin/bash/","user_defined_fields":[]},{"id":1226547,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Clients Null One-Click","description":"Nomad Cluster Clients One-Click","ordinal":0,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":428,"deployments_active":30,"is_public":true,"mine":false,"created":"2023-08-25T19:08:57","updated":"2023-12-14T17:40:08","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":401697,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WordPress One-Click","description":"Wordpress One Click App","ordinal":1,"logo_url":"assets/WordPress.svg","images":["linode/ubuntu22.04"],"deployments_total":65790,"deployments_active":4839,"is_public":true,"mine":false,"created":"2019-03-08T21:04:07","updated":"2023-12-28T18:03:43","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-wordpress\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":632758,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Nextcloud One-Click","description":"One Click App - Nextcloud","ordinal":2,"logo_url":"assets/nextcloud.svg","images":["linode/ubuntu22.04"],"deployments_total":19283,"deployments_active":838,"is_public":true,"mine":false,"created":"2020-02-18T16:40:45","updated":"2023-12-28T19:23:17","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## harbor Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-nextcloud\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # nextcloud vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"email DNS record SOA","default":""}]},{"id":1017300,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kali Linux One-Click","description":"Kali Linux One-Click","ordinal":3,"logo_url":"assets/kalilinux.svg","images":["linode/kali"],"deployments_total":17178,"deployments_active":467,"is_public":true,"mine":false,"created":"2022-06-21T14:38:37","updated":"2023-12-28T17:37:24","rev_note":"","script":"#!/bin/bash\n## Kali\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction headlessoreverything {\n if [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"Yes\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $EVERYTHING == \"Yes\" ] && [ $HEADLESS == \"No\" ]; then\n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"No\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-headless -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"No\" ] && [ $EVERYTHING == \"No\" ]; then \n echo \"No Package Selected\"\n fi\n}\n\nfunction vncsetup {\n if [ $VNC == \"Yes\" ]; then \n ## XFCE & VNC Config\n apt-get install xfce4 xfce4-goodies dbus-x11 tigervnc-standalone-server expect -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n\n readonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\n sleep 2\n killvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\n kill $killvncprocess\n touch /etc/systemd/system/vncserver@.service\n cat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start vncserver@1.service\n systemctl enable vncserver@1.service\n\n cat < /etc/motd\n###################################\n# VNC SSH Tunnel Instructions #\n###################################\n\n* Ensure you have a VNC Client installed on your local machine\n* Run the command below to start the SSH tunnel for VNC \n\n ssh -L 61000:localhost:5901 -N -l $USERNAME $FQDN\n\n* For more Detailed documentation please visit the offical Documentation below\n\n https://www.linode.com/docs/products/tools/marketplace/guides/kalilinux\n\n### To remove this message, you can edit the /etc/motd file ###\nEOF\n fi\n}\n\nfunction main {\n headlessoreverything\n vncsetup\n stackscript_cleanup\n}\n\nmain","user_defined_fields":[{"name":"everything","label":"Would you like to Install the Kali Everything Package?","oneof":"Yes,No","default":"Yes"},{"name":"headless","label":"Would you like to Install the Kali Headless Package?","oneof":"Yes,No","default":"No"},{"name":"vnc","label":"Would you like to setup VNC to access Kali XFCE Desktop","oneof":"Yes,No","default":"Yes"},{"name":"username","label":"The VNC user to be created for the Linode. The username accepts only lowercase letters, numbers, dashes (-) and underscores (_)"},{"name":"password","label":"The password for the limited VNC user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA records (Requires API token)","default":""}]},{"id":593835,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plesk One-Click","description":"Plesk is the leading secure WordPress and website management platform. This Stackscript installs the latest publicly available Plesk, activates a trial license, installs essential extensions, and sets up and configures the firewall. Please allow the script around 15 minutes to finish.","ordinal":4,"logo_url":"assets/plesk.svg","images":["linode/centos7","linode/ubuntu20.04"],"deployments_total":10600,"deployments_active":494,"is_public":true,"mine":false,"created":"2019-09-26T17:34:17","updated":"2023-12-28T13:43:49","rev_note":"updated wording","script":"#!/bin/bash\n# This block defines the variables the user of the script needs to input\n# when deploying using this script.\n#\n## Enable logging\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction pleskautoinstall {\n echo \"Downloading Plesk Auto-Installer\"\n sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)\n echo \"turning on http2\"\n /usr/sbin/plesk bin http2_pref --enable\n}\n\nfunction firewall {\n echo \"Setting Firewall to allow proper ports.\"\n if [ \"${detected_distro[distro]}\" = 'centos' ]; then \n iptables -I INPUT -p tcp --dport 21 -j ACCEPT\n iptables -I INPUT -p tcp --dport 22 -j ACCEPT\n iptables -I INPUT -p tcp --dport 25 -j ACCEPT\n iptables -I INPUT -p tcp --dport 80 -j ACCEPT\n iptables -I INPUT -p tcp --dport 110 -j ACCEPT\n iptables -I INPUT -p tcp --dport 143 -j ACCEPT\n iptables -I INPUT -p tcp --dport 443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 465 -j ACCEPT\n iptables -I INPUT -p tcp --dport 993 -j ACCEPT\n iptables -I INPUT -p tcp --dport 995 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8447 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8880 -j ACCEPT\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n ufw allow 21\n ufw allow 22\n ufw allow 25\n ufw allow 80\n ufw allow 110\n ufw allow 143\n ufw allow 443\n ufw allow 465\n ufw allow 993\n ufw allow 995\n ufw allow 8443\n ufw allow 8447\n ufw allow 8880\nelse \necho \"Distro Not supported\"\nfi\n}\n\nfunction main {\n pleskautoinstall\n firewall\n}\n\n# Execute script\nsystem_update\nmain\nstackscript_cleanup","user_defined_fields":[]},{"id":595742,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"cPanel One-Click","description":"cPanel One-Click","ordinal":5,"logo_url":"assets/cpanel.svg","images":["linode/almalinux8","linode/rocky8"],"deployments_total":28421,"deployments_active":1007,"is_public":true,"mine":false,"created":"2019-09-30T20:17:52","updated":"2023-12-28T19:28:58","rev_note":"","script":"#!/bin/bash\nset -e\n\n# Commit: fde6587e08ea95321ce010e52a9c1b8d02455a97\n# Commit date: 2023-02-13 17:00:46 -0600\n# Generated: 2023-02-17 11:00:28 -0600\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\necho $(date +%Y%m%d%H%M%S) >> /tmp/cpdebug.log\n\n# Linode's Weblish console will truncate lines unless you do this tput smam. This\n# instructs the terminal to wrap your lines, which is especially important so that\n# the WHM login URL that gets printed at the end can be copied.\ntput smam\n\nsource /etc/os-release\n\nis_os_and_version_id_prefix() {\n [[ $ID == $1 ]] && [[ $VERSION_ID =~ ^$2 ]]\n}\n\nis_almalinux8() {\n is_os_and_version_id_prefix almalinux 8\n}\n\nis_centos7() {\n is_os_and_version_id_prefix centos 7\n}\n\nis_cloudlinux7() {\n is_os_and_version_id_prefix cloudlinux 7\n}\n\nis_cloudlinux8() {\n is_os_and_version_id_prefix cloudlinux 8\n}\n\nis_rocky8() {\n is_os_and_version_id_prefix rocky 8\n}\n\nis_ubuntu20() {\n is_os_and_version_id_prefix ubuntu 20.04\n}\n\nis_supported_os() {\n is_almalinux8 || \\\n is_centos7 || \\\n is_cloudlinux7 || \\\n is_cloudlinux8 || \\\n is_rocky8 || \\\n is_ubuntu20\n}\n\nhas_yum() {\n which yum >/dev/null 2>&1\n}\n\nhas_dnf() {\n which dnf >/dev/null 2>&1\n}\n\nhas_apt() {\n which apt >/dev/null 2>&1\n}\n\nis_networkmanager_enabled() {\n systemctl is-enabled NetworkManager.service > /dev/null 2>&1\n}\n\n# cPanel & WHM is incompatible with NetworkManager\nif is_networkmanager_enabled; then\n systemctl stop NetworkManager.service\n systemctl disable NetworkManager.service\n if has_dnf; then\n dnf -y remove NetworkManager\n elif has_yum; then\n yum -y remove NetworkManager\n fi\nfi\n\nhostnamectl set-hostname server.hostname.tld\n\ncd /home && curl -so installer -L https://securedownloads.cpanel.net/latest\n\nif is_supported_os; then\n if is_ubuntu20; then\n apt-get -o Acquire::ForceIPv4=true update -y\n DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\n sh installer --skiplicensecheck --skip-cloudlinux\n else\n sh installer --skiplicensecheck\n fi\nelse\n echo \"Your distribution is not supported by this StackScript.\"\n install -d -v -m 711 /var/cpanel\n touch /var/cpanel/cpinit.failed\nfi\n\nrm -f /etc/cpupdate.conf\ncat > /root/.bash_profile <<'END_OF_BASH_PROFILE'\n# .bash_profile\n# Get the aliases and functions\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n# User specific environment and startup programs\nPATH=$PATH:$HOME/bin\nexport PATH\nbash /etc/motd.sh\nif [ -t 0 ]; then\n URL=`whmlogin --nowait 2> /dev/null`\n WHMLOGIN_RETURN=$?\n if [ $WHMLOGIN_RETURN == 1 ]; then\n # whmlogin doesn't support --nowait. Output a URL and hope it's accurate.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n whmlogin\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n if [ $WHMLOGIN_RETURN == 2 ]; then\n # whmlogin indicates that cpinit hasn't updated the IP/hostname yet.\n echo \"To log in to WHM as the root user, run the command 'whmlogin' to get a web address for your browser.\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n # whmlogin returned a valid URL to use.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n echo \"$URL\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n fi\n fi\nfi\nEND_OF_BASH_PROFILE\n\ncat > /etc/motd.sh <<'END_OF_MOTD'\n#!/bin/bash\nsource /etc/os-release\necho \"\n ____ _ ___ __ ___ _ __ __\n ___| _ \\ __ _ _ __ ___| | ( _ ) \\ \\ / / | | | \\/ |\n / __| |_) / _. | ._ \\ / _ \\ | / _ \\/\\ \\ \\ /\\ / /| |_| | |\\/| |\n| (__| __/ (_| | | | | __/ | | (_> < \\ V V / | _ | | | |\n \\___|_| \\__._|_| |_|\\___|_| \\___/\\/ \\_/\\_/ |_| |_|_| |_|\n\"\necho \"Welcome to cPanel & WHM `/usr/local/cpanel/cpanel -V`\"\necho \"\"\necho \"Running $PRETTY_NAME\"\necho \"\"\necho \"For our full cPanel & WHM documentation: https://go.cpanel.net/docs\"\necho \"\"\necho \"For information on how to quickly set up a website in cPanel & WHM: https://go.cpanel.net/buildasite\"\necho \"\" # This new line makes output from bash_profiles easier to read\nEND_OF_MOTD\ntouch /var/cpanel/cpinit.done","user_defined_fields":[]},{"id":691621,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Cloudron One-Click","description":"Cloudron One-Click","ordinal":6,"logo_url":"assets/cloudron.svg","images":["linode/ubuntu20.04"],"deployments_total":13901,"deployments_active":628,"is_public":true,"mine":false,"created":"2020-11-30T21:21:45","updated":"2023-12-28T07:22:13","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\nwget https://cloudron.io/cloudron-setup\nchmod +x cloudron-setup\n./cloudron-setup --provider linode-mp\n\necho All finished! Rebooting...\n(sleep 5; reboot) &","user_defined_fields":[]},{"id":692092,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Secure Your Server One-Click","description":"Secure Your Server One-Click","ordinal":7,"logo_url":"assets/secureyourserver.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":4824,"deployments_active":753,"is_public":true,"mine":false,"created":"2020-12-03T10:01:28","updated":"2023-12-27T20:54:09","rev_note":"","script":"#!/usr/bin/env bash\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n#\n\n## Block Storage\n#\n#\n\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source Linode Helpers\nsource \nsource \nsource \nsource \n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode. (lower case only)"},{"name":"password","label":"The password for the limited sudo user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode"},{"name":"disable_root","label":"Would you like to disable root login over SSH?","oneof":"Yes,No"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address. This is used for creating DNS records and website VirtualHost configuration.","default":""},{"name":"send_email","label":"Would you like to be able to send email from this domain? (Requires domain)","oneof":"Yes,No","default":"No"},{"name":"volume","label":"To use a Block Storage volume, enter its name here.","default":""},{"name":"volume_size","label":"If creating a new Block Storage volume, enter its size in GB (NOTE: This creates a billable resource at $0.10/month per GB).","default":""}]},{"id":925722,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pritunl One-Click","description":"Pritunl One-Click","ordinal":8,"logo_url":"assets/pritunl.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":1193,"deployments_active":75,"is_public":true,"mine":false,"created":"2021-10-26T15:23:37","updated":"2023-12-27T11:51:08","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nfail2ban_install\n\n# Mongo Install\napt-get install -y wget gnupg dirmngr \nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Pritunl\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv E162F504A20CDF15827F718D4B7C549A058F8B6B\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.pritunl.com/stable/apt buster main\" | tee /etc/apt/sources.list.d/pritunl.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb http://repo.pritunl.com/stable/apt focal main\" | tee /etc/apt/sources.list.d/pritunl.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\n\napt update -y\napt install -y pritunl\n\nsystemctl enable pritunl.service\nsystemctl start pritunl.service\n\n# Performance tune\necho \"* hard nofile 64000\" >> /etc/security/limits.conf\necho \"* soft nofile 64000\" >> /etc/security/limits.conf\necho \"root hard nofile 64000\" >> /etc/security/limits.conf\necho \"root soft nofile 64000\" >> /etc/security/limits.conf\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA record","default":""}]},{"id":741206,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CyberPanel One-Click","description":"CyberPanel One-Click","ordinal":9,"logo_url":"assets/cyberpanel.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":11284,"deployments_active":591,"is_public":true,"mine":false,"created":"2021-01-27T02:46:19","updated":"2023-12-28T16:53:35","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### Install cyberpanel\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/cybersetup.sh )\n\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401709,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Minecraft: Java Edition One-Click","description":"Minecraft OCA","ordinal":10,"logo_url":"assets/Minecraft.svg","images":["linode/ubuntu20.04"],"deployments_total":20684,"deployments_active":351,"is_public":true,"mine":false,"created":"2019-03-08T21:13:32","updated":"2023-12-28T19:39:26","rev_note":"remove maxplayers hard coded options [oca-707]","script":"#!/usr/bin/env bash\n# Game config options:\n# https://minecraft.gamepedia.com/Server.properties\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n## Linode/SSH Security Settings - Required\n#\n#\n## Linode/SSH Settings - Optional\n#\n#\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n# Difficulty\n[[ \"$DIFFICULTY\" = \"Peaceful\" ]] && DIFFICULTY=0\n[[ \"$DIFFICULTY\" = \"Easy\" ]] && DIFFICULTY=1\n[[ \"$DIFFICULTY\" = \"Normal\" ]] && DIFFICULTY=2\n[[ \"$DIFFICULTY\" = \"Hard\" ]] && DIFFICULTY=3\n\n# Gamemode\n[[ \"$GAMEMODE\" = \"Survival\" ]] && GAMEMODE=0\n[[ \"$GAMEMODE\" = \"Creative\" ]] && GAMEMODE=1\n[[ \"$GAMEMODE\" = \"Adventure\" ]] && GAMEMODE=2\n[[ \"$GAMEMODE\" = \"Spectator\" ]] && GAMEMODE=3\n\n# Player Idle Timeout\n[[ \"$PLAYERIDLETIMEOUT\" = \"Disabled\" ]] && PLAYERIDLETIMEOUT=0\n\n# Minecraft-specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\nsystem_install_package mailutils postfix curl netcat wget file bzip2 \\\n gzip unzip bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux openjdk-17-jre dirmngr software-properties-common\n\n# Install LinuxGSM and Minecraft and enable the 'mcserver' service\nreadonly GAMESERVER='mcserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Minecraft configurations\nsed -i s/server-ip=/server-ip=\"$IP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Customer config\nsed -i s/allow-flight=false/allow-flight=\"$ALLOWFLIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/allow-nether=true/allow-nether=\"$ALLOWNETHER\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/announce-player-achievements=true/announce-player-achievements=\"$ANNOUNCEPLAYERACHIEVEMENTS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/difficulty=1/difficulty=\"$DIFFICULTY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-command-block=false/enable-command-block=\"$ENABLECOMMANDBLOCK\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-query=true/enable-query=\"$ENABLEQUERY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/force-gamemode=false/force-gamemode=\"$FORCEGAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/gamemode=0/gamemode=\"$GAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/generate-structures=true/generate-structures=\"$GENERATESTRUCTURES\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/hardcore=false/hardcore=\"$HARDCORE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-name=world/level-name=\"$LEVELNAME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-seed=/level-seed=\"$LEVELSEED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-type=DEFAULT/level-type=\"$LEVELTYPE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-build-height=256/max-build-height=\"$MAXBUILDHEIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-players=20/max-players=\"$MAXPLAYERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-tick-time=60000/max-tick-time=\"$MAXTICKTIME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-world-size=29999984/max-world-size=\"$MAXWORLDSIZE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/motd=.*/motd=\"$MOTD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/network-compression-threshold=256/network-compression-threshold=\"$NETWORKCOMPRESSIONTHRESHOLD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/op-permission-level=4/op-permission-level=\"$OPPERMISSIONLEVEL\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/player-idle-timeout=0/player-idle-timeout=\"$PLAYERIDLETIMEOUT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/pvp=true/pvp=\"$PVP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/resource-pack-sha1=/resource-pack-sha1=\"$RESOURCEPACKSHA1\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/server-port=25565/server-port=\"$PORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/snooper-enabled=true/snooper-enabled=\"$SNOOPERENABLED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-animals=true/spawn-animals=\"$SPAWNANIMALS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-monsters=true/spawn-monsters=\"$SPAWNMONSTERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-npcs=true/spawn-npcs=\"$SPAWNNPCS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/use-native-transport=true/use-native-transport=\"$USENATIVETRANSPORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/view-distance=10/view-distance=\"$VIEWDISTANCE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/rcon.password=*/rcon.password=\"\\\"$RCONPASSWORD\\\"\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-rcon=false/enable-rcon=true/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Start the service and setup firewall\nufw allow \"$PORT\"\nufw allow \"25575\"\n\n# Start and enable the Minecraft service\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"levelname","label":"World Name","default":"world"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"allowflight","label":"Flight Enabled","oneof":"true,false","default":"false"},{"name":"allownether","label":"Nether World Enabled","oneof":"true,false","default":"true"},{"name":"announceplayerachievements","label":"Player Achievements Enabled","oneof":"true,false","default":"true"},{"name":"maxplayers","label":"Maximum Players","default":"25"},{"name":"playeridletimeout","label":"Player Idle Timeout Limit","oneof":"Disabled,15,30,45,60","default":"Disabled"},{"name":"difficulty","label":"Difficulty Level","oneof":"Peaceful,Easy,Normal,Hard","default":"Easy"},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"true,false","default":"false"},{"name":"pvp","label":"PvP Enabled","oneof":"true,false","default":"true"},{"name":"forcegamemode","label":"Force Game Mode Enabled","oneof":"true,false","default":"false"},{"name":"leveltype","label":"World Type","oneof":"DEFAULT,AMPLIFIED,FLAT,LEGACY","default":"DEFAULT"},{"name":"levelseed","label":"World Seed","default":""},{"name":"spawnanimals","label":"Spawn Animals Enabled","oneof":"true,false","default":"true"},{"name":"spawnmonsters","label":"Spawn Monsters Enabled","oneof":"true,false","default":"true"},{"name":"spawnnpcs","label":"Spawn NPCs Enabled","oneof":"true,false","default":"true"},{"name":"gamemode","label":"Game Mode","oneof":"Survival,Creative,Adventure,Spectator","default":"Survival"},{"name":"generatestructures","label":"Structure Generation Enabled","oneof":"true,false","default":"true"},{"name":"maxbuildheight","label":"Maximum Build Height","oneof":"50,100,200,256","default":"256"},{"name":"maxworldsize","label":"Maximum World Size","oneof":"100,1000,10000,100000,1000000,10000000,29999984","default":"29999984"},{"name":"viewdistance","label":"View Distance","oneof":"2,5,10,15,25,32","default":"10"},{"name":"enablecommandblock","label":"Command Block Enabled","oneof":"true,false","default":"false"},{"name":"enablequery","label":"Querying Enabled","oneof":"true,false","default":"true"},{"name":"enablercon","label":"Enable RCON","oneof":"true,false","default":"false"},{"name":"rconpassword","label":"RCON Password","default":""},{"name":"rconport","label":"RCON Port","default":"25575"},{"name":"maxticktime","label":"Maximum Tick Time","default":"60000"},{"name":"networkcompressionthreshold","label":"Network Compression Threshold","default":"256"},{"name":"oppermissionlevel","label":"Op-permission Level","oneof":"1,2,3,4","default":"4"},{"name":"port","label":"Port Number","default":"25565"},{"name":"snooperenabled","label":"Snooper Enabled","oneof":"true,false","default":"true"},{"name":"usenativetransport","label":"Use Native Transport Enabled","oneof":"true,false","default":"true"},{"name":"username","label":"The username for the Linode's non-root admin/SSH user(must be lowercase)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's non-root admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":869129,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"aaPanel One-Click","description":"aaPanel One-Click","ordinal":11,"logo_url":"assets/aapanel.svg","images":["linode/centos7"],"deployments_total":5467,"deployments_active":320,"is_public":true,"mine":false,"created":"2021-07-20T18:50:46","updated":"2023-12-27T22:20:27","rev_note":"","script":"#!/bin/bash\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Yum Update\nyum update -y\n\n# Install aapanel\nyum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && echo y|bash install.sh aapanel\n\n# Log aaPanel login information\nbt default > /root/.aapanel_info\n\n# Stackscript Cleanup\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[]},{"id":923033,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Akaunting One-Click","description":"Akaunting One-Click","ordinal":12,"logo_url":"assets/akaunting.svg","images":["linode/ubuntu22.04"],"deployments_total":647,"deployments_active":22,"is_public":true,"mine":false,"created":"2021-10-18T01:01:19","updated":"2023-12-27T22:12:47","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# \n# \n# \n# \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nDEBIAN_FRONTEND=noninteractive apt-get update -qq >/dev/null\n\n###########################################################\n# Install NGINX\n###########################################################\napt-get install -y nginx\n\ncat <<'END' >/var/www/html/index.html\n\n \n \n \n \n \n\n Installing Akaunting\n\n \n \n\n \n \n\n \n
\n
\n \n
\n\n
\n \n
\n
\n

Installing...

Get back after 3 minutes!

\n
\n
\n \n\nEND\n\nchown www-data:www-data /var/www/html/index.html\nchmod 644 /var/www/html/index.html\n\n###########################################################\n# MySQL\n###########################################################\napt install -y mariadb-server expect\n\nfunction mysql_secure_install {\n # $1 - required - Root password for the MySQL database\n [ ! -n \"$1\" ] && {\n printf \"mysql_secure_install() requires the MySQL database root password as its only argument\\n\"\n return 1;\n }\n local -r db_root_password=\"$1\"\n local -r secure_mysql=$(\nexpect -c \"\nset timeout 10\nspawn mysql_secure_installation\nexpect \\\"Enter current password for root (enter for none):\\\"\nsend \\\"$db_root_password\\r\\\"\nexpect \\\"Change the root password?\\\"\nsend \\\"n\\r\\\"\nexpect \\\"Remove anonymous users?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Disallow root login remotely?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Remove test database and access to it?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Reload privilege tables now?\\\"\nsend \\\"y\\r\\\"\nexpect eof\n\")\n printf \"$secure_mysql\\n\"\n}\n\n# Set DB root password\necho \"mysql-server mysql-server/root_password password ${DB_PASSWORD}\" | debconf-set-selections\necho \"mysql-server mysql-server/root_password_again password ${DB_PASSWORD}\" | debconf-set-selections\n\nmysql_secure_install \"$DB_PASSWORD\"\n\n# Create DB\necho \"CREATE DATABASE ${DB_NAME};\" | mysql -u root -p\"$DB_PASSWORD\"\n\n# create DB user with password\necho \"CREATE USER '$DBUSER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\" | mysql -u root -p\"$DB_PASSWORD\"\n\necho \"GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DBUSER'@'localhost';\" | mysql -u root -p\"$DB_PASSWORD\"\necho \"FLUSH PRIVILEGES;\" | mysql -u root -p\"$DB_PASSWORD\"\n\n\n###########################################################\n# Install PHP \n###########################################################\napt-get install -y zip unzip php-mbstring php-zip php-gd php-cli php-curl php-intl php-imap php-xml php-xsl php-tokenizer php-sqlite3 php-pgsql php-opcache php-simplexml php-fpm php-bcmath php-ctype php-json php-pdo php-mysql\n\n###########################################################\n# Akaunting\n###########################################################\nmkdir -p /var/www/akaunting \\\n && curl -Lo /tmp/akaunting.zip 'https://akaunting.com/download.php?version=latest&utm_source=linode&utm_campaign=developers' \\\n && unzip /tmp/akaunting.zip -d /var/www/html \\\n && rm -f /tmp/akaunting.zip\n\ncat </var/www/html/.env\nAPP_NAME=Akaunting\nAPP_ENV=production\nAPP_LOCALE=en-GB\nAPP_INSTALLED=false\nAPP_KEY=\nAPP_DEBUG=false\nAPP_SCHEDULE_TIME=\"09:00\"\nAPP_URL=\n\nDB_CONNECTION=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_DATABASE=${DB_NAME}\nDB_USERNAME=${DBUSER}\nDB_PASSWORD=${DBUSER_PASSWORD}\nDB_PREFIX=\n\nBROADCAST_DRIVER=log\nCACHE_DRIVER=file\nSESSION_DRIVER=file\nQUEUE_CONNECTION=sync\nLOG_CHANNEL=stack\n\nMAIL_MAILER=mail\nMAIL_HOST=localhost\nMAIL_PORT=2525\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_NAME=null\nMAIL_FROM_ADDRESS=null\n\nFIREWALL_ENABLED=false\nEND\n\ncd /var/www/html && php artisan key:generate\n\n# Install Akaunting\nphp /var/www/html/artisan install --db-host=\"localhost\" --db-name=\"$DB_NAME\" --db-username=\"$DBUSER\" --db-password=\"$DBUSER_PASSWORD\" --company-name=\"$COMPANY_NAME\" --company-email=\"$COMPANY_EMAIL\" --admin-email=\"$ADMIN_EMAIL\" --admin-password=\"$ADMIN_PASSWORD\"\n\n# Fix permissions\nchown -Rf www-data:www-data /var/www/html\nfind /var/www/html/ -type d -exec chmod 755 {} \\;\nfind /var/www/html/ -type f -exec chmod 644 {} \\;\n\n###########################################################\n# Configure NGINX\n###########################################################\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat << END > /etc/nginx/nginx.conf\n# Generic startup file.\nuser www-data;\n\n#usually equal to number of CPUs you have. run command \"grep processor /proc/cpuinfo | wc -l\" to find it\nworker_processes auto;\nworker_cpu_affinity auto;\n\nerror_log /var/log/nginx/error.log;\npid /var/run/nginx.pid;\n\n# Keeps the logs free of messages about not being able to bind().\n#daemon off;\n\nevents {\nworker_connections 1024;\n}\n\nhttp {\n# rewrite_log on;\n\ninclude mime.types;\ndefault_type application/octet-stream;\naccess_log /var/log/nginx/access.log;\nsendfile on;\n# tcp_nopush on;\nkeepalive_timeout 64;\n# tcp_nodelay on;\n# gzip on;\n #php max upload limit cannot be larger than this \nclient_max_body_size 13m;\nindex index.php index.html index.htm;\n\n# Upstream to abstract backend connection(s) for PHP.\nupstream php {\n #this should match value of \"listen\" directive in php-fpm pool\n server unix:/run/php/php$PHP_VERSION-fpm.sock;\n server 127.0.0.1:9000;\n}\n\nserver {\n listen 80 default_server;\n\n server_name _;\n\n root /var/www/html;\n\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Content-Type-Options \"nosniff\";\n\n index index.html index.htm index.php;\n\n charset utf-8;\n\n location / {\n try_files \\$uri \\$uri/ /index.php?\\$query_string;\n }\n\n # Prevent Direct Access To Protected Files\n location ~ \\.(env|log) {\n deny all;\n }\n\n # Prevent Direct Access To Protected Folders\n location ~ ^/(^app$|bootstrap|config|database|overrides|resources|routes|storage|tests|artisan) {\n deny all;\n }\n\n # Prevent Direct Access To modules/vendor Folders Except Assets\n location ~ ^/(modules|vendor)\\/(.*)\\.((?!ico|gif|jpg|jpeg|png|js\\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ {\n deny all;\n }\n\n error_page 404 /index.php;\n\n # Pass PHP Scripts To FastCGI Server\n location ~ \\.php$ {\n fastcgi_split_path_info ^(.+\\.php)(/.+)\\$;\n fastcgi_pass php;\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n include fastcgi_params;\n }\n\n location ~ /\\.(?!well-known).* {\n deny all;\n }\n}\n}\nEND\n\n# Remove installation screen\nrm -f /var/www/html/index.html\n\nservice nginx reload\n\n###########################################################\n# Firewall\n###########################################################\napt-get install ufw -y\nufw limit ssh\nufw allow http\nufw allow https\n\nufw --force enable\n\n###########################################################\n# Stackscript cleanup\n###########################################################\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"company_name","label":"Company Name","example":"My Company"},{"name":"company_email","label":"Company Email","example":"my@company.com"},{"name":"admin_email","label":"Admin Email","example":"my@company.com"},{"name":"admin_password","label":"Admin Password","example":"s3cur39a55w0r0"},{"name":"db_name","label":"MySQL Database Name","example":"akaunting"},{"name":"db_password","label":"MySQL root Password","example":"s3cur39a55w0r0"},{"name":"dbuser","label":"MySQL Username","example":"akaunting"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur39a55w0r0"}]},{"id":985374,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Enterprise Edition One-Click","description":"Ant Media Enterprise Edition One-Click","ordinal":13,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":1404,"deployments_active":72,"is_public":true,"mine":false,"created":"2022-03-08T17:39:39","updated":"2023-12-28T15:21:43","rev_note":"","script":"#!/usr/bin/env bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\nZIP_FILE=\"https://antmedia.io/linode/antmedia_2.5.3.zip\"\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":804144,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Community Edition One-Click","description":"Ant Media Server One-Click","ordinal":14,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":5729,"deployments_active":470,"is_public":true,"mine":false,"created":"2021-04-01T12:50:57","updated":"2023-12-28T18:14:38","rev_note":"","script":"#!/usr/bin/env bash \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nZIP_FILE=\"https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.5.3/ant-media-server-community-2.5.3.zip\"\n\n\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":1102900,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Apache Airflow One-Click","description":"Apache Airflow One-Click App","ordinal":15,"logo_url":"assets/apacheairflow.svg","images":["linode/ubuntu20.04"],"deployments_total":127,"deployments_active":3,"is_public":true,"mine":false,"created":"2022-12-20T17:32:08","updated":"2023-11-28T13:38:46","rev_note":"","script":"#!/bin/bash\n#\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n# install depends\nexport DEBIAN_FRONTEND=noninteractive\nsudo apt update\n#sudo apt -y upgrade\nsudo apt install -y python3-pip\nsudo apt install -y build-essential libssl-dev libffi-dev python3-dev\nsudo apt install -y python3-venv # One of the Airflow examples requires virtual environments\n\nexport AIRFLOW_HOME=~/airflow\n\n# Install Airflow using the constraints file\nAIRFLOW_VERSION=2.4.1\nPYTHON_VERSION=\"$(python3 --version | cut -d \" \" -f 2 | cut -d \".\" -f 1-2)\"\n# For example: 3.7\nCONSTRAINT_URL=\"https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt\"\n# For example: https://raw.githubusercontent.com/apache/airflow/constraints-2.4.1/constraints-3.7.txt\npip install \"apache-airflow==${AIRFLOW_VERSION}\" --constraint \"${CONSTRAINT_URL}\"\n\n# The Standalone command will initialise the database, make a user,\n# and start all components for you.\nairflow standalone &\n\n###\n# \n# systemd unit file and per component settings go here\n# \n### \n\n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${DEFAULT_RDNS};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http \nufw allow https \nsystemctl enable ufw\n\nsleep 60 \n\n## install SSL certs. required \npip install pyOpenSSL --upgrade\napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n\n## write some login details\nexport ADMIN_PASS=$(cat /root/airflow/standalone_admin_password.txt)\ncat < /etc/motd \nThe installation of Apache Airflow is now complete, and the application is running in standalone mode.\n#\nYou can log into the Airflow GUI at ${ABS_DOMAIN}\nWith the credentials: \nUsername: admin\nPassword: ${ADMIN_PASS}\n#\nStandalone mode is not recommended for production.\nEND\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1160820,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Appwrite One-Click","description":"Appwrite One-Click ","ordinal":16,"logo_url":"assets/appwrite.svg","images":["linode/ubuntu22.04"],"deployments_total":187,"deployments_active":14,"is_public":true,"mine":false,"created":"2023-04-21T13:09:13","updated":"2023-12-28T13:21:09","rev_note":"","script":"#!/bin/bash\n### linode \n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nbash ./get-docker.sh\n\n# install haveged\nsudo apt-get install -y haveged\n\n# Install Appwrite\n# Grab latest version\nappversion=$(curl -s https://api.github.com/repos/appwrite/appwrite/releases/latest | grep -oP '\"tag_name\": \"\\K.*?(?=\")')\n\ndocker run --rm \\\n --volume /var/run/docker.sock:/var/run/docker.sock \\\n --volume \"$(pwd)\"/appwrite:/usr/src/code/appwrite:rw \\\n appwrite/appwrite:$appversion sh -c \"install --httpPort=80 --httpsPort=443 --interactive=N\"\n\necho \"Installation complete!\"","user_defined_fields":[]},{"id":401699,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ark One-Click","description":"Ark - Latest One-Click","ordinal":17,"logo_url":"assets/Ark@1x.svg","images":["linode/debian11"],"deployments_total":1152,"deployments_active":6,"is_public":true,"mine":false,"created":"2019-03-08T21:05:54","updated":"2023-12-26T06:07:52","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"arkserver\"\n\nset_hostname\napt_setup_update\n\n\n# ARK specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc-s1 libstdc++6 libstdc++6:i386 \n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install ARK\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\nsed -i s/XPMultiplier=.*/XPMultiplier=\"$XPMULTIPLIER\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPassword=.*/ServerPassword=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerHardcore=.*/ServerHardcore=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPVE=.*/ServerPVE=\"$SERVERPVE\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/Message=.*/Message=\"$MOTD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/SessionName=.*/SessionName=\"$SESSIONNAME\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerAdminPassword=.*/ServerAdminPassword=\"\\\"$RCONPASSWORD\\\"\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015/udp\nufw allow 7777:7778/udp\nufw allow 27020/tcp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rconpassword","label":"RCON password"},{"name":"sessionname","label":"Server Name","default":"Ark Server"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"serverpassword","label":"Server Password","default":""},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"True,False","default":"False"},{"name":"xpmultiplier","label":"XP Multiplier","oneof":"1,1.5,2,5,10,20","default":"2"},{"name":"serverpve","label":"Server PvE","oneof":"True,False","default":"False"}]},{"id":662118,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Azuracast One-Click","description":"AzuraCast One-Click","ordinal":18,"logo_url":"assets/azuracast.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":2727,"deployments_active":193,"is_public":true,"mine":false,"created":"2020-08-12T15:50:09","updated":"2023-12-26T18:58:53","rev_note":"","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, apt configuration and update/upgrade\nset_hostname\napt_setup_update\n\n# Install GIT\napt-get update && apt-get install -q -y git\n# Cloning AzuraCast and install\nmkdir -p /var/azuracast\ncd /var/azuracast\ncurl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh > docker.sh\nchmod a+x docker.sh\nyes 'Y' | ./docker.sh setup-release\nyes '' | ./docker.sh install\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":913277,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BeEF One-Click","description":"BeEF One-Click","ordinal":19,"logo_url":"assets/beef.svg","images":["linode/ubuntu22.04"],"deployments_total":30757,"deployments_active":1149,"is_public":true,"mine":false,"created":"2021-09-30T18:28:58","updated":"2023-12-28T19:44:10","rev_note":"","script":"#!/bin/bash\n#\n# Script to install BEEF on Linode\n# \n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \nbeef_config=\"/home/beef/config.yaml\"\nkey=\"privkey.pem\"\ncert=\"fullchain.pem\"\n# System Update\napt_setup_update\n# UFW\nufw allow 80\nufw allow 443\nufw allow 3000\nfunction configure_nginx {\n apt install git nginx ruby-dev -y\n # NGINX\n mkdir -p /var/www/certs/.well-known\n chown -R www-data:www-data /var/www/certs/\n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\nfunction configure_ssl {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\nfunction create_beef_user {\n function create_beef {\n groupadd --system beef\n useradd -s /sbin/nologin --system -g beef beef\n }\n grep beef /etc/passwd\n if [ $? -eq 1 ];then\n create_beef\n else\n echo \"[INFO] beef already on the system. Deleting user\"\n deluser --remove-home beef\n create_beef\n fi\n}\nfunction configure_beef {\n git clone https://github.com/beefproject/beef.git /home/beef\n chown -R beef: /home/beef\n cd /home/beef\n cp /etc/letsencrypt/live/$FQDN/$key .\n cp /etc/letsencrypt/live/$FQDN/$cert .\n # get line number to replace\n get_https_enable=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"enable:\" | awk -F \"-\" {'print $1'})\n get_https_public_enabled=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"public_enabled:\" | awk -F \"-\" {'print $1'})\n # replacing line numebr\n sed -i \"\"$get_https_enable\"s/enable: false/enable: true/\" $beef_config\n sed -i \"\"$get_https_public_enabled\"s/public_enabled: false/public_enabled: true/\" $beef_config\n sed -i \"/key:/c\\ key: \\\"$key\\\"\" $beef_config\n sed -i \"/cert:/c\\ cert: \\\"$cert\\\"\" $beef_config\n # creds\n #sed -i \"/user:/c\\ user: \\\"beef\\\"\" $beef_config\n sed -i \"/passwd:/c\\ passwd: \\\"$BEEFPASSWORD\\\"\" $beef_config\n # install local copy of beef\n # install deps\n apt install curl git build-essential openssl libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison nodejs libcurl4-openssl-dev ruby-dev -y\n su - -s /bin/bash beef\n bundle3.0 config set --local path /home/beef/.gem\n bundle3.0 install\n gem install --user-install xmlrpc\n \n}\nfunction beef_startup {\n cat < /home/beef/start_beef\n#!/bin/bash\nfunction start_beef {\n cd /home/beef\n echo no | ./beef\n}\nstart_beef\nEOF\n chown -R beef:beef /home/beef\n chmod +x /home/beef/start_beef\n}\n \nfunction beef_job {\n cat < /etc/systemd/system/beef.service\n[Unit]\nDescription=Browser Exploitation Framework\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=beef\nGroup=beef\nExecStart=/home/beef/start_beef\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start beef\n systemctl enable beef\n}\nfunction ssl_renew_cron {\n cat </root/certbot-beef-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & BeEf\n# Debug\n# set -xo pipefail\nexport BEEF_FULL=/home/beef/fullchain.pem\nexport BEEF_PRIVKEY=/home/beef/privkey.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat \\$FULLCHAIN > \\$BEEF_FULL\ncat \\$PRIVKEY > \\$BEEF_PRIVKEY\nservice beef reload\nEND\n chmod +x /root/certbot-beef-renewal.sh\n# Setup Cron\n crontab -l > cron\n echo \"* 1 * * 1 bash /root/certbot-beef-renewal.sh\" >> cron\n crontab cron\n rm cron\n}\nfunction install_complete {\n cat < /root/beef.info\n##############################\n# BEEF INSTALLATION COMPLETE #\n##############################\nEndpoint: https://$FQDN:3000/ui/panel\nCredentials can be found here:\n/home/beef/config.yaml\nHappy hunting!\nEOF\n}\nfunction main {\n create_beef_user\n configure_nginx\n configure_ssl\n configure_beef\n beef_startup\n beef_job\n ssl_renew_cron\n install_complete\n}\nmain\n# Clean up\nstackscript_cleanup\ncat /root/beef.info","user_defined_fields":[{"name":"beefpassword","label":"BEEF Password"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode. The username cannot contain any spaces or capitol letters. For this application the username 'beef' is reserved for the application, so please choose an alternative username for this deployment.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BitNinja One-Click","description":"BitNinja One-Click","ordinal":20,"logo_url":"assets/bitninja.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":36,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T01:03:02","updated":"2023-12-17T15:10:51","rev_note":"","script":"#!bin/bash\n\n# \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nwget -qO- https://get.bitninja.io/install.sh | /bin/bash -s - --license_key=\"$license_key\" -y","user_defined_fields":[{"name":"license_key","label":"License Key"}]},{"id":1037036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Budibase One-Click","description":"Budibase One Click App","ordinal":21,"logo_url":"assets/budibase.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":447,"deployments_active":22,"is_public":true,"mine":false,"created":"2022-08-02T18:42:41","updated":"2023-12-28T17:20:38","rev_note":"","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker.io\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Install Docker Compose\ncurl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\ndocker-compose --version\n\necho \"Creating passwords for /opt/budibase/.env\"\nVAR_JWT_SECRET=$(pwgen 16)\nVAR_MINIO_ACCESS_KEY=$(pwgen 16)\nVAR_MINIO_SECRET_KEY=$(pwgen 16)\nVAR_COUCH_DB_PASSWORD=$(pwgen 16)\nVAR_REDIS_PASSWORD=$(pwgen 16)\nVAR_INTERNAL_API_KEY=$(pwgen 16)\nIP=`hostname -I | awk '{print$1}'`\n\nmkdir -p /opt/budibase\ncd /opt/budibase\necho \"Fetch budibase docker compose file\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/docker-compose.yaml -o /opt/budibase/docker-compose.yml\necho \"Fetch budibase .env template\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/.env -o /opt/budibase/.env\necho \"Set passwords in /opt/budibase/.env\"\nsed -i \"s/JWT_SECRET=testsecret/JWT_SECRET=$VAR_JWT_SECRET/\" /opt/budibase/.env\nsed -i \"s/MINIO_ACCESS_KEY=budibase/MINIO_ACCESS_KEY=$VAR_MINIO_ACCESS_KEY/\" /opt/budibase/.env\nsed -i \"s/MINIO_SECRET_KEY=budibase/MINIO_SECRET_KEY=$VAR_MINIO_SECRET_KEY/\" /opt/budibase/.env\nsed -i \"s/COUCH_DB_PASSWORD=budibase/COUCH_DB_PASSWORD=$VAR_COUCH_DB_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/REDIS_PASSWORD=budibase/REDIS_PASSWORD=$VAR_REDIS_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/INTERNAL_API_KEY=budibase/INTERNAL_API_KEY=$VAR_INTERNAL_API_KEY/\" /opt/budibase/.env\nsed -i \"s/MAIN_PORT=10000/MAIN_PORT=$BBPORT/\" /opt/budibase/.env\ndocker-compose up -d\n\ncat </etc/profile.d/budibase_welcome.sh\n#!/bin/sh\n#\nIP=$(hostname -I | awk '{print$1}')\necho \"\n********************************************************************************\nWelcome to Budibase!\nTo help keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH) and the Web UI port $BBPORT.\n********************************************************************************\n # Budibase UI: http://$IP:$BBPORT/\n # Website: https://budibase.com\n # Documentation: https://docs.budibase.com\n # Github: https://github.com/Budibase/budibase\n # Community Support: https://github.com/Budibase/budibase/discussions\n # Restart Budibase: cd /opt/budibase; docker-compose down; docker-compose up -d\n # Budibase config: /etc/budibase/.env\n\"\nEND\nchmod +x /etc/profile.d/budibase_welcome.sh\n# Enable UFW and add some rules to it\nufw enable\nufw limit ssh/tcp comment 'Rate limit the SSH port'\nufw allow $BBPORT/tcp comment \"TCP Listen port for Budibase\"\nufw --force enable\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"BBPORT","label":"Budibase Port","example":"Default: 80","default":"80"}]},{"id":869155,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Chevereto One-Click","description":"Chevereto One-Click","ordinal":22,"logo_url":"assets/chevereto.svg","images":["linode/ubuntu20.04"],"deployments_total":240,"deployments_active":6,"is_public":true,"mine":false,"created":"2021-07-20T19:07:56","updated":"2023-12-21T02:51:10","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/chevereto/linode-marketplace\n\nset -e\n\nCHEVERETO_INSTALLER_TAG=\"3.1.0\"\nWORKING_DIR=\"/var/www/html\"\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php\napt install -y mysql-server\napt install -y php\napt install -y php-{common,cli,curl,fileinfo,gd,imagick,intl,json,mbstring,mysql,opcache,pdo,pdo-mysql,xml,xmlrpc,zip}\napt install -y python3-certbot-apache software-properties-common unzip\n\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\n\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Chevereto at http://\\$myip/installer.php\n * Secure your database by running:\n > mysql_secure_installation\n * Setup email delivery at http://\\$myip/dashboard/settings/email\nFor help and more information visit https://chevereto.com\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\n\ncat >/etc/cron.d/chevereto </etc/php/7.4/apache2/conf.d/chevereto.ini <>/var/log/per-instance.log\n\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\n\nCHEVERETO_DB_HOST=localhost\nCHEVERETO_DB_PORT=3306\nCHEVERETO_DB_NAME=chevereto\nCHEVERETO_DB_USER=chevereto\nCHEVERETO_DB_PASS=$(openssl rand -hex 16)\n\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\n\necho \"[OK] Chevereto Installer $CHEVERETO_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":869158,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ClusterControl One-Click","description":"ClusterControl One-Click","ordinal":23,"logo_url":"assets/clustercontrol.svg","images":["linode/ubuntu20.04"],"deployments_total":176,"deployments_active":2,"is_public":true,"mine":false,"created":"2021-07-20T19:13:44","updated":"2023-12-27T12:55:35","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Severalnines settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\nworkdir=/tmp\nIP=`hostname -I | awk '{print$1}'`\n# if command -v dig &>/dev/null; then\n# echo -e \"\\nDetermining network interfaces.\" \n# ext_ip=$(dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null)\n# [[ ! -z $ext_ip ]] && IP=${ext_ip}\n# fi\nlog_progress() {\n\n echo \"$1\" >> /root/cc_install.log\n}\n\ninstall_cc() {\n export HOME=/root\n export USER=root\n wget --no-check-certificate https://severalnines.com/downloads/cmon/install-cc\n chmod +x install-cc\n echo \"mysql cmon password = $CMONUSER_PASSWORD\" >> /root/.cc_passwords\n echo \"mysql root password = $DBROOT_PASSWORD\" >> /root/.cc_passwords\n SEND_DIAGNOSTICS=0 S9S_CMON_PASSWORD=$CMONUSER_PASSWORD S9S_ROOT_PASSWORD=$DBROOT_PASSWORD INNODB_BUFFER_POOL_SIZE=256 ./install-cc\n}\n\nfirstboot() {\n hostnamectl set-hostname clustercontrol\n\n ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N \"\"\n ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub\n SSH_KEY=$(cat /root/.ssh/id_rsa.pub)\n\n cat < /etc/update-motd.d/99-cc-motd \n#!/bin/sh\necho \"###\"\necho \"\"\necho \"Welcome to Severalnines Database Monitoring and Management Application - ClusterControl\"\necho \"Open your web browser to http://${IP}/clustercontrol to access ClusterControl's web application\"\necho \"\"\necho \"The public SSH key (root) is:\"\necho \"$SSH_KEY\"\necho \"\"\necho \"###\"\nEND\n\n chmod +x /etc/update-motd.d/99-cc-motd\n}\n\nenable_fw() {\n ufw default deny incoming\n ufw default allow outgoing\n ufw allow ssh\n ufw allow http\n ufw allow https\n ufw allow 9999\n ufw allow 9501\n}\n\ncleanup() {\n rm -rf /tmp/* /var/tmp/* /root/scripts\n history -c\n cat /dev/null > /root/.bash_history\n unset HISTFILE\n\n apt-get -y autoremove\n apt-get -y autoclean\n\n cat /dev/null > /var/log/lastlog; cat /dev/null > /var/log/wtmp; cat /dev/null > /var/log/auth.log\n\n ufw enable\n ufw status\n\n touch /.cc-provisioned\n}\n\nlog_progress \"** Installing ClusterControl, this could take several minutes. Please wait ...\"\ninstall_cc\nlog_progress \"** Setting motd ...\"\nfirstboot\nlog_progress \"** Enabling firewall ...\"\nenable_fw\nif [[ \"$SSL\" == \"Yes\" ]]; then\n log_progress \"** Enabling Let's Encrypt SSL ...\"\n python --version | grep -q 3.\n [[ $? -eq 0 ]] && PYTHON3=1\n if [[ -n $PYTHON3 ]]; then\n apt install -y certbot python3-certbot-apache\n else\n apt install -y certbot python-certbot-apache\n fi\n\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\ncleanup\n\n# Clean up\nlog_progress \"** Stackscript cleanup please wait ...\"\nstackscript_cleanup\n\nlog_progress \"** Installation successful...\"\n/etc/update-motd.d/99-cc-motd | tee -a /root/cc_install.log\n\nsystemctl restart sshd","user_defined_fields":[{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"cmonuser_password","label":"CMON user password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above)","oneof":"Yes,No","default":"Yes"}]},{"id":401700,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CS:GO One-Click","description":"CS:GO - Latest One-Click","ordinal":24,"logo_url":"assets/CSGO2.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":2142,"deployments_active":6,"is_public":true,"mine":false,"created":"2019-03-08T21:06:26","updated":"2023-11-02T20:39:58","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"csgoserver\"\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\n#Buyanywhere\nif [[ \"$BUYANYWHERE\" = \"Enabled\" ]]; then\n BUYANYWHERE=1\nelif [[ \"$BUYANYWHERE\" = \"Disabled\" ]]; then\n BUYANYWHERE=0\nelif [[ \"$BUYANYWHERE\" = \"Terrorists Only\" ]]; then\n BUYANYWHERE=2\nelif [[ \"$BUYANYWHERE\" = \"Counter-Terrorists Only\" ]]; then\n BUYANYWHERE=3\nfi\n\n#friendlyfire\n\nif [[ \"$FRIENDLYFIRE\" = \"Enabled\" ]]; then\n FRIENDLYFIRE=1\nelif [[ \"$FRIENDLYFIRE\" = \"Disabled\" ]]; then\n FRIENDLYFIRE=0\nfi\n\nset_hostname\napt_setup_update\n\n\n# CSGO specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install CSGO\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\n> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\n\ncat <> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsv_contact \"\"\nsv_lan 0\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile 0\nsv_hibernate_when_empty 1\nsv_hibernate_ms 5\nhost_name_store 1\nhost_info_show 1\nhost_players_show 2\nexec banned_user.cfg\nexec banned_ip.cfg\nwriteid\nwriteip\nEND\n\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"hostname $SERVERNAME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_roundtime $ROUNDTIME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsed -i s/mp_buy_anywhere.*/mp_buy_anywhere\\ \"$BUYANYWHERE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_maxrounds.*/mp_maxrounds\\ \"$MAXROUNDS\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_friendlyfire.*/mp_friendlyfire\\ \"$FRIENDLYFIRE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"$MOTD\" > /home/csgoserver/serverfiles/csgo/motd.txt\n\n\nif [[ \"$FRIENDLYFIRE\" = \"1\" ]]; then\nsed -i s/ff_damage_reduction_bullets.*/ff_damage_reduction_bullets\\ 0\\.85/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade.*/ff_damage_reduction_gernade\\ 0\\.33/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade_self.*/ff_damage_reduction_gernade_self\\ 0\\.4/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_other.*/ff_damage_reduction_other\\ 1/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"sv_kick_ban_duration 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_disable_autokick 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nfi\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015\nufw allow 27020/udp\nufw allow 27005/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server."},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode CS:GO Server"},{"name":"rconpassword","label":"RCON password"},{"name":"svpassword","label":"CSGO server password","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"roundtime","label":"Round Time Limit","oneof":"5,10,15,20,60","default":"5"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,5,10,15,20","default":"10"},{"name":"buyanywhere","label":"Buy Anywhere ","oneof":"Disabled,Enabled,Counter-Terrorists Only, Terrorists Only","default":"Disabled"},{"name":"friendlyfire","label":"Friendly Fire Enabled","oneof":"Enabled,Disabled","default":"Disabled"}]},{"id":688891,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Discourse One-Click","description":"Discourse One-Click","ordinal":25,"logo_url":"assets/discourse.svg","images":["linode/ubuntu20.04"],"deployments_total":1221,"deployments_active":62,"is_public":true,"mine":false,"created":"2020-11-17T20:55:26","updated":"2023-12-23T06:50:14","rev_note":"","script":"#!/bin/bash\n\n## Discourse Settings\n\n#\n#\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n#Install dependencies needed for Discourse\napt install git apt-transport-https ca-certificates curl software-properties-common net-tools -y\n\n#Clone Discourse Docker repo for install and management\ngit clone https://github.com/discourse/discourse_docker.git /var/discourse\n#UFW Firewall Rules\nufw allow http\nufw allow https\nufw allow 25\nufw allow 465\nufw allow 587\nufw enable <\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Python & Django\napt-get install -y python3 python3-pip\npip3 install Django\n\n# Create & Setup Django APP\nmkdir /var/www/\ncd /var/www/\ndjango-admin startproject DjangoApp\ncd DjangoApp\npython3 manage.py migrate\necho \"from django.contrib.auth.models import User; User.objects.create_superuser('$DJANGOUSER', '$DJANGOUSEREMAIL', '$DJANGOUSERPASSWORD')\" | python3 manage.py shell\nsed -i \"s/ALLOWED_HOSTS = \\[\\]/ALLOWED_HOSTS = \\['$IP'\\]/g\" DjangoApp/settings.py\npython3 manage.py runserver 0.0.0.0:8000 &\n\n# Start Django app on reboot\ncrontab -l | { cat; echo \"@reboot cd /var/www/DjangoApp && python3 manage.py runserver 0.0.0.0:8000 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"djangouser","label":"Django USER","example":"user1"},{"name":"djangouserpassword","label":"Django Password","example":"s3cure_p4ssw0rd"},{"name":"djangouseremail","label":"Django USER email","example":"user@email.tld"}]},{"id":607433,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Docker One-Click","description":"Docker One Click App","ordinal":27,"logo_url":"assets/docker.svg","images":["linode/ubuntu22.04"],"deployments_total":36335,"deployments_active":1824,"is_public":true,"mine":false,"created":"2019-10-31T20:14:04","updated":"2023-12-28T19:38:20","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Docker Settings\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-docker\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":401698,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Drupal One-Click","description":"Drupal One-Click","ordinal":28,"logo_url":"assets/Drupal.svg","images":["linode/ubuntu22.04"],"deployments_total":1863,"deployments_active":83,"is_public":true,"mine":false,"created":"2019-03-08T21:04:47","updated":"2023-12-27T00:32:33","rev_note":"","script":"#!/usr/bin/env bash\n## Drupal Settings\n# \n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, apt configuration and update/upgrade\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Install/configure UFW\nufw allow http\nufw allow https\n\n# Install/configure MySQL\napt-get install mariadb-server -y\nsystemctl start mariadb\nsystemctl enable mariadb\nmysql_root_preinstall\nrun_mysql_secure_installation\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE drupaldb\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT ALL ON drupaldb.* TO 'drupal'@'localhost' IDENTIFIED BY '$DB_PASSWORD'\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\n# Install & Configure Apache\napt-get install -y apache2\ntouch /var/log/apache2/drupal-error_log /var/log/apache2/drupal-access_log\ncp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/drupal.conf\ncat < /etc/apache2/sites-available/drupal.conf\n\n DocumentRoot /var/www/drupal\n ServerName $FQDN\n ServerAlias www.$FQDN\n \n Options FollowSymLinks\n AllowOverride All\n Order allow,deny\n allow from all\n RewriteEngine on\n RewriteBase /\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteCond %{REQUEST_URI} !=/favicon.ico\n RewriteRule ^ index.php [L]\n\n ErrorLog /var/log/apache2/drupal-error_log\n CustomLog /var/log/apache2/drupal-access_log common\n\nEND\na2enmod rewrite\na2dissite 000-default.conf\na2ensite drupal.conf\nsed -ie \"s/KeepAlive Off/KeepAlive On/g\" /etc/apache2/apache2.conf\nsystemctl restart apache2\nsystemctl enable apache2\n\n# Install PHP 8.1\napt-get install php libapache2-mod-php php-mysql php-curl php-cgi php-gd php-mbstring php-xml php-xmlrpc -y\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat < /etc/php/$PHP_VERSION/apache2/php.ini\nerror_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR\nerror_log = /var/log/php/error.log\nmax_input_time = 30\nEND\nmkdir /var/log/php\nchown www-data /var/log/php\n\n# Install Drupal\nrm -r /var/www/html\ncd ~; wget -4 https://www.drupal.org/download-latest/tar.gz\ntar -xf tar.gz -C /var/www/ && mv /var/www/drupal* /var/www/drupal\nrm tar.gz\nmkdir /var/www/drupal/sites/default/files\nchmod a+w /var/www/drupal/sites/default/files\ncp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php\nchmod a+w /var/www/drupal/sites/default/settings.php\ncat <> /var/www/drupal/sites/default/settings.php\n\\$settings['trusted_host_patterns'] = [\n '^$FQDN\\$',\n];\nEND\n\n# Cleanup\nsystemctl restart apache2\nsystemctl restart mysql\n\n# SSL\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"dbroot_password","label":"MySQL root Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"db_password","label":"Database Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Drupal server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1008125,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Easypanel One-Click","description":"Easypanel One-Click","ordinal":29,"logo_url":"assets/easypanel.svg","images":["linode/ubuntu22.04"],"deployments_total":1453,"deployments_active":79,"is_public":true,"mine":false,"created":"2022-05-18T16:43:00","updated":"2023-12-27T21:35:54","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nsh get-docker.sh\n\n# setup easypanel\ndocker run --rm \\\n -v /etc/easypanel:/etc/easypanel \\\n -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n easypanel/easypanel setup","user_defined_fields":[]},{"id":691620,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"FileCloud One-Click","description":"FileCloud One-Click","ordinal":30,"logo_url":"assets/filecloud.svg","images":["linode/ubuntu20.04"],"deployments_total":806,"deployments_active":12,"is_public":true,"mine":false,"created":"2020-11-30T21:16:19","updated":"2023-12-26T18:13:28","rev_note":"","script":"#!/bin/bash \n\n## Domain Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source and run the New Linode Setup script for DNS configuration\n# This also sets some useful variables, like $IP and $FQDN\n\nsource \n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nset pipefail -o\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Allow traffic on ports 80 and 443\nufw allow 80\nufw allow 443\n\n# Installing Filecloud and Prequisites\nwget -qO - https://repo.filecloudlabs.com/static/pgp/filecloud.asc | sudo apt-key add -\nwget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\necho \"deb [ arch=amd64 ] https://repo.filecloudlabs.com/apt/ubuntu focal/filecloud/22.1 main\" | sudo tee /etc/apt/sources.list.d/filecloud.list\napt-get update -y\napt-get install apache2 mongodb-org -y\napt install -y --no-install-recommends php8.1*\nACCEPT_EULA=Y apt-get install filecloud -y\n\nif [[ \"$SSL\" == \"Yes\" ]]; then\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"ssl","label":"Would you like to use a free CertBot SSL certificate?","oneof":"Yes,No","default":"No"},{"name":"soa_email_address","label":"Email Address for Lets' Encrypt Certificate","default":""},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":609392,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Flask One-Click","description":"Flask One-Click","ordinal":31,"logo_url":"assets/flask.svg","images":["linode/debian10"],"deployments_total":2189,"deployments_active":135,"is_public":true,"mine":false,"created":"2019-11-07T06:24:17","updated":"2023-12-28T06:10:27","rev_note":"Initial import","script":"#!/bin/bash\n\n## Enable logging\nexec > /var/log/stackscript.log 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\nufw_install\nufw allow http\n\n# Install Prereq's & Flask APP\napt install -y git\ncd /home\ngit clone https://github.com/abalarin/Flask-on-Linode.git flask_app_project\n\n# Install & configure Nginx\napt install -y nginx\ncat < /etc/nginx/sites-enabled/flask_app\nserver {\n listen 80;\n server_name $IP;\n location / {\n proxy_pass http://127.0.0.1:8000;\n proxy_set_header Host \\$host;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\n\nunlink /etc/nginx/sites-enabled/default\nnginx -s reload\n\n# Install python & Packages\napt install -y python3 python3-pip\ncd /home/flask_app_project\npip3 install -r flask_app/requirements.txt\n\n# Configure Flask\ncat < /etc/config.json\n{\n \"SECRET_KEY\": \"$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)\",\n \"SQLALCHEMY_DATABASE_URI\": \"sqlite:///site.db\"\n}\nEND\n\ncat < /home/flask_app_project/flask_app/__init__.py\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_login import LoginManager\nimport json\nimport urllib3\napp = Flask(__name__)\nwith open('/etc/config.json') as config_file:\n config = json.load(config_file)\napp.config['SECRET_KEY'] = config.get('SECRET_KEY')\napp.config['SQLALCHEMY_DATABASE_URI'] = config.get('SQLALCHEMY_DATABASE_URI')\ndb = SQLAlchemy(app)\nlogin_manager = LoginManager()\nlogin_manager.init_app(app)\nfrom flask_app import routes\nEND\n\n# Install and Configure Gunicorn\napt install -y gunicorn3\ngunicorn3 --workers=3 flask_app:app &\n\n# Install and Configure Supervisor\napt install -y supervisor\ncat < /etc/supervisor/conf.d/flask_app.conf\n[program:flask_app]\ndirectory=/home/flask_app_project\ncommand=gunicorn3 --workers=3 flask_app:app\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/flask_app/flask_app.err.log\nstdout_logfile=/var/log/flask_app/flask_app.out.log\nEND\n\nmkdir /var/log/flask_app\ntouch /var/log/flask_app/flask_app.out.log\ntouch /var/log/flask_app/flask_app.err.log\nsupervisorctl reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":971045,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Focalboard One-Click","description":"Focalboard One-Click","ordinal":32,"logo_url":"assets/focalboard.svg","images":["linode/ubuntu22.04"],"deployments_total":486,"deployments_active":19,"is_public":true,"mine":false,"created":"2022-02-08T16:23:08","updated":"2023-12-23T19:23:05","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Focalboard Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-focalboard\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n #Focalboard vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1088136,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster One-Click","description":"Galera Cluster One-Click","ordinal":33,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":143,"deployments_active":9,"is_public":true,"mine":false,"created":"2022-11-15T20:41:27","updated":"2023-12-24T01:01:57","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/galera-occ\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/galera-occ\" ]; then\n rm -rf /tmp/galera-occ\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n export DEBIAN_FRONTEND=non-interactive\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # add private IP address\n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/galera-occ\n cd /tmp/galera-occ/\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip3 install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"cluster_name","label":"Cluster Name"},{"name":"token_password","label":"Your Linode API token"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Galera CA"},{"name":"common_name","label":"Common Name","default":"Galera Server"},{"name":"cluster_size","label":"Galera cluster size","default":"3","oneof":"3"}]},{"id":688911,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gitea One-Click","description":"Gitea One-Click","ordinal":34,"logo_url":"assets/gitea.svg","images":["linode/debian10"],"deployments_total":1032,"deployments_active":67,"is_public":true,"mine":false,"created":"2020-11-17T21:16:09","updated":"2023-12-27T00:54:10","rev_note":"","script":"#! /bin/bash\n\n## Database Settings\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n#assigns var for IP address\nreadonly ip=$(hostname -I | awk '{print$1}')\n\n#intall git\napt install -y git\n\n#install nginx\napt install -y nginx\n\n#install mysql and secure\nmysql_root_preinstall\napt-get install -y mariadb-server\nsystemctl start mariadb\nsystemctl enable mariadb\nrun_mysql_secure_installation\n\n#create mysql db and user\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE gitea;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE USER 'gitea'@'localhost' IDENTIFIED BY '$(printf '%q' \"$DB_PASSWORD\")';\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' WITH GRANT OPTION;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES;\"\n\n#create user for gitea\nadduser --system --disabled-password --group --shell /bin/bash --gecos 'Git Version Control' --home /home/git git\n\n#create directories for gitea\nmkdir -p /var/lib/gitea/{custom,data,log}\nchown -R git:git /var/lib/gitea/\nchmod -R 750 /var/lib/gitea/\nmkdir /etc/gitea\nchown root:git /etc/gitea\nchmod 770 /etc/gitea\n\n#pull down gitea binary\nwget -O gitea https://dl.gitea.io/gitea/1.13.0/gitea-1.13.0-linux-amd64\nchmod +x gitea\n\n#validate gpg\napt install gnupg -y\ngpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2\ngpg --verify gitea-1.13.0-linux-amd64.asc gitea-1.13.0-linux-amd64\n\n#copy gitea to global location\ncp gitea /usr/local/bin/gitea\n\n#download systemd file from gitea\nwget https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service -P /etc/systemd/system/\n\n#add requires mysql to the systemd file\nsed -i 's/#Requires=mariadb.service/Requires=mariadb.service/' /etc/systemd/system/gitea.service\n\n#start gitea as systemd service\nsystemctl daemon-reload\nsystemctl start gitea\nsystemctl enable gitea\n\n#configures ufw rules before nginx\nsystemctl start ufw\nufw allow http\nufw allow https\nufw enable\n\n#set absolute domain if any, otherwise use localhost\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=localhost\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:3000;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx\n\nsleep 60\n\n#sets certbot ssl\nif [[ $SSL = \"Yes\" ]]; then\n check_dns_propagation ${ABS_DOMAIN} ${ip}\n apt install python3-certbot-nginx -y\n certbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${EMAIL_ADDRESS} -w /var/www/html/\nfi\n\nstackscript_cleanup","user_defined_fields":[{"name":"dbroot_password","label":"MySQL root Password"},{"name":"db_password","label":"gitea Database Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records.","default":""},{"name":"subdomain","label":"The subdomain for your server (Domain required)","default":""},{"name":"domain","label":"Your domain (API Token required)","default":""},{"name":"soa_email_address","label":"SOA Email for your domain (Required for new domains)","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate for your domain?","oneof":"Yes,No","default":"No"},{"name":"email_address","label":"Admin Email for Let's Encrypt certificate","default":""}]},{"id":401707,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"GitLab One-Click","description":"GitLab One-Click","ordinal":35,"logo_url":"assets/GitLab.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":3292,"deployments_active":137,"is_public":true,"mine":false,"created":"2019-03-08T21:12:21","updated":"2023-12-26T19:10:16","rev_note":"Remove SSH Pubkey UDF","script":"#!/usr/bin/env bash\n\n## Gitlab Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction gitlab {\n # Install dependencies\n apt-get install curl ca-certificates apt-transport-https gnupg2 -y\n\n curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash\n apt-get update -y\n EXTERNAL_URL=\"https://$FQDN\" apt-get install gitlab-ce -y\n\n}\n\nfunction sslgitlab {\n # Taking advantage of Gitlab's Let's Encrypt cert capabilities\n sed -i \"s/# letsencrypt\\['enable'\\] = nil/letsencrypt\\['enable'\\] = true/g\" /etc/gitlab/gitlab.rb\n sed -i -E \"s/(# )(letsencrypt\\['auto_renew*)/\\2/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/letsencrypt['auto_renew_minute'] = nil/letsencrypt['auto_renew_minute'] = 0/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/# letsencrypt\\['contact_emails'\\] = \\[\\]/letsencrypt\\['contact_emails'\\] = \\['$SOA_EMAIL_ADDRESS']/g\" /etc/gitlab/gitlab.rb\n\n gitlab-ctl reconfigure\n}\n\nfunction firewallgitlab {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n gitlab\n firewallgitlab\n sslgitlab\n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Gitlab server's DNS records","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""}]},{"id":1102905,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gopaddle One-Click","description":"Gopaddle One-Click app","ordinal":36,"logo_url":"assets/gopaddle.svg","images":["linode/ubuntu22.04"],"deployments_total":47,"deployments_active":3,"is_public":true,"mine":false,"created":"2022-12-20T17:44:47","updated":"2023-12-28T01:26:45","rev_note":"","script":"#!/bin/bash\nexec >/var/log/stackscript.log 2>&1\n# Install Docker\napt-get update -y\napt-get install -y ca-certificates curl gnupg lsb-release\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\napt-get update -y\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get update -y\napt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\n\n# Install microk8s\napt-get install snapd -y \nsudo snap install core\nexport PATH=$PATH:/snap/bin\nsnap install microk8s --classic --channel=1.25\nsnap refresh microk8s --channel=1.25\nmicrok8s status --wait-ready\n\n\n# Install gopaddle\nmicrok8s addons repo add gp-lite https://github.com/gopaddle-io/microk8s-community-addons-gplite.git\nmicrok8s enable gopaddle-lite\n\necho Waiting for gopaddle services to move to running state ...\nmicrok8s.kubectl wait --for=condition=ready pod -l released-by=gopaddle -n gp-lite --timeout=15m\n\nRDNS=$(dnsdomainname -A | awk '{print $1}')\n\necho gopaddle-lite installation is complete ! You can now access the gopaddle dashboard @ http://$RDNS:30003/","user_defined_fields":[]},{"id":607256,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Grafana One-Click","description":"Grafana One Click App","ordinal":37,"logo_url":"assets/grafana.svg","images":["linode/debian11"],"deployments_total":847,"deployments_active":56,"is_public":true,"mine":false,"created":"2019-10-30T20:43:07","updated":"2023-12-28T16:05:01","rev_note":"","script":"#!/usr/bin/env bash\n\n### Grafana OCA\n\n## Grafana Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Source the Bash StackScript Library\nsource \n\n# Source and run the New Linode Setup script for SSH configuration\nsource \n\n# Install PreReqs\napt-get install -y apt-transport-https \\\nsoftware-properties-common \\\nwget \\\ngnupg2 \\\nsqlite3\n\nwget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\necho \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\napt-get -y update\napt-get -y install grafana\nsystemctl start grafana-server\nsystemctl enable grafana-server\n\n## reset Grafana admin password\n#grafana-cli --homepath \"/usr/share/grafana\" admin reset-admin-password $grafana_password. --not working -hmorris\necho \"Initializing DB.....\" && sleep 25\nsqlite3 /var/lib/grafana/grafana.db <\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction grav {\n apt-get install -y apache2 php libapache2-mod-php php-mysql mysql-server composer php-curl php-common php-gd php-json php-mbstring php-xml php-zip\n run_mysql_secure_installation_ubuntu20\n cd /var/www/html\n git clone https://github.com/getgrav/grav.git\n cd grav\n chown www-data:www-data -R .\n su -l www-data -s /bin/bash -c \"cd /var/www/html/grav && composer install --no-dev -o && bin/grav install && bin/gpm install admin\"\n chown www-data:www-data -R .\n}\n\nfunction apache_conf {\n cat < /etc/apache2/sites-available/grav.conf\n\nServerAdmin $SOA_EMAIL_ADDRESS\nDocumentRoot /var/www/html/grav/\nServerName $FQDN\nServerAlias www.$FQDN\n\nOptions FollowSymLinks\nAllowOverride All\nOrder allow,deny\nallow from all\n\nErrorLog /var/log/apache2/$FQDN-error_log\nCustomLog /var/log/apache2/$FQDN-access_log common\n\n\nEND\n a2enmod rewrite\n a2ensite grav.conf\n a2dissite 000-default.conf\n service apache2 restart\n}\n\nfunction ssl {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n firewall\n grav\n apache_conf\n ssl\n\n}\n\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":688914,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Guacamole One-Click","description":"Guacamole One-Click","ordinal":39,"logo_url":"assets/guacamole.svg","images":["linode/ubuntu22.04"],"deployments_total":4503,"deployments_active":67,"is_public":true,"mine":false,"created":"2020-11-17T21:28:05","updated":"2023-12-28T14:57:28","rev_note":"","script":"#!/usr/bin/env bash\n### Apache Guacamole OCA\n### Required UDFs\n## Guacamole Settings\n#\n#\n#\n#\n#\n### Optional UDFs\n## Linode/SSH Security Settings\n#\n#\n## Domain Settings\n#\n#\n#\n## Logging and other debugging helpers\n# Put bash into verbose mode\nset -o pipefail\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Imports\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n### Main Script\n## Open the needed firewall ports\nufw allow http\nufw allow https\n# Install dependencies\nsystem_install_package build-essential libcairo2-dev libpng-dev libtool-bin libossp-uuid-dev libvncserver-dev freerdp2-dev libssh2-1-dev \\\nlibtelnet-dev libwebsockets-dev libpulse-dev libvorbis-dev libwebp-dev \\\nlibssl-dev libpango1.0-dev libswscale-dev libavcodec-dev libavutil-dev \\\nlibavformat-dev\n# Download the Guacamole Server source code\n# Fetch the latest release page\nlatest_release_page=$(curl -sL https://guacamole.apache.org/releases/ | grep -m 1 -o 'href=\"/releases/[0-9.]\\+/\"')\n# Extract the version number from the release page URL\nlatest_version=$(echo $latest_release_page | grep -Eo '[0-9]\\.[0-9]+.[0-9]+')\n# Download the server component\nwget https://downloads.apache.org/guacamole/$latest_version/source/guacamole-server-$latest_version.tar.gz\ntar -xvf guacamole-server-$latest_version.tar.gz\ncd guacamole-server-$latest_version\n# Build Guacamole Server using the downloaded source code\n./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots\nmake\nmake install\n# Update installed library cache and reload systemd\nldconfig\nsystemctl daemon-reload\n# Start guacd\nsystemctl enable guacd\n## Install Guacamole Web App\n# Install Apache Tomcat\nsystem_install_package tomcat9 tomcat9-admin tomcat9-common tomcat9-user\n# Download and install the Guacamole Client\nwget https://downloads.apache.org/guacamole/$latest_version/binary/guacamole-$latest_version.war\nmv guacamole-$latest_version.war /var/lib/tomcat9/webapps/guacamole.war\nsystemctl restart tomcat9 guacd\n## Guacamole configs\nmkdir /etc/guacamole\nreadonly ENCRYPTED_GUACAMOLE_PASSWORD=\"$(echo -n \"$GUACAMOLE_PASSWORD\" | openssl md5 | awk '{print $2}')\"\ncat <> /etc/guacamole/user-mapping.xml\n\n \n \n \n \n vnc\n localhost\n 5901\n ${PASSWORD}\n \n \n\nEOF\ncat <> /etc/guacamole/guacd.conf\n[daemon]\npid_file = /var/run/guacd.pid\n#log_level = debug\n[server]\nbind_host = 127.0.0.1\nbind_port = 4822\nEOF\ncat <> /etc/guacamole/guacamole.properties\n# Hostname and port of guacamole proxy\nguacd-hostname: localhost\nguacd-port: 4822\nEOF\nsystemctl restart tomcat9 guacd\n## Install a desktop environment (XFCE) and VNC Server\n# Install XFCE & NVC\nsystem_install_package xfce4 xfce4-goodies tigervnc-standalone-server expect\n# Set the VNC Server password\nreadonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\nsystemctl restart tomcat9 guacd\nkillvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\nkill $killvncprocess\n# Create a systemd service for Tiger VNC\ntouch /etc/systemd/system/vncserver@.service\ncat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n# Start and enable the systemd service\nsystemctl start vncserver@1.service\nsystemctl enable vncserver@1.service\n## Reverse proxy for the Guacamole client\n# Install Apache\napache_install\na2enmod proxy proxy_http headers proxy_wstunnel\n# Create the VirtualHost for Guacamole\ncat < /etc/apache2/sites-available/guacamole.conf\n\n ServerName $FQDN\n ErrorLog ${APACHE_LOG_DIR}/guacamole_error.log\n CustomLog ${APACHE_LOG_DIR}/guacamole_access.log combined\n \n Require all granted\n ProxyPass http://localhost:8080/guacamole/ flushpackets=on\n ProxyPassReverse http://localhost:8080/guacamole/\n \n \n Require all granted\n ProxyPass ws://localhost:8080/guacamole/websocket-tunnel\n ProxyPassReverse ws://localhost:8080/guacamole/websocket-tunnel\n \n Header always unset X-Frame-Options\n\nEOF\n# Enable the VirtualHost\na2ensite guacamole.conf\nsystemctl restart apache2\n## HTTPS\nsystem_install_package python3-certbot-apache\ncertbot -n --apache --agree-tos --redirect --hsts --staple-ocsp --email \"$SOA_EMAIL_ADDRESS\" -d \"$FQDN\" \n## Cleanup after ourselves\nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo/VNC user to be created for the Linode"},{"name":"password","label":"The password for the limited sudo/VNC user"},{"name":"guacamole_user","label":"The username to be used with Guacamole"},{"name":"guacamole_password","label":"The password to be used with Guacamole"},{"name":"soa_email_address","label":"Email for SSL certificate"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required if filling out any of the domain-related fields.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record","default":""},{"name":"domain","label":"The domain for the Linode's DNS record","default":""}]},{"id":1102902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HaltDOS Community WAF One-Click","description":"HaltDOS Community WAF One-Click app","ordinal":40,"logo_url":"assets/haltdos.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":178,"deployments_active":8,"is_public":true,"mine":false,"created":"2022-12-20T17:34:20","updated":"2023-12-19T23:25:10","rev_note":"","script":"#!/bin/bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\necho -e \"\\n---------------HALTDOS COMMUNITY WAF SETUP---------------\"\n\nexport NEEDRESTART_SUSPEND=1\nip=`ip route get 8.8.8.8 | awk -F\"src \" 'NR==1{split($2,a,\" \");print a[1]}'`\necho -e \"Checking OS ...\"\nsource /etc/os-release > /dev/null 2>&1\narch=`uname -m`\nif [[ \"$ID\" == \"ubuntu\" || \"$ID\" == \"debian\" ]]; then\n if [[ \"$VERSION_ID\" == \"18.04\" || \"$VERSION_ID\" == \"20.04\" || \"$VERSION_ID\" == \"22.04\" || \"$VERSION_ID\" == \"11\" ]]; then\n if [ \"$arch\" != \"x86_64\" ]; then\n echo -e \"\\e[1;31m$arch is not yet supported. Supported System Architecture - x86_64 \\e[0m\"\n fi\n else\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported OS - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\n fi\nelse\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported Versions - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\nfi\n\necho -e \"Downloading dependencies ...\"\n\napt-get update &> /dev/null\n\napt-get install -y default-jdk default-jre &> /dev/null\necho \"JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/\" >> /etc/environment\nsource /etc/environment\n\necho -e \"Downloading latest binaries ...\"\n\nsource /etc/os-release > /dev/null 2>&1\nif [ \"$VERSION_ID\" == \"18.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null \n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-18/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"20.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-20/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"22.04\" ]; then\n apt-get install -y libmaxminddb-dev libmaxminddb0 mmdb-bin python2-dev python2 &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-22/hd-community-waf-x86_64.deb &> /dev/null\nelif [[ \"$ID\" == \"debian\" && \"$VERSION_ID\" == \"11\" ]]; then\n apt-get install -y sudo libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/debian-11/hd-community-waf-x86_64.deb &> /dev/null\nfi\n\napt-get install -y ./hd-community-waf.deb &> /dev/null\nrm hd-community-waf.deb\necho -e \"Haltdos Community WAF Installed\"\n\n\ncurl -s -k -o hd-community-controller.deb https://binary.haltdos.com/community/waf/gui/hd-community-controller-x86_64.deb &> /dev/null\napt-get install -y ./hd-community-controller.deb &> /dev/null\nrm hd-community-controller.deb\necho -e \"Haltdos Community Controller Installed\"\n\n\necho -e \"Haltdos Community WAF Setup Done\\n\"\necho -e \"Configure your WAF on https://$ip:9000\\n\"\nexport NEEDRESTART_SUSPEND=0","user_defined_fields":[]},{"id":912262,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Harbor One-Click","description":"Harbor One-Click","ordinal":41,"logo_url":"assets/harbor.svg","images":["linode/ubuntu22.04"],"deployments_total":291,"deployments_active":13,"is_public":true,"mine":false,"created":"2021-09-29T17:06:13","updated":"2023-12-15T12:35:33","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## harbor Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-harbor\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # harbor vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the Harbor server and Let's Encrypt SSL certificate"}]},{"id":1037037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad One-Click","description":"HashiCorp Nomad One Click App","ordinal":42,"logo_url":"assets/nomad.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":106,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-08-02T18:46:19","updated":"2023-12-21T18:36:44","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## set some variables\nexport NOMAD_DIR=/usr/bin\nexport NOMAD_PATH=${NOMAD_DIR}/nomad\nexport NOMAD_CONFIG_DIR=/etc/nomad.d\nexport NOMAD_DATA_DIR=/opt/nomad/data\nexport NOMAD_TLS_DIR=/opt/nomad/tls\nexport NOMAD_ENV_VARS=${NOMAD_CONFIG_DIR}/nomad.conf\nexport IP=$(hostname -I | awk '{print$1}')\n\n\n## install gpg\napt-get install -y gpg\n\n## Install Nomad\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\nsudo apt update -y && sudo apt install -y nomad\n\n#echo \"Start Nomad in -server mode\"\nsudo tee ${NOMAD_ENV_VARS} > /dev/null < ${NOMAD_ENV_VARS}\n[Unit]\nDescription=Nomad Agent\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nRestart=on-failure\nEnvironmentFile=/etc/nomad.d/nomad.conf\nExecStart=/usr/local/bin/nomad agent -config /etc/nomad.d $FLAGS\nExecReload=/bin/kill -HUP $MAINPID\nKillSignal=SIGTERM\nUser=root\nGroup=root\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\n## enable and start nomad\nsystemctl enable nomad\nsystemctl start nomad\n\n## Install Docker\ncurl -fsSL get.docker.com | sudo sh\n\n## Configure nginx container\ncat << EOF > /root/nginx.conf\nevents {}\n\nhttp {\n server {\n location / {\n proxy_pass http://nomad-ws;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n\n # Nomad blocking queries will remain open for a default of 5 minutes.\n # Increase the proxy timeout to accommodate this timeout with an\n # additional grace period.\n proxy_read_timeout 310s;\n\n # Nomad log streaming uses streaming HTTP requests. In order to\n # synchronously stream logs from Nomad to NGINX to the browser\n # proxy buffering needs to be turned off.\n proxy_buffering off;\n\n # The Upgrade and Connection headers are used to establish\n # a WebSockets connection.\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n\n # The default Origin header will be the proxy address, which\n # will be rejected by Nomad. It must be rewritten to be the\n # host address instead.\n proxy_set_header Origin \"\\${scheme}://\\${proxy_host}\";\n }\n }\n\n # Since WebSockets are stateful connections but Nomad has multiple\n # server nodes, an upstream with ip_hash declared is required to ensure\n # that connections are always proxied to the same server node when possible.\n upstream nomad-ws {\n ip_hash;\n server host.docker.internal:4646;\n }\n}\nEOF\n\n## start docker container\ndocker run -d --publish=8080:80 --add-host=host.docker.internal:host-gateway \\\n --mount type=bind,source=$PWD/nginx.conf,target=/etc/nginx/nginx.conf \\\n nginx:latest\n\n## firewall\nufw allow 22\nufw allow 80\nufw allow 443\nufw allow 4646\nufw allow 8080\n\ncat << EOF > /etc/motd\n#################################\n The Nomad GUI is now available at HTTP://${IP}:8080\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Nomad configurations at https://www.nomadproject.io/docs/configuration\n#################################\nEOF\n\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1226544,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster One-Click","description":"Nomad Cluster One-Click","ordinal":43,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":106,"deployments_active":8,"is_public":true,"mine":false,"created":"2023-08-25T19:05:25","updated":"2023-12-24T00:06:53","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\ngit_username=\"akamai-compute-marketplace\"\nexport GIT_REPO_1=\"https://github.com/$git_username/nomad-occ.git\"\nexport GIT_REPO_2=\"https://github.com/$git_username/nomad-client-occ.git\"\nexport DEBIAN_FRONTEND=non-interactive\nexport UUID=$(uuidgen | awk -F - '{print $1}')\nexport CLUSTER_MODE='cluster'\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-server-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n REGION=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .region)\n export REGION=\"${REGION}\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${UUID}-${REGION}\\\"]}\" \\ \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO_1} /tmp/linode\n git clone ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n # clone one branch to test \n # git clone -b develop ${GIT_REPO_1} /tmp/linode\n # git clone -b develop ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Total instance count","default":"6","oneof":"6"},{"name":"servers","label":"Nomad Server count","default":"3","oneof":"3"},{"name":"clients","label":"Nomad client size","default":"3","oneof":"3"}]},{"id":1226545,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Clients Cluster One-Click","description":"Nomad Cluster Clients One-Click","ordinal":44,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":3,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-08-25T19:07:27","updated":"2023-11-14T15:53:47","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-client-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${CLUSTER_UUID}\\\"]}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=noninteractive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n # clone one branch to test \n # git clone -b develop ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Nomad Client Count","default":"3","oneof":"3,5,7"},{"name":"consul_nomad_autojoin_token_password","label":"consul_nomad_autojoin_token generated by Nomad Server OCC"},{"name":"cluster_uuid","label":"cluster_uuid tag for the Nomad Server OCC being joined to.","# git repogit_username":"akamai-compute-marketplace","export git_repo":"https://github.com/$git_username/nomad-client-occ.git"}]},{"id":1037038,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Vault One-Click","description":"HashiCorp Vault One Click App","ordinal":45,"logo_url":"assets/vault.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":220,"deployments_active":14,"is_public":true,"mine":false,"created":"2022-08-02T18:47:32","updated":"2023-12-25T08:55:22","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nexport IP=$(hostname -I | awk '{print$1}')\nexport VAULT_ADDR=\"http://${IP}:8200\"\n\n## install gpg\napt install -y gpg\n\n## add hashicorp gpg key and repo\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg >/dev/null\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\n\n## install vault\napt update && apt install -y vault\n\n## basic vault configs\nmkdir -p /vault/data\nchown -R vault:vault /vault\ncat << EOF > /etc/vault.d/vault.hcl\nstorage \"raft\" {\n path = \"/vault/data\"\n node_id = \"node1\"\n}\n\nlistener \"tcp\" {\n address = \"${IP}:8200\"\n tls_disable = \"true\"\n}\n\ndisable_mlock = true\n\napi_addr = \"http://127.0.0.1:8200\"\ncluster_addr = \"https://127.0.0.1:8201\"\nui = true\nEOF\n\n## systemd for vault\nsystemctl enable vault.service\n\n## Start vault server and stash the tokens\nsystemctl start vault.service\ntouch /root/.vault_tokens.txt\nsleep 20\nvault operator init | grep 'Token\\|Unseal' >> /root/.vault_tokens.txt\n\n## firewall\nufw allow 22\nufw allow 8200\n\n## config info and recommendations\ncat << EOF > /etc/motd\n#####################################\n The Vault server GUI is now available at ${VAULT_ADDR}\n The randomly generate Unseal Tokens and Initial Root Token are listed in /root/.vault_tokens.txt\n ** STORE THESE VALUES SOMEWHERE SAFE AND SECURE **\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Vault configurations at https://www.vaultproject.io/docs/configuration\n######################################\nEOF\n\nsleep 20\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1177605,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Illa Builder One-Click","description":"Illa Builder One-Click App","ordinal":46,"logo_url":"assets/illabuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":101,"deployments_active":3,"is_public":true,"mine":false,"created":"2023-05-17T14:22:00","updated":"2023-12-17T22:23:44","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Sources OCA helpers\nsource \nsource \nsource \nsource \n# Apt update/upgrade\nexport DEBIAN_FRONTEND=non-interactive\napt update && apt upgrade -y\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Env config\nILLA_HOME_DIR=~/illa\nPG_VOLUMN=${ILLA_HOME_DIR}/database\nDRIVE_VOLUMN=${ILLA_HOME_DIR}/drive\n\n\n# Init\nmkdir -p ${ILLA_HOME_DIR}\nmkdir -p ${PG_VOLUMN}\nmkdir -p ${DRIVE_VOLUMN}\n\n# Run\ndocker run -d \\\n --name illa_builder \\\n -v $PG_VOLUMN:/opt/illa/database \\\n -v $DRIVE_VOLUMN:/opt/illa/drive \\\n -p 80:2022 \\\n illasoft/illa-builder:latest\n\necho \"\n********************************************************************************\nWelcome to ILLA Builder!\n********************************************************************************\n # ILLA Builder: http://\"$FQDN\"\n # Website: https://www.illacloud.com\n # Documentation: https://www.illacloud.com/docs/about-illa\n # Github: https://github.com/illacloud\n # Community Support: https://github.com/orgs/illacloud/discussions\n\"","user_defined_fields":[]},{"id":607401,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jenkins One-Click","description":"Jenkins One-Click App","ordinal":47,"logo_url":"assets/jenkins.svg","images":["linode/debian11"],"deployments_total":2025,"deployments_active":135,"is_public":true,"mine":false,"created":"2019-10-31T15:29:54","updated":"2023-12-28T10:16:47","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prereq's & Jenkins\napt install -y default-jre wget gnupg2\nwget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -\nsh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'\napt_setup_update\napt install -y jenkins\nsystemctl enable --now jenkins\n\n# Cleanup \nstackscript_cleanup","user_defined_fields":[]},{"id":869623,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"JetBackup One-Click","description":"JetBackup One-Click","ordinal":48,"logo_url":"assets/jetbackup.svg","images":["linode/centos7","linode/almalinux8"],"deployments_total":102,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-21T12:45:59","updated":"2023-11-21T02:29:13","rev_note":"","script":"#!/bin/bash\n\n# JetBackup StackScript UDF Variables\n# \n# \n#\n# The next line makes the Official cPanel StackScript available if cPanel/WHM is selected as the control panel. Do not remove this line.\n# source \n#\n# Log File Paths:\n# StackScript Log: /var/log/stackscript.log\n# cPanel/WHM installation: /var/log/stackscript-595742.log\n# Debugging: /var/log/stackscript-debug.log\n#\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>/var/log/stackscript-debug.log\necho \"PID: $$\"\nCONTROLPANEL=${CONTROLPANEL}\nRELEASE=${RELEASETIER}\nJBDIR=\"/usr/local/jetapps/etc/jetbackup5\"\n\nif [[ -z ${CONTROLPANEL} ]]; then\necho \"Error: No panel selected. Please select a panel to deploy JetBackup.\"\nexit 1\nelif [[ -d ${JBDIR} ]]; then\necho \"Error: JetBackup already installed. Aborting StackScript.\"\nexit 0\nfi\n\necho \"Installing JetApps Repository\"\nrpm --import http://repo.jetlicense.com/centOS/RPM-GPG-KEY-JETAPPS\nyum -y -q install http://repo.jetlicense.com/centOS/jetapps-repo-latest.rpm\nyum -y -q install jetapps --disablerepo=* --enablerepo=jetapps\necho \"JetApps Repository Successfully Installed.\"\n\ncpanelinstall() {\n\necho \"Running cPanel/WHM Marketplace StackScript. You can track the progress of cPanel/WHM with: tail -f /var/log/stackscript-595742.log \"\n(source /root/ssinclude-595742 >>/var/log/stackscript-595742.log 2>&1)\n\n}\n\n# JETBACKUP 5 FOR LINUX - STANDALONE INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"Linux\" ]; then\necho \"Installing JetBackup 5.\"\npackage='jetbackup5-linux'\njetapps --install $package $RELEASE\njbhostname=$(hostname)\njbhostname=\"https://${jbhostname}:3035\"\necho \"Adding a Firewall rule to open port 3035. Port 3035 must be open for access to the JetBackup 5 Linux UI.\"\nfirewall-cmd --permanent --add-port=3035/tcp\nfirewall-cmd --reload\necho \"To go to JetBackup and Accept the User Agreement, go to ${jbhostname} and enter your root login credentials.\"\necho \"To generate a one-time JetBackup 5 login URL after installation and acceptance of the EULA type the following command in the terminal:\"\necho \"jb5login\"\nfi\n\n# JETBACKUP 5 FOR CPANEL/WHM INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"cPanel/WHM\" ]; then\n\npackage='jetbackup5-cpanel'\ncpanelinstall\nsleep 2\necho \"Installing JetBackup 5.\"\njetapps --install $package $RELEASE\necho \"To log in to cPanel/WHM as root user, please enter the following command to generate a one-time login token:\"\necho \"\"\necho \"whmlogin\"\nfi\n\necho \"Review the JetBackup 5 Getting Started Guide at https://docs.jetbackup.com/v5.1/adminpanel/gettingStarted.html\"\ninstallVersion=\"$(jetbackup5 --version | cut -d ' ' -f 1,3,4 | sed \"2 d\")\"\necho \"${installVersion} Successfully Installed!\"\nrm /root/ssinclude-595742\nrm /root/StackScript\nexit 0","user_defined_fields":[{"name":"CONTROLPANEL","label":"Choose a Control Panel to use with JetBackup 5. cPanel/WHM or Linux (No Control Panel)","default":"cPanel/WHM","oneof":"cPanel/WHM,Linux"},{"name":"RELEASETIER","label":"Choose a JetBackup Release Tier.","default":"stable","oneof":"stable,beta,edge"}]},{"id":662121,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jitsi One-Click","description":"Jitsi One-Click","ordinal":49,"logo_url":"assets/jitsi.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":4539,"deployments_active":127,"is_public":true,"mine":false,"created":"2020-08-12T16:08:51","updated":"2023-12-28T02:20:05","rev_note":"","script":"#!/bin/bash\n\n## Jitsi Settings\n#\n\n## Domain Settings\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# dependencies\nexport DEBIAN_FRONTEND=noninteractive\napt install apt-transport-https gnupg2 curl wget -y\napt-add-repository universe\napt update -y\n\n#Install Jitisi dep Prosody\necho deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list\nwget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -\napt install lua5.2\n\n#Install Nginx\napt install -y nginx\nsystemctl start nginx\nsystemctl enable nginx\n\n#Install Jitsi Meet\ncurl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg'\necho 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null\n\n# update all package sources\napt update -y\necho \"jitsi-videobridge jitsi-videobridge/jvb-hostname string $FQDN\" | debconf-set-selections\necho \"jitsi-meet-web-config jitsi-meet/cert-choice select 'Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)'\" | debconf-set-selections\napt --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes install jitsi-meet\n\n# Firewall\nsudo ufw allow 80/tcp\nsudo ufw allow 443/tcp\nsudo ufw allow 10000/udp\nsudo ufw allow 22\nsudo ufw allow 3478/udp\nsudo ufw allow 5349/tcp\nsudo ufw enable\n\n# SSL \ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh <\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction lampjoomla {\n apt-get install apache2 mariadb-server php php-common libapache2-mod-php php-cli php-fpm php-mysql php-json php-opcache php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-zip -y\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cat < /etc/php/$PHP_VERSION/apache2/php.ini\nmemory_limit = 512M\nupload_max_filesize = 256M\npost_max_size = 256M \nmax_execution_time = 300\noutput_buffering = off\ndisplay_errors = off\nupload_tmp_dir = \"/var/www/html/joomla/tmp\"\nEND\n}\n\nfunction databaseconf {\n run_mysql_secure_installation\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE DATABASE joomla_db;\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER 'joomla'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla'@'localhost';\"\n}\n\nfunction apachejoomla {\n apt-get install wget unzip -y\n mkdir -p /var/www/html/joomla\n cd /tmp && wget https://downloads.joomla.org/cms/joomla4/4-1-0/Joomla_4-1-0-Stable-Full_Package.zip?format=zip\n unzip Joomla_4* -d /var/www/html/joomla\n chown -R www-data:www-data /var/www/html/joomla \n chmod -R 755 /var/www/html/joomla\n cat < /etc/apache2/sites-available/joomla.conf\n\n ServerAdmin $SOA_EMAIL_ADDRESS\n DocumentRoot /var/www/html/joomla\n ServerName $FQDN\n\n \n Options FollowSymlinks\n AllowOverride All\n Require all granted\n \n\n ErrorLog ${APACHE_LOG_DIR}/$FQDN_error.log\n CustomLog ${APACHE_LOG_DIR}/$FQDN_access.log combined\n\n\nEND\n a2ensite joomla.conf\n a2enmod rewrite\n a2enmod php$PHP_VERSION\n a2dissite 000-default.conf\n systemctl restart apache2\n\n ufw allow http\n ufw allow https\n}\nfunction ssljoomla {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\n\nfunction main {\n lampjoomla\n databaseconf\n apachejoomla\n ssljoomla\n stackscript_cleanup\n}\n# Execute script\nmain","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":985380,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Joplin One-Click","description":"Joplin One-Click","ordinal":51,"logo_url":"assets/joplin.svg","images":["linode/ubuntu22.04"],"deployments_total":430,"deployments_active":31,"is_public":true,"mine":false,"created":"2022-03-08T18:14:30","updated":"2023-12-28T03:10:04","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Joplin setup\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-joplin\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n \n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # Joplin vars\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n \n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":688912,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kepler Builder One-Click","description":"Kepler Builder One-Click","ordinal":52,"logo_url":"assets/keplerbuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":266,"deployments_active":4,"is_public":true,"mine":false,"created":"2020-11-17T21:17:33","updated":"2023-12-19T08:40:20","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-keplerbuilder\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401701,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LAMP One-Click","description":"LAMP One-Click","ordinal":53,"logo_url":"assets/LAMP.svg","images":["linode/ubuntu22.04"],"deployments_total":13799,"deployments_active":1114,"is_public":true,"mine":false,"created":"2019-03-09T02:07:09","updated":"2023-12-28T17:15:58","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LAMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-lamp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lamp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":606691,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LEMP One-Click","description":"LEMP Stack","ordinal":54,"logo_url":"assets/LEMP.svg","images":["linode/ubuntu22.04"],"deployments_total":4189,"deployments_active":309,"is_public":true,"mine":false,"created":"2019-10-27T15:29:04","updated":"2023-12-26T19:15:18","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LEMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-lemp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lemp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923032,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiteSpeed cPanel One-Click","description":"LiteSpeed cPanel One-Click","ordinal":55,"logo_url":"assets/litespeedcpanel.svg","images":["linode/almalinux8"],"deployments_total":1030,"deployments_active":25,"is_public":true,"mine":false,"created":"2021-10-18T00:57:12","updated":"2023-12-26T03:19:41","rev_note":"","script":"#!/bin/bash\n## Logging\nexec > /var/log/stackscript.log 2>&1\n## Install cPanel\nyum install -y kernel grub2\nsed -i -e \"s/GRUB_TIMEOUT=5/GRUB_TIMEOUT=10/\" /etc/default/grub\nsed -i -e \"s/crashkernel=auto rhgb console=ttyS0,19200n8/console=ttyS0,19200n8/\" /etc/default/grub\nmkdir /boot/grub\ngrub2-mkconfig -o /boot/grub/grub.cfg\nsystemctl stop firewalld.service\nsystemctl disable firewalld.service\nsystemctl stop NetworkManager\nsystemctl disable NetworkManager\nsystemctl enable network\nsystemctl start network\nyum remove NetworkManager -y\ncd /home \ncurl -o latest -L https://securedownloads.cpanel.net/latest && sh latest\nyum remove ea-apache24-mod_ruid2 -y\n## Install LSWS on cPanel\nADMIN_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo '')\ncat <>/home/lsws.options\n## 1 = enable, 0 = disable, 2 = user home directory\nphp_suexec=\"2\"\nport_offset=\"0\"\nadmin_user=\"admin\"\nadmin_pass=\"${ADMIN_PASS}\"\nadmin_email=\"root@localhost\"\neasyapache_integration=\"1\"\nauto_switch_to_lsws=\"1\"\ndeploy_lscwp=\"1\"\nEOT\nbash <( curl https://get.litespeed.sh ) TRIAL","user_defined_fields":[]},{"id":1008123,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiveSwitch One-Click","description":"LiveSwitch One-Click","ordinal":56,"logo_url":"assets/liveswitch.svg","images":["linode/ubuntu20.04"],"deployments_total":197,"deployments_active":1,"is_public":true,"mine":false,"created":"2022-05-18T16:41:37","updated":"2023-12-21T13:44:28","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\nsudo dpkg --configure -a\n\n# kill any background updater jobs\nsudo killall apt apt-get\n\n# helpers\nsudo apt-get install dialog apt-utils -y -q\n\nsudo DEBIAN_FRONTEND=noninteractive apt-get update -y\nsudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef -y\n\n# firewall\n# normal defaults\nsudo ufw default deny incoming\nsudo ufw default allow outgoing\n# ssh on\nsudo ufw allow ssh\n# dynamic inbound traffic\nsudo ufw allow 49152:65535/udp\n# TURN\nsudo ufw allow 3478/udp\n# TURN TCP\nsudo ufw allow 80/tcp\n# TURNS\nsudo ufw allow 443/tcp\n# admin (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 9090/tcp\nsudo ufw allow 9443/tcp\n# gateway (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 8080/tcp\nsudo ufw allow 8443/tcp\n\n# sip\n# sudo ufw allow 5061/udp\n# sudo ufw allow 5061/tcp\n\n# we will turn on the firewall at the end because it disconnects us\n\n# install docker\nsudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\napt-cache policy docker-ce\nsudo apt-get install -y docker-ce\n\n# entropy fix for docker\nsudo apt-get install -y haveged\n\n# install docker compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n\n# retrieve docker compose files\nmkdir -p /opt/liveswitch\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose-liveswitch.service\" -o /opt/liveswitch/docker-compose-liveswitch.service\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose.yml\" -o /opt/liveswitch/docker-compose.yml\n\n# install liveswitch docker compose\nsudo cp /opt/liveswitch/docker-compose-liveswitch.service /etc/systemd/system/\nsudo systemctl enable docker\nsudo systemctl enable docker-compose-liveswitch\nsudo systemctl start docker-compose-liveswitch\n\n# clean up some logs\nsudo rm -f /var/log/cloud-init-output.log\nsudo rm -f /var/log/dpkg.log\nsudo rm -f /var/log/kern.log\nsudo rm -f /var/log/ufw.log\n\n# turn on the firewall\nsudo ufw --force enable\nsudo reboot","user_defined_fields":[]},{"id":869159,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MagicSpam One-Click","description":"MagicSpam One-Click","ordinal":57,"logo_url":"assets/magicspam.svg","images":["linode/centos7"],"deployments_total":6,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-20T19:13:52","updated":"2023-12-11T15:26:23","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\n# source the stackscript for the selected control panel\nif [ \"$CONTROL_PANEL\" == \"cPanel\" ]; then\n # redirect ALL output to the stackscript log for future troubleshooting\n exec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n # cPanel Marketplace App install\n source \n\n # set the hostname to replicate Plesk stackscript for consistent behavior\n IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n echo $HOSTNAME > /etc/hostname\n hostname -F /etc/hostname\n echo $IPADDR $HOSTNAME >> /etc/hosts\nelif [ \"$CONTROL_PANEL\" == \"Plesk\" ]; then\n # Plesk Marketplace App install\n # NOTE: do not redirect output to the stackscript log to avoid duplicate log\n # lines as the Plesk stackscript already redirects to it\n source \nelse\n echo \"Invalid control panel option detected. Aborting...\"\n exit 1\nfi\n\n# install MagicSpam via the installer script\nwget https://www.magicspam.com/download/magicspam-installer.sh -O /root/magicspam-installer\nchmod +x /root/magicspam-installer\n/root/magicspam-installer -l \"$MS_LICENSE_KEY\"","user_defined_fields":[{"name":"control_panel","label":"The Control Panel to deploy alongside with MagicSpam. Make sure to select an Image supported by the selected Control Panel. For more information, please refer to the MagicSpam App Information Sidebar.","oneof":"cPanel,Plesk"},{"name":"ms_license_key","label":"The MagicSpam license key. Please make sure to use the appropriate license key for the selected Control Panel. For more information, please refer to the MagicSpam App information sidebar."},{"name":"hostname","label":"The server's hostname."}]},{"id":1243759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept FFmpeg Plugins Demo One-Click","description":"MainConcept FFmpeg Plugins","ordinal":58,"logo_url":"assets/mainconcept.svg","images":["linode/debian11"],"deployments_total":7,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-09-28T15:02:48","updated":"2023-12-28T02:39:55","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\n\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-ffmpeg-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""}]},{"id":1243760,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept Live Encoder Demo One-Click","description":"MainConcept Live Encoder\r\n\r\n","ordinal":59,"logo_url":"assets/mainconcept.svg","images":["linode/centos-stream9"],"deployments_total":25,"deployments_active":3,"is_public":true,"mine":false,"created":"2023-09-28T15:04:08","updated":"2023-12-24T06:51:30","rev_note":"","script":"#!/bin/bash\n\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-live-encoder-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(dnsdomainname -A | awk '{print $1}')\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n yum install dnf -y\n dnf update -y\n dnf upgrade -y\n dnf install -y git python3 python3-pip\n\n dnf makecache\n dnf install epel-release -y\n dnf makecache\n dnf install ansible -y\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SSL Generation","default":""}]},{"id":1243762,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept P2 AVC ULTRA Transcoder Demo One-Click","description":"MainConcept P2 AVC ULTRA Transcoder","ordinal":60,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:01","updated":"2023-12-07T16:54:44","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept P2 AVC Ultra Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-p2-avc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept P2 AVC Ultra Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243763,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XAVC Transcoder Demo One-Click","description":"MainConcept XAVC Transcoder","ordinal":61,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":2,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:47","updated":"2023-12-06T21:20:30","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XAVC Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xavc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XAVC Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243764,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XDCAM Transcoder Demo One-Click","description":"MainConcept XDCAM Transcoder","ordinal":62,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:06:28","updated":"2023-12-06T21:21:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XDCAM Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xdcam-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n \n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XDCAM Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1096122,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mastodon One-Click","description":"Mastodon is an open-source and decentralized micro-blogging platform, supporting federation and public access to the server.","ordinal":63,"logo_url":"assets/mastodon.svg","images":["linode/ubuntu22.04"],"deployments_total":1713,"deployments_active":62,"is_public":true,"mine":false,"created":"2022-12-05T15:57:04","updated":"2023-12-24T22:08:28","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Mastodon Settings\n#\n#\n#\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-mastodon\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n \n # write udf vars\n cat < ${group_vars}\nwebserver_stack: lemp\ndomain: ${DOMAIN}\nsubdomain: ${SUBDOMAIN}\nsoa_email_address: ${SOA_EMAIL_ADDRESS}\nowner_username: ${OWNER_USERNAME}\nowner_email: ${OWNER_EMAIL}\nsingle_user_mode: ${SINGLE_USER_MODE}\ntoken_password: ${TOKEN_PASSWORD}\nEND\n \n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"domain","label":"Domain name for your Mastodon instance.","example":"domain.tld"},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":"www"},{"name":"token_password","label":"Your Linode API token"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"owner_username","label":"Username for Mastodon Owner","example":""},{"name":"owner_email","label":"Email address for Mastodon Owner","example":"user@domain.tld"},{"name":"single_user_mode","label":"Do you want to start Mastodon in single-user mode?","oneof":"Yes,No"}]},{"id":611895,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MEAN One-Click","description":"MEAN One-Click","ordinal":64,"logo_url":"assets/mean.svg","images":["linode/ubuntu20.04"],"deployments_total":727,"deployments_active":36,"is_public":true,"mine":false,"created":"2019-11-14T04:49:44","updated":"2023-12-22T15:08:39","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MEAN Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction dependmean {\n apt-get install -y build-essential git fontconfig libpng-dev ruby ruby-dev wget gnupg\n gem install sass\n}\n\nfunction mongoinstall {\n cd && wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n echo \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\n\nfunction meaninstall {\n apt-get install -y curl software-properties-common\n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n apt-get install -y nodejs\n\n # MEAN APP CONFIGURATION\n cd && mkdir -p /opt/mean\n cd /opt/mean\n cat <> package.json\n{\n\"name\" : \"mean\",\n\"version\": \"0.0.1\"\n}\nEND\n npm install express --save\n npm install angular\n cat <> server.js\nvar express = require('express');\nvar app = express();\nvar port = 3000;\napp.get('/', function(req, res) {\nres.send('Hello World Powered By: Linode Marketplace');\n});\napp.listen(port, function(){\nconsole.log(\"Listening at port: \" + port);\n})\nEND\n # Start App on reboot\n cd && npm install pm2 -g\n pm2 start --name=\"MEAN_APP\" /opt/mean/server.js\n pm2 startup \n pm2 save\n}\n\nfunction nginxmean {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslmean {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallmean {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n dependmean\n firewallmean\n mongoinstall\n meaninstall\n nginxmean\n sslmean\n\n}\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401702,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MERN One-Click","description":"MERN One-Click","ordinal":65,"logo_url":"assets/MERN.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":1435,"deployments_active":57,"is_public":true,"mine":false,"created":"2019-03-08T21:07:40","updated":"2023-12-18T04:45:33","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3000\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install dependencies\napt-get install -y build-essential git \n\n# Install Mongodb\napt-get install -y wget gnupg\nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Install NodeJS and NPM\napt-get install -y curl software-properties-common\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \ncurl -fsSL https://deb.nodesource.com/setup_16.x | bash -\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\ncurl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get install -y nodejs\n\n# Install ExpressJS\nnpm update -g\nnpm install --global express\nnpm link express\nnpm -g install create-react-app\ncd /opt\ncreate-react-app hello-world\nnpm i --package-lock-only\nnpm audit fix\n\n# Start App on reboot\ncat < /lib/systemd/system/hello-world.service\n[Unit]\nDescription=Hello World React Application Service\nRequires=hello-world.service\nAfter=hello-world.service\n\n[Service]\nType=simple\nUser=root\nRemainAfterExit=yes\nRestart=on-failure\nWorkingDirectory=/opt/hello-world\nExecStart=npm start --host 0.0.0.0 --port=3000\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nsystemctl daemon-reload\nsystemctl start hello-world\nsystemctl enable hello-world\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1051714,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Microweber One-Click","description":"Microweber One-Click","ordinal":66,"logo_url":"assets/microweber.svg","images":["linode/ubuntu20.04"],"deployments_total":483,"deployments_active":19,"is_public":true,"mine":false,"created":"2022-09-01T15:43:41","updated":"2023-12-24T00:19:54","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/microweber/microweber\nset -o pipefail\nMICROWEBER_INSTALLER_TAG=\"1.3.1\"\nWORKING_DIR=\"/var/www/html\"\nDOWNLOAD_URL='http://updater.microweberapi.com/builds/master/microweber.zip'\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php8.1\napt install -y mysql-server\napt install -y php8.1-{bcmath,xml,fpm,mysql,iconv,xsl,zip,intl,ldap,gd,cli,dev,bz2,curl,exif,mbstring,pgsql,sqlite3,tokenizer,opcache,soap,cgi,common,imap,opcache}\napt install -y python3-certbot-apache software-properties-common unzip curl\napt install -y php-pear\npecl install -f libsodium\nsed -i 's/;opcache.enable\\s*=.*/opcache.enable=1/g' /etc/php/8.1/cli/php.ini\necho 'extension=sodium.so' > /etc/php/8.1/cli/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/fpm/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/cgi/10-sodium.ini\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Microweber at http://\\$myip/\n * Secure your database by running:\n > mysql_secure_installation\nFor help and more information visit https://microweber.org\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\ncat >/etc/cron.d/microweber </etc/php/8.1/apache2/conf.d/30-microweber.ini <>/var/log/per-instance.log\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\nMICROWEBER_DB_HOST=localhost\nMICROWEBER_DB_PORT=3306\nMICROWEBER_DB_NAME=microweber\nMICROWEBER_DB_USER=microweber\nMICROWEBER_DB_PASS=$(openssl rand -hex 16)\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\necho \"[OK] Microweber Installer $MICROWEBER_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":691614,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mist.io One-Click","description":"Mist.io One-Click","ordinal":67,"logo_url":"assets/mistio.svg","images":["linode/debian10"],"deployments_total":335,"deployments_active":1,"is_public":true,"mine":false,"created":"2020-11-30T20:25:44","updated":"2023-12-27T18:29:12","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\n# \n\n# \n\n## install docker\nsudo apt-get install -y \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n gnupg-agent \\\n software-properties-common\n\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -\n\nsudo add-apt-repository \\\n \"deb [arch=amd64] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) \\\n stable\"\n\nsudo apt-get update\n\nsudo apt-get install -y docker-ce docker-ce-cli containerd.io\n\n## install docker-compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n\nsudo chmod +x /usr/local/bin/docker-compose\n\n## get latest mist\nmkdir ~/mist && cd ~/mist\n\nexport MIST_CE_REPO=https://github.com/mistio/mist-ce/releases/latest\nexport LATEST_TAG=\"$(curl -sI \"${MIST_CE_REPO}\" | grep -Po 'tag\\/\\K(v\\S+)')\"\n\nwget https://github.com/mistio/mist-ce/releases/download/$LATEST_TAG/docker-compose.yml\n\n# set CORE_URI\nmkdir settings\nexport IP=$(ip r | grep /24 | grep -Eo \"([0-9]{1,3}[\\.]){3}[1-9]{1,3}\")\necho 'CORE_URI=\"http://'$IP'\"' > settings/settings.py\n\ndocker-compose up -d\n\nwhile !(curl -sSLf http://localhost >/dev/null); do\n sleep 5\ndone\n\ndocker-compose exec -T api ./bin/adduser --admin \"${MIST_EMAIL}\" --password \"${MIST_PASSWORD}\"","user_defined_fields":[{"name":"mist_email","label":"Mist admin user's email.","example":"Set your admin user's email."},{"name":"mist_password","label":"Mist admin user's password.","example":"Set your admin user's password."}]},{"id":609195,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB One-Click","description":"MongoDB One-Click","ordinal":68,"logo_url":"assets/mongodb.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":1757,"deployments_active":74,"is_public":true,"mine":false,"created":"2019-11-06T07:14:07","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\n## Mongo Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction mongoinstall {\n apt-get install -y wget gnupg\n if [ $MONGOVERSION == \"5.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ $MONGOVERSION == \"4.4\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\n elif [ $MONGOVERSION == \"4.2\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list\n elif [ $MONGOVERSION == \"4.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list\n fi\n\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\nfunction createmongouser {\n echo \"Creating Mongo User\" & sleep 3\n mongo < /etc/mongod.conf\n# mongod.conf\n# for documentation of all options, see:\n# http://docs.mongodb.org/manual/reference/configuration-options/\n# Where and how to store data.\nstorage:\n dbPath: /var/lib/mongodb\n journal:\n enabled: true\n# engine:\n# wiredTiger:\n# where to write logging data.\nsystemLog:\n destination: file\n logAppend: true\n path: /var/log/mongodb/mongod.log\n# network interfaces\nnet:\n port: 27017\n bindIp: 127.0.0.1\n# how the process runs\nprocessManagement:\n timeZoneInfo: /usr/share/zoneinfo\nsecurity:\n authorization: enabled\n#operationProfiling:\n#replication:\n#sharding:\n## Enterprise-Only Options:\n#auditLog:\n#snmp:\nEOF\n service mongod restart\n}\n\nfunction main {\n mongoinstall\n createmongouser \n setauth\n}\n\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"db_password","label":"Mongo Password"},{"name":"mongoversion","label":"Mongo Version","oneof":"5.0,4.4,4.2,4.0","default":"5.0"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for soa record","default":""}]},{"id":1067004,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster One-Click","description":"MongoDB replica set","ordinal":69,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":49,"deployments_active":0,"is_public":true,"mine":false,"created":"2022-09-29T18:32:36","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_PAT=\"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\"\nexport GIT_REPO=\"https://linode-solutions:${GIT_PAT}@github.com/linode-solutions/mongodb-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/mongodb-cluster\" ]; then\n rm -rf /tmp/mongodb-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction destroy_linode {\n curl -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X DELETE \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # Rename Provisioner & add Private IP \n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/mongodb-cluster\n cd /tmp/mongodb-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"cluster_name","label":"Domain Name"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Mongo CA"},{"name":"common_name","label":"Common Name","default":"Mongo Server"},{"name":"cluster_size","label":"MongoDB cluster size","default":"3","oneof":"3"}]},{"id":869127,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Moodle One-Click","description":"Moodle One-Click","ordinal":70,"logo_url":"assets/moodle.svg","images":["linode/ubuntu20.04"],"deployments_total":1326,"deployments_active":94,"is_public":true,"mine":false,"created":"2021-07-20T18:48:49","updated":"2023-12-28T18:27:00","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n## Moodle settings\n#\n#\n#\n#\n\n## Domain settings\n#\n#\n#\n\n## Linode/SSH Security Settings \n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\n# Install dependencies \napt install -y apache2 mysql-client mysql-server php libapache2-mod-php git graphviz aspell ghostscript clamav php7.4-pspell php7.4-curl php7.4-gd php7.4-intl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-ldap php7.4-zip php7.4-soap php7.4-mbstring\n\n# Firewall\nufw allow http \nufw allow https\n\n# Secure MySQL\nrun_mysql_secure_installation_ubuntu20\n\n# Install Moodle\ncd /var/www/html\ngit clone git://git.moodle.org/moodle.git\ncd moodle\ngit branch --track MOODLE_39_STABLE origin/MOODLE_39_STABLE\ngit checkout MOODLE_39_STABLE\n\n# Configure Moodle\nmkdir /var/moodledata\nchmod -R 777 /var/moodledata \nchmod -R 755 /var/www/html/moodle \n\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE USER 'moodle'@'localhost' IDENTIFIED BY '$DB_PASSWORD';\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodle'@'localhost';\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\ncat < /etc/apache2/sites-available/moodle.conf\n\n ServerAdmin admin@$FQDN\n DocumentRoot /var/www/html/moodle/\n ServerName $FQDN\n ServerAlias www.$FQDN \n \n Options +FollowSymlinks\n AllowOverride All\n Require all granted\n \n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEND\n\na2enmod rewrite\na2ensite moodle.conf\na2dissite 000-default.conf\nservice apache2 restart\n\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n/usr/bin/php admin/cli/install.php --chmod=777 --lang=en_us --wwwroot=https://$FQDN --dataroot=/var/moodledata/ --dbtype=mysqli --dbhost=localhost --dbname=moodle --dbuser=moodle --dbpass=$DB_PASSWORD --dbport=3306 --dbsocket=1 --prefix=mdl_ --fullname=moodle --shortname=moodle --summary=\"Moodle: Powered By Linode Marketplace\" --adminuser=moodle --adminpass=\"$ADMIN_PASSWORD\" --adminemail=$SOA_EMAIL_ADDRESS --upgradekey= --non-interactive --agree-license\n\nchown -R www-data: /var/www/html/moodle\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"admin_password","label":"Moodle Admin Password"},{"name":"soa_email_address","label":"Moodle Admin Email"},{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"db_password","label":"Moodle database User password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":607026,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MySQL/MariaDB One-Click","description":"MySql One Click","ordinal":71,"logo_url":"assets/mysql.svg","images":["linode/ubuntu20.04"],"deployments_total":4651,"deployments_active":343,"is_public":true,"mine":false,"created":"2019-10-29T19:03:33","updated":"2023-12-28T08:16:21","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MySQL Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3306\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\nif [[ \"$DATABASE\" == \"MySQL\" ]]; then\n # Install/configure MySQL\n apt install -y mysql-server\n # Secure MySQL install\n run_mysql_secure_installation_ubuntu20 \nelse \n # Install/configure MySQL\n apt install -y mariadb-server\n # Secure MySQL install\n run_mysql_secure_installation\nfi\n\nmysql -uroot -p$DBROOT_PASSWORD -e \"create database $DATABASE_NAME;\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER '$DBUSER' IDENTIFIED BY '$DBUSER_PASSWORD';\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON $DATABASE_NAME.* TO '$DBUSER'@'%' WITH GRANT OPTION;\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"database","label":"Would you like to install MySQL or MariaDB?","oneof":"MySQL,MariaDB"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser","label":"MySQL User","example":"user1"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"database_name","label":"Create Database","example":"testdb"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970561,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NodeJS One-Click","description":"NodeJS One-Click","ordinal":72,"logo_url":"assets/nodejs.svg","images":["linode/ubuntu20.04"],"deployments_total":2193,"deployments_active":263,"is_public":true,"mine":false,"created":"2022-02-07T17:21:41","updated":"2023-12-28T11:35:54","rev_note":"","script":"#!/usr/bin/env bash\n\n## NodeJS Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction nodejs {\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get install -y nodejs\n \n mkdir -p /opt/nodejs\n cat < /opt/nodejs/hello.js\nconst http = require('http');\n\nconst hostname = 'localhost';\nconst port = 3000;\n\nconst server = http.createServer((req, res) => {\n res.statusCode = 200;\n res.setHeader('Content-Type', 'text/plain');\n res.end('Hello World Powered By Linode Marketplace');\n});\n\nserver.listen(port, hostname, () => {\n console.log(`Server running at http://localhost:3000/`);\n});\nEND\n}\n\nfunction pm2nodejs {\n npm install pm2@latest -g --no-audit\n cd /opt/nodejs/\n pm2 start hello.js\n sleep 5\n pm2 startup systemd\n sleep 5\n pm2 save\n}\n\nfunction nginxnodejs {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslnodejs {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallnodejs {\n ufw allow http\n ufw allow https\n\n}\nfunction main {\n nodejs\n pm2nodejs\n firewallnodejs \n nginxnodejs \n sslnodejs \n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":869156,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NirvaShare One-Click","description":"NirvaShare One-Click","ordinal":73,"logo_url":"assets/nirvashare.svg","images":["linode/ubuntu22.04"],"deployments_total":217,"deployments_active":3,"is_public":true,"mine":false,"created":"2021-07-20T19:08:35","updated":"2023-12-24T01:23:57","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Nirvashare Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-nirvashare\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # Nirvashare \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":971043,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Odoo One-Click","description":"Odoo One-Click","ordinal":74,"logo_url":"assets/odoo.svg","images":["linode/ubuntu22.04"],"deployments_total":1890,"deployments_active":95,"is_public":true,"mine":false,"created":"2022-02-08T16:21:37","updated":"2023-12-28T09:33:25","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## ODOO Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-odoo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # ODOO vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1102907,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ONLYOFFICE Docs One-Click","description":"ONLYOFFICE Docs One-Click app","ordinal":75,"logo_url":"assets/onlyoffice.svg","images":["linode/ubuntu22.04"],"deployments_total":294,"deployments_active":14,"is_public":true,"mine":false,"created":"2022-12-20T17:50:23","updated":"2023-12-27T15:34:29","rev_note":"","script":"#!/usr/bin/env bash\n# \n# \n# \n\n# SSL Settings\n# \n# \n# \n# \n\n# Enable Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n\n# Get and install docker\n# curl -fsSL get.docker.com | sudo sh\napt install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \napt update\napt install -y docker-ce\nsystemctl enable --now docker.service\n\nCONTAINER_NAME=\"onlyoffice-docs\"\n\n# Run ONLYOFFICE-Docs with SSL\nif [[ \"${SSL_ENABLED}\" == \"true\" ]]; then\n\tif [[ -z ${ABS_DOMAIN} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_DOMAIN parameter for correct SSL work\"\n\t\texit 1\n\tfi\n\tif [[ -z ${LETS_ENCRYPT_MAIL} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_MAIL parameter for correct SSL work\"\n\t\texit 1\n fi\n\tsudo docker run -i -t -d -p 80:80 -p 443:443 \\\n\t\t-e JWT_ENABLED=${JWT_ENABLED} \\\n \t\t-e JWT_SECRET=${JWT_SECRET} \\\n\t\t-e LETS_ENCRYPT_DOMAIN=${ABS_DOMAIN} \\\n -e LETS_ENCRYPT_MAIL=${LETS_ENCRYPT_MAIL} \\\n\t\t-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n\t\t-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n \t-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n \t-v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n \t-v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n \t-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n\t\t--name ${CONTAINER_NAME} \\\n\t\tonlyoffice/documentserver:${DOCS_VERSION}\n\telse \n# Run ONLYOFFICE-Docs without SSL\n\tsudo docker run -i -t -d -p 80:80 \\\n -e JWT_ENABLED=${JWT_ENABLED} \\\n -e JWT_SECRET=${JWT_SECRET} \\\n -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n -v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n --name ${CONTAINER_NAME} \\\n onlyoffice/documentserver:${DOCS_VERSION}\nfi\n\n# Wait for run\nready_check() {\n echo -e \"\\e[0;32m Waiting for the launch of DocumentServer... \\e[0m\" \n for i in {1..30}; do\n echo \"Getting the DocumentServer status: ${i}\"\n OUTPUT=\"$(curl -Is http://localhost/healthcheck/ | head -1 | awk '{ print $2 }')\"\n if [ \"${OUTPUT}\" == \"200\" ]; then\n echo -e \"\\e[0;32m DocumentServer is ready \\e[0m\"\n local DS_READY\n DS_READY='yes'\n break\n else\n sleep 10\n fi\n done\n if [[ \"${DS_READY}\" != 'yes' ]]; then\n err \"\\e[0;31m Something goes wrong documentserver does not started, check logs with command --> docker logs -f ${CONTAINER_NAME} \\e[0m\"\n exit 1\n fi\n}\n\nready_check\n\n# Enable Docs-example\nsudo docker exec ${CONTAINER_NAME} supervisorctl start ds:example\n\n# Add Docs-example to autostart\nsudo docker exec ${CONTAINER_NAME} sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf\n\n# Add MOTD \ncat >/etc/motd < >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Django\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/djangosetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Reboot server\nreboot","user_defined_fields":[]},{"id":923031,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed NodeJS One-Click","description":"OpenLiteSpeed NodeJS One-Click","ordinal":77,"logo_url":"assets/openlitespeednodejs.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":510,"deployments_active":20,"is_public":true,"mine":false,"created":"2021-10-18T00:52:51","updated":"2023-12-27T19:53:52","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and NodeJS\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/nodejssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":923030,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed Rails One-Click","description":"OpenLiteSpeed Rails One-Click","ordinal":78,"logo_url":"assets/openlitespeedrails.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":52,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T00:51:05","updated":"2023-12-23T19:20:19","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Rails\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/railssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":691622,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed WordPress One-Click","description":"OpenLiteSpeed WordPress One-Click","ordinal":79,"logo_url":"assets/openlitespeedwordpress.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":8078,"deployments_active":648,"is_public":true,"mine":false,"created":"2020-11-30T21:25:01","updated":"2023-12-28T18:18:55","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### linode\n### Install OpenLiteSpeed and WordPress\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/wpimgsetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401719,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenVPN One-Click","description":"OpenVPN OCA Debian 11 & ubuntu 20","ordinal":80,"logo_url":"assets/OpenVPN.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":40613,"deployments_active":1649,"is_public":true,"mine":false,"created":"2019-03-09T03:02:02","updated":"2023-12-28T19:02:34","rev_note":"Install extra dependencies ","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Install OpenVPN dependencies\napt update && apt -y install ca-certificates wget net-tools gnupg\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian bullseye main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian focal main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelse \necho \"Distro Not Supported\"\nfi\n\n## Apt Update & Install OpenVPN\napt update -y && apt -y install openvpn-as\n\n# UFW install\nufw_install\nufw allow 1194/udp\nsed -ie \"s/DEFAULT_FORWARD_POLICY=\\\"DROP\\\"/DEFAULT_FORWARD_POLICY=\\\"ACCEPT\\\"/g\" /etc/default/ufw\n\n# Cleanup\nstackscript_cleanup\n\n# Adding to display default password as last line in LISH console\nsleep 3\ncat /usr/local/openvpn_as/init.log | grep 'To login'; echo \"(password can be changed on Admin UI)\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""}]},{"id":804172,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Owncast One-Click","description":"Owncast One-Click","ordinal":81,"logo_url":"assets/owncast.svg","images":["linode/debian10"],"deployments_total":1823,"deployments_active":83,"is_public":true,"mine":false,"created":"2021-04-01T15:24:50","updated":"2023-12-27T07:40:31","rev_note":"","script":"#!/usr/bin/bash\n#\n#\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Add owncast user\nadduser owncast --disabled-password --gecos \"\"\n\n# Install dependencies\napt-get install -y libssl-dev unzip curl\n\n# Install Owncast\nmkdir -p /opt/owncast\ncd /opt/owncast || exit\n\ncurl -s https://owncast.online/install.sh | bash\nchown -R owncast:owncast /opt/owncast\n\n# Setup Owncast as a systemd service\ncat >/etc/systemd/system/owncast.service </etc/caddy/Caddyfile </etc/motd <\n#\n#\n## LAMP Stack Settings\n#\n#\n#\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\n## Update\napt_setup_update\n\n## Local Functions used by this StackScript\nfunction owncloud_install {\n system_install_package unzip php-gd php-json php-curl php-mbstring \\\n php-intl php-imagick php-xml php-zip\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cd /var/www\n wget https://download.owncloud.com/server/stable/owncloud-complete-latest.zip\n unzip owncloud-complete-latest.zip\n chown -R www-data:www-data owncloud\n rm owncloud-complete-latest.zip\n local -a input_text=(\n \"Alias / \\\"/var/www/owncloud/\\\"\"\n \"\"\n \" Options +FollowSymlinks\"\n \" AllowOverride All\"\n \"\"\n \" Dav off\"\n \"\"\n \"SetEnv HOME /var/www/owncloud\"\n \"SetEnv HTTP_HOME /var/www/owncloud\"\n \"\"\n )\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n a2ensite owncloud\n a2enmod rewrite headers env dir mime\n sed -i '/^memory_limit =/s/=.*/= 512M/' /etc/php/$PHP_VERSION/apache2/php.ini\n systemctl restart apache2\n echo \"ownCloud is installed\"\n}\n\nfunction owncloud_vhost_configure {\n local -r fqdn=\"$1\"\n local -r soa_email_address=\"$2\"\n local -a input_text=(\n \"\"\n \" ServerName ${fqdn}\"\n \" ServerAdmin ${soa_email_address}\"\n \" DocumentRoot /var/www/owncloud\"\n \" \"\n \" Require all granted\"\n \" AllowOverride All\"\n \" Options FollowSymLinks MultiViews\"\n \" SetEnv HOME /var/www/owncloud\"\n \" SetEnv HTTP_HOME /var/www/owncloud\"\n \" \"\n \"\"\n )\n echo \"\" >> /etc/apache2/sites-available/owncloud.conf\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n}\n\n## Main Script\n# Install and configure the LAMP Stack\nlamp_stack \"$DB_NAME\" \"$DB_ROOT_PASSWORD\" \"${DB_USERNAME:-owncloud}\" \"$DB_USER_PASSWORD\"\n\n# Install ownCloud to be accessed via domain and configure the VirtualHost\nowncloud_install \"$FQDN\"\nowncloud_vhost_configure \"$FQDN\" \"$SOA_EMAIL_ADDRESS\"\n\n# Configure ownCloud - This replaces the installer GUI that was in the previous version of this OCA\nsudo -u www-data php /var/www/owncloud/occ maintenance:install \\\n --database \"mysql\" \\\n --database-name \"$DB_NAME\" \\\n --database-user \"${DB_USERNAME:-owncloud}\" \\\n --database-pass \"$DB_USER_PASSWORD\" \\\n --admin-user \"$OC_ADMIN\" \\\n --admin-pass \"$OC_ADMIN_PASSWORD\"\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 1 --value=$FQDN\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 2 --value=$IP\necho \"Trusted Domain setting added\"\n\n# Open the needed firewall ports\nufw allow http\nufw allow https\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"oc_admin","label":"The name of the admin user for ownCloud"},{"name":"oc_admin_password","label":"The password for ownCloud's admin user"},{"name":"soa_email_address","label":"Admin Email for the ownCloud server"},{"name":"db_name","label":"The name of the database","default":"owncloud"},{"name":"db_root_password","label":"The root password for the database"},{"name":"db_username","label":"The name of the database user to create","default":"owncloud"},{"name":"db_user_password","label":"The password for the created database user"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""}]},{"id":1102906,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Passky One-Click","description":"Passky One-Click app","ordinal":83,"logo_url":"assets/passky.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":186,"deployments_active":9,"is_public":true,"mine":false,"created":"2022-12-20T17:48:51","updated":"2023-12-16T14:40:12","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nInstalling...\nPlease logout and come back in few minutes.\nEOF\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\nDEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n\n# Install docker compose\nsystem_install_package docker-compose\n\n#\n# Passky Server\n#\nwget https://github.com/Rabbit-Company/Passky-Server/releases/latest/download/passky-server.tar.xz\ntar -xf passky-server.tar.xz\ncd passky-server\ncp .env.example .env\n\nSERVER_CORES=$(grep -c ^processor /proc/cpuinfo)\nIP_ADDRESS=$(system_primary_ip)\n\nsed -i \"s/SERVER_CORES=1/SERVER_CORES=$SERVER_CORES/g\" .env\nsed -i \"s/ADMIN_USERNAME=admin/ADMIN_USERNAME=$ADMINUSER/g\" .env\nsed -i \"s/ADMIN_PASSWORD=/ADMIN_PASSWORD=$ADMIN_PASSWORD/g\" .env\n\ndocker-compose up -d\n\napache_install\na2enmod proxy && a2enmod proxy_http && systemctl restart apache2\necho \"\" > /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPreserveHost On\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyRequests Off\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ServerName $WEBSITE\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPass / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPassReverse / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \"\" >> /etc/apache2/sites-available/$WEBSITE.conf\na2ensite \"$WEBSITE\"\nsystemctl restart apache2\n\n# Install SSL\nsystem_install_package python3-certbot-apache\ncat << EOF > /usr/local/bin/installCert\n#!/bin/bash\nif ! certbot -n --apache --agree-tos --redirect -d $WEBSITE -m $EMAIL; then\n echo \"There was a problem while installing SSL certificate. Make sure your A record for domain: $WEBSITE does redirect to IP: $IP_ADDRESS\"\nelse\n echo \"Certificate installed successfully.\"\nfi\nEOF\nchmod +x /usr/local/bin/installCert\n\n# Configure auto-renewal for the certificate\ncrontab -l > cron\necho \"0 4 * * * /usr/bin/certbot renew\" >> cron\ncrontab cron\nrm cron\n\nstackscript_cleanup\n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nAdmin Panel:\n Link: http://$IP_ADDRESS (https://$WEBSITE)\n Username: $ADMINUSER\n Password: $ADMIN_PASSWORD\nTo install SSL certificate please run command: installCert\nEOF","user_defined_fields":[{"name":"website","label":"Website","example":"passky.domain.com"},{"name":"email","label":"Email Address","example":"info@rabbit-company.com"},{"name":"adminuser","label":"Admin Username"},{"name":"admin_password","label":"Admin Password"}]},{"id":804143,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Peppermint One-Click","description":"Peppermint One-Click","ordinal":84,"logo_url":"assets/peppermint.svg","images":["linode/ubuntu22.04"],"deployments_total":1931,"deployments_active":114,"is_public":true,"mine":false,"created":"2021-04-01T12:45:15","updated":"2023-12-28T17:48:10","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Peppermint setup\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-peppermint\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":644908,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Percona (PMM) One-Click","description":"Percona One-Click","ordinal":85,"logo_url":"assets/percona.svg","images":["linode/debian10"],"deployments_total":195,"deployments_active":7,"is_public":true,"mine":false,"created":"2020-04-30T14:49:38","updated":"2023-12-08T04:59:34","rev_note":"","script":"#!/bin/bash\n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Docker\napt -y install docker.io\nsystemctl enable docker.service\n\n#PMM \ndocker pull percona/pmm-server:2\ndocker create -v /srv --name pmm2-data percona/pmm-server:2 /bin/true\ndocker run -d -p 80:80 -p 443:443 \\\n --volumes-from pmm2-data \\\n --name pmm2-server \\\n --restart always percona/pmm-server:2\n\necho \"Waiting for PMM to initialize to set password...\"\n\nuntil [ \"`docker inspect -f {{.State.Health.Status}} pmm2-server`\" = \"healthy\" ]; do sleep 1; done\n\ndocker exec -t pmm2-server bash -c \"ln -s /srv/grafana /usr/share/grafana/data; grafana-cli --homepath /usr/share/grafana admin reset-admin-password $PMMPASSWORD\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"pmmpassword","label":"Admin Password","example":"Admin User Password for PMM Server"}]},{"id":609018,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"phpMyAdmin One-Click","description":"phpMyAdmin One-Click","ordinal":86,"logo_url":"assets/phpmyadmin.svg","images":["linode/debian11"],"deployments_total":2202,"deployments_active":113,"is_public":true,"mine":false,"created":"2019-11-05T00:28:33","updated":"2023-12-28T14:44:49","rev_note":"Initial import","script":"#!/bin/bash\n#\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname\nset_hostname\n\n# Update system\napt_setup_update\n\n# Install/configure MySQL, Add Admin User\napt-get install -y mariadb-server\nsystemctl enable mariadb --now\nrun_mysql_secure_installation\nmysql -u root -e \"CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD'\"\nmysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost' WITH GRANT OPTION\"\nmysql -u root -e \"FLUSH PRIVILEGES\"\n\n# Install PHP\necho 'phpmyadmin phpmyadmin/dbconfig-install boolean true' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/mysql/admin-pass password $DBROOT_PASSWORD' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | debconf-set-selections\napt-get install -y phpmyadmin libapache2-mod-php7.4\n\n# Configure ufw\nufw_install\nufw allow http\nufw reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"db_user","label":"phpMyAdmin/MySQL Admin User","example":"admin"},{"name":"dbuser_password","label":"phpMyAdmin/MySQL Admin Password"},{"name":"dbroot_password","label":"MySQL root Password"}]},{"id":970522,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pi-hole One-Click","description":"Pi-hole One-Click","ordinal":87,"logo_url":"assets/pihole.svg","images":["linode/ubuntu20.04"],"deployments_total":3993,"deployments_active":271,"is_public":true,"mine":false,"created":"2022-02-07T16:04:53","updated":"2023-12-28T19:16:14","rev_note":"","script":"#!/usr/bin/env bash\n\n## PIHOLE Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nIPV4=$(ip a | awk '/inet / {print $2}'| sed -n '2 p')\nIPV6=$(ip -6 a | grep inet6 | awk '/global/{print $2}' | cut -d/ -f1)\nGENPIHOLEPASSWD=$(echo -n $PIHOLE_PASSWORD | sha256sum | awk '{printf \"%s\",$1 }' | sha256sum)\nPIHOLE_PASSWD=${GENPIHOLEPASSWD:0:-1}\n\nfunction firewall {\n ufw allow 80\n ufw allow 53\n ufw allow 67\n ufw allow 547\n ufw allow 4711\n}\n\nfunction config_pihole {\n mkdir -p /etc/pihole\n cat < /etc/pihole/setupVars.conf\nPIHOLE_INTERFACE=eth0\nIPV4_ADDRESS=$IPV4\nIPV6_ADDRESS=$IPV6\nPIHOLE_DNS_1=8.8.8.8\nPIHOLE_DNS_2=8.8.4.4\nQUERY_LOGGING=true\nINSTALL_WEB_SERVER=true\nINSTALL_WEB_INTERFACE=true\nLIGHTTPD_ENABLED=true\nCACHE_SIZE=10000\nDNS_FQDN_REQUIRED=true\nDNS_BOGUS_PRIV=true\nDNSMASQ_LISTENING=local\nWEBPASSWORD=$PIHOLE_PASSWD\nBLOCKING_ENABLED=true\nEND\n\ncurl -L https://install.pi-hole.net | bash /dev/stdin --unattended\n}\n\nfunction main {\n config_pihole\n firewall\n}\n\n# Execute script\napt_setup_update\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"pihole_password","label":"PIHOLE USER Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"This is the Email address for the SOA record","default":""}]},{"id":662119,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plex One-Click","description":"Plex One-Click","ordinal":88,"logo_url":"assets/plex.svg","images":["linode/debian10"],"deployments_total":2976,"deployments_active":53,"is_public":true,"mine":false,"created":"2020-08-12T15:54:44","updated":"2023-12-28T07:05:43","rev_note":"","script":"#!/bin/bash\n# INPUT VARIABLES:\n# \n# \n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Limited user setup if username is not \"root\"\nif [ \"$USERNAME\" != \"root\" ]; then\n \n# ensure sudo is installed and configure secure user\n apt -y install sudo\n adduser -uid 1000 $USERNAME --disabled-password --gecos \"\"\n echo \"$USERNAME:$PASSWORD\" | chpasswd\n usermod -aG sudo $USERNAME\n \n# Harden SSH Access\n sed -i -e 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config\n \n# set home directory\n HOME=/home/$USERNAME\n \n# configure ssh key for secure user if provided\n if [ \"$SSHKEY\" != \"\" ]; then\n SSHDIR=$HOME/.ssh\n mkdir $SSHDIR && echo \"$SSHKEY\" >> $SSHDIR/authorized_keys\n chmod -R 700 $SSHDIR && chmod 600 $SSHDIR/authorized_keys\n chown -R $USERNAME:$USERNAME $SSHDIR\n fi\n \n# Enable SSH hardening\n systemctl restart sshd\n \n# Create docker group, add limited user, and enable\n groupadd docker\n usermod -aG docker $USERNAME\nfi\n\n# Install and configure UFW for Plex\nufw_install\nufw allow 32400,3005,8324,32469/tcp\nufw allow 1900,32410,32412,32413,32414/udp\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Install plex as limited user\ndocker pull plexinc/pms-docker\ndocker run \\\n -d \\\n --name plex \\\n --restart always \\\n -p 32400:32400/tcp \\\n -p 3005:3005/tcp \\\n -p 8324:8324/tcp \\\n -p 32469:32469/tcp \\\n -p 1900:1900/udp \\\n -p 32410:32410/udp \\\n -p 32412:32412/udp \\\n -p 32413:32413/udp \\\n -p 32414:32414/udp \\\n -e ADVERTISE_IP=\"http://$IP:32400/\" \\\n -h \"Linode Plex Server\" \\\n -v $HOME/plex/config:/config \\\n -v $HOME/plex/media:/media \\\n -v $HOME/plex/transcode:/transcode \\\n plexinc/pms-docker\n\n# Recursively update ownership of Plex directories after delay\nsleep 1\nchown -R $USERNAME:$USERNAME $HOME/plex\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"USERNAME","label":"Limited User Name (not 'root')"},{"name":"PASSWORD","label":"Limited User Password"},{"name":"SSHKEY","label":"Limited User SSH Key","default":"","example":"Usually found in: ./ssh/id_rsa.pub"}]},{"id":611376,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL One-Click","description":"PostgreSQL One-Click","ordinal":89,"logo_url":"assets/postgresql.svg","images":["linode/debian11"],"deployments_total":2917,"deployments_active":229,"is_public":true,"mine":false,"created":"2019-11-13T06:05:28","updated":"2023-12-28T09:42:44","rev_note":"Initial import","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 22\nufw allow 5432\n\n# Install PostgreSQL\napt install -y postgresql postgresql-contrib\nsystemctl enable postgresql\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1068726,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster One-Click","description":"PostgreSQL Cluster","ordinal":90,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":184,"deployments_active":10,"is_public":true,"mine":false,"created":"2022-10-03T20:11:59","updated":"2023-12-20T17:47:28","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n\n# set force apt non-interactive\nexport DEBIAN_FRONTEND=noninteractive\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/postgresql-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/postgresql-cluster\" ]; then\n rm -rf /tmp/postgresql-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[info] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/postgresql-cluster\n cd /tmp/postgresql-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"cluster_name","label":"Domain Name"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"PostgeSQL cluster size","default":"3","oneof":"3"}]},{"id":985364,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus & Grafana One-Click","description":"Prometheus and Grafana","ordinal":91,"logo_url":"assets/prometheusgrafana.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":597,"deployments_active":62,"is_public":true,"mine":false,"created":"2022-03-08T17:03:20","updated":"2023-12-24T08:21:45","rev_note":"","script":"#!/usr/bin/env bash\n## Updated: 01-17-2023\n## Author: n0vabyte, Elvis Segura, esegura@linode.com\n\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\ncreds=\"/root/credentials.txt\"\nprometheus_htpasswd_file=\"/etc/nginx/.prometheus_htpasswd\"\n\nfunction add_firewalls {\n ufw allow http\n ufw allow https\n}\n\nfunction configure_nginx {\n apt-get install nginx apache2-utils -y\n cat << EOF > /etc/nginx/sites-available/$FQDN.conf\nserver {\n listen 80;\n server_name $FQDN;\n location / {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:3000;\n }\n location /prometheus/ {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:9090;\n auth_basic \"Restricted Area\";\n auth_basic_user_file $prometheus_htpasswd_file;\n }\n# allow let's encrypt\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/html/.well-known;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-{available,enabled}/$FQDN.conf\n unlink /etc/nginx/sites-enabled/default\n systemctl reload nginx\n systemctl enable nginx\n}\n\nfunction install_node_exporter {\n groupadd --system prometheus\n useradd -s /sbin/nologin --system -g prometheus prometheus\n curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '\"' -f 4 | wget -qi - \n tar -xvf node_exporter*.tar.gz\n chmod +x node_exporter-*/node_exporter\n chown prometheus:prometheus node_exporter\n mv node_exporter-*/node_exporter /usr/local/bin\n rm -fr node_exporter-*\n cat < /etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start node_exporter\n systemctl enable node_exporter\n}\n\nfunction configure_prometheus {\n latest_version=$(curl -s https://raw.githubusercontent.com/prometheus/prometheus/main/VERSION)\n prom_conf=\"/etc/prometheus/prometheus.yml\"\n file_sd_targets=\"/etc/prometheus/file_sd_targets\"\n prometheus_conf_dir=\"/etc/prometheus\"\n prometheus_data_dir=\"/var/lib/prometheus\"\n mkdir $prometheus_conf_dir $prometheus_conf_dir/file_sd_targets \\\n $prometheus_conf_dir/rules $prometheus_data_dir\n\n wget https://github.com/prometheus/prometheus/releases/download/v$latest_version/prometheus-$latest_version.linux-amd64.tar.gz\n tar xvf prometheus-$latest_version.linux-amd64.tar.gz\n mv prometheus-$latest_version.linux-amd64/* $prometheus_conf_dir\n chown -R prometheus:prometheus $prometheus_conf_dir $prometheus_data_dir\n mv $prometheus_conf_dir/{prometheus,promtool} /usr/local/bin\n ## cleanup\n rm prometheus-$latest_version.linux-amd64.tar.gz\n rmdir prometheus-$latest_version.linux-amd64\n\n ## backup config before updating\n cp $prom_conf{,.bak}\n sed -i -e '/- job_name: \"prometheus\"/ s/^/#/' $prom_conf\n sed -i -e '/- targets:/ s/^/#/' $prom_conf\n sed -i -e '/static_configs/ s/^/#/g' $prom_conf\n ## add our config\n cat << EOF >> $prom_conf\n#########################################\n## Local Prometheus Instance - This Box #\n#########################################\n - job_name: local_prometheus\n scrape_interval: 3s\n file_sd_configs:\n - files:\n - file_sd_targets/local_prometheus.yml\n honor_labels: true\n relabel_configs:\n - regex: (.*)\n replacement: \\${1}:9100\n source_labels:\n - __address__\n target_label: __address__\n - regex: (.+)\n replacement: \\${1}\n source_labels:\n - __instance\n target_label: instance\nEOF\n ## add to file_sd_targets\n cat << EOF >> $file_sd_targets/local_prometheus.yml\n- labels:\n __instance: prometheus\n cluster: local\n targets:\n - 127.0.0.1\nEOF\n cat << EOF > /etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nGroup=prometheus\nType=simple\nExecStart=/usr/local/bin/prometheus \\\n--config.file /etc/prometheus/prometheus.yml \\\n--storage.tsdb.path $prometheus_data_dir/ \\\n--web.console.templates=$prometheus_conf_dir/consoles \\\n--web.console.libraries=$prometheus_conf_dir/console_libraries \\\n--web.listen-address=127.0.0.1:9090 \\\n--web.external-url=https://$FQDN/prometheus \\\n--storage.tsdb.retention=60d\nRestart=always\nExecReload=/usr/bin/kill -HUP \\$MAINPID\nTimeoutStopSec=20s\nOOMScoreAdjust=-900\nSendSIGKILL=no\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start prometheus\n systemctl enable prometheus\n\n ## protect with htpasswd\n prometheus_htpasswd=$(openssl rand -base64 32)\n htpasswd -cb $prometheus_htpasswd_file prometheus $prometheus_htpasswd\n ## log credentials locally\n cat << EOF >> $creds\n#################\n# Prometheus #\n#################\nLocation: https://$FQDN/prometheus\nUsername: prometheus\nPassword: $prometheus_htpasswd\nEOF\n ## sanity check\n function fallback {\n echo \"[FATAL] Creating custom configuration failed. Restoring old configuration\"\n cp $prom_conf{.bak,}\n systemctl restart prometheus\n sleep 2\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[CRITICAL] Encoutered unexpected error while configuring Prometheus. Please reach out to Support.\"\n exit 2\n fi\n }\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[ERROR] Prometheus is not running. Falling back to default config..\"\n fallback\n fi\n\n}\n\nfunction configure_grafana {\n echo \"[info] configuring Grafana - Installing Packages\"\n apt-get install -y apt-transport-https \\\n software-properties-common \\\n wget \\\n gnupg2 \\\n sqlite3\n\n wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\n echo \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\n apt-get -y update\n apt-get -y install grafana\n\n ## reset Grafana admin password\n grafana_password=$(openssl rand -base64 32)\n\n echo \"[info] updating grafana config\"\n sed -i -e 's/;admin_user = admin/admin_user = admin/g' /etc/grafana/grafana.ini\n sed -i \"s|;admin_password = admin|admin_password = $grafana_password|g\" /etc/grafana/grafana.ini\n\n echo \"[info] starting grafana-server\"\n systemctl start grafana-server\n systemctl enable grafana-server\n\n ## log credentials locally\n cat << EOF >> $creds\n##############\n# Grafana #\n##############\nLocation: https://$FQDN/\nUsername: admin\nPassword: $grafana_password\nEOF\n}\n\nfunction ssl_grafana {\n apt install -y certbot python3-certbot-nginx\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n add_firewalls\n configure_nginx\n install_node_exporter\n configure_prometheus\n configure_grafana\n ssl_grafana\n}\n\n## execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This email is for the LetsEncrypt SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":607034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus One-Click","description":"Prometheus One Click App","ordinal":92,"logo_url":"assets/prometheus.svg","images":["linode/debian10"],"deployments_total":359,"deployments_active":13,"is_public":true,"mine":false,"created":"2019-10-29T20:59:30","updated":"2023-12-24T08:38:08","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prometheus\ngroupadd --system prometheus\nuseradd -s /sbin/nologin --system -g prometheus prometheus\nmkdir /var/lib/prometheus\nfor i in rules rules.d files_sd; do mkdir -p /etc/prometheus/${i}; done\napt-get -y install wget\nmkdir -p /tmp/prometheus && cd /tmp/prometheus\ncurl -s https://api.github.com/repos/prometheus/prometheus/releases/latest \\\n | grep browser_download_url \\\n | grep linux-amd64 \\\n | cut -d '\"' -f 4 \\\n | wget -qi -\ntar xvf prometheus*.tar.gz\ncd prometheus*/\nmv prometheus promtool /usr/local/bin/\nmv prometheus.yml /etc/prometheus/prometheus.yml\nmv consoles/ console_libraries/ /etc/prometheus/\ncd ~/\nrm -rf /tmp/prometheus\n\n# Edit Prometheus config\nsudo tee /etc/prometheus/prometheus.yml</etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nType=simple\nUser=prometheus\nGroup=prometheus\nExecReload=/bin/kill -HUP $MAINPID\nExecStart=/usr/local/bin/prometheus \\\n --config.file=/etc/prometheus/prometheus.yml \\\n --storage.tsdb.path=/var/lib/prometheus \\\n --web.console.templates=/etc/prometheus/consoles \\\n --web.console.libraries=/etc/prometheus/console_libraries \\\n --web.listen-address=0.0.0.0:9090 \\\n --web.external-url=\n\nSyslogIdentifier=prometheus\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nfor i in rules rules.d files_sd; do chown -R prometheus:prometheus /etc/prometheus/${i}; done\nfor i in rules rules.d files_sd; do chmod -R 775 /etc/prometheus/${i}; done\nchown -R prometheus:prometheus /var/lib/prometheus/\n\n# Add node_exporter & Enable services\ncurl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest \\\n| grep browser_download_url \\\n| grep linux-amd64 \\\n| cut -d '\"' -f 4 \\\n| wget -qi -\n\ntar -xvf node_exporter*.tar.gz\ncd node_exporter*/\ncp node_exporter /usr/local/bin\nnode_exporter --version\n\ncat </etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n\n[Install]\nWantedBy=default.target\nEND\n\nsystemctl daemon-reload\nsystemctl start prometheus\nsystemctl enable prometheus\nsystemctl start node_exporter\nsystemctl enable node_exporter\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":688890,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"RabbitMQ One-Click","description":"RabbitMQ One-Click","ordinal":93,"logo_url":"assets/rabbitmq.svg","images":["linode/debian10"],"deployments_total":397,"deployments_active":50,"is_public":true,"mine":false,"created":"2020-11-17T20:53:00","updated":"2023-12-23T14:09:40","rev_note":"","script":"#!/bin/bash\n#\n#\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n## Install prerequisites\napt-get install curl gnupg -y\n\n## Get RabbitMQ \n$ curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -\nsudo apt-key adv --keyserver \"hkps://keys.openpgp.org\" --recv-keys \"0x0A9AF2115F4687BD29803A206B73A36E6026DFCA\"\n## Install apt HTTPS transport\napt-get install apt-transport-https\n\n## Add Bintray repositories that provision latest RabbitMQ and Erlang 23.x releases\ntee /etc/apt/sources.list.d/bintray.rabbitmq.list <\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# System Update\nset_hostname\napt_setup_update\n\nfunction install_redis {\n apt install -y redis-server\n systemctl enable redis-server\n}\n\nfunction redis_config {\n sed -ie \"s/supervised no/supervised systemd/g\" /etc/redis/redis.conf\n sed -ie \"s/appendonly no/appendonly yes/g\" /etc/redis/redis.conf\n systemctl restart redis-server\n}\n\nfunction main {\n install_redis\n redis_config\n}\nmain\n\n# cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1132204,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Marketplace App for Redis® Sentinel Cluster One-Click","description":"Redis Sentinel One-Click Cluster","ordinal":95,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":138,"deployments_active":6,"is_public":true,"mine":false,"created":"2023-02-27T20:05:44","updated":"2023-12-17T23:40:36","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/redis-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\n\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\n\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\n\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\n\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Redis CA"},{"name":"common_name","label":"Common Name","default":"Redis Server"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Redis cluster size","default":"3","oneof":"3,5"}]},{"id":923036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Restyaboard One-Click","description":"Restyaboard One-Click","ordinal":96,"logo_url":"assets/restyaboard.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04"],"deployments_total":209,"deployments_active":2,"is_public":true,"mine":false,"created":"2021-10-18T01:07:09","updated":"2023-12-03T04:43:28","rev_note":"","script":"#!/bin/bash\n#\n# Install script for Restyaboard\n#\n# Usage: ./restyaboard.sh\n#\n# Copyright (c) 2014-2021 Restya.\n# Dual License (OSL 3.0 & Commercial License)\n{\n\tmain() {\n\t\tif [[ $EUID -ne 0 ]];\n\t\tthen\n\t\t\techo \"This script must be run as root\"\n\t\t\texit 1\n\t\tfi\n\t\tset -x\n\t\twhoami\n\t\t#\n\t\t# Checking the OS name and OS version\n\t\t#\n\t\tfind_release ()\n\t\t{\n\t\t\t# Checking the Ubuntu OS\n\t\t\tif [ -f /etc/lsb-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`grep DISTRIB_ID /etc/lsb-release`\"\n\t\t\t\tDISTRIB_ID='DISTRIB_ID='\n\t\t\t\tOS_NAME=$OS_REQUIREMENT$DISTRIB_ID\n\t\t\t\tarray=();\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" != \"$DISTRIB_ID\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_NAME ]]; do\n\t\t\t\t\tarray+=( \"${OS_NAME%%\"$DISTRIB_ID\"*}\" );\n\t\t\t\t\tOS_NAME=${OS_NAME#*\"$DISTRIB_ID\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_REQUIREMENT=${array[1]}\n\t\t\t\tfi\n\t\t\t\tOS_VERSION=\"`grep DISTRIB_RELEASE /etc/lsb-release`\"\n\t\t\t\tDISTRIB_RELEASE='DISTRIB_RELEASE='\n\t\t\t\tOS_Ver=$OS_VERSION$DISTRIB_RELEASE\n\t\t\t\tversion=();\n\t\t\t\tif ([ \"$OS_VERSION\" != \"$DISTRIB_RELEASE\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_Ver ]]; do\n\t\t\t\t\tversion+=( \"${OS_Ver%%\"$DISTRIB_RELEASE\"*}\" );\n\t\t\t\t\tOS_Ver=${OS_Ver#*\"$DISTRIB_RELEASE\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_VERSION=${version[1]}\n\t\t\t\tfi\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Redhat, Fedora, and Centos\n\t\t\tif [ -f /etc/redhat-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/redhat-release | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/redhat-release | cut -d ' ' -f 4 | cut -d '.' -f 1`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Debian OS\n\t\t\tif [ -f /etc/issue ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/issue | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/issue | cut -d ' ' -f 3`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the OpenBSD \n\t\t\tif [ -f /etc/motd ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/motd | head -1 | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/motd | head -1 | cut -d ' ' -f 2`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t}\n\t\tfindbin ()\n {\n ret=0\n newpath=`echo $PATH | tr : ' '`\n for i in ${newpath}; do\n\t\t\t\tif [ -x $i/$1 ]; then\n\t\t\t\t\tret=1\n\t\t\t\t\tbreak\n\t\t\t\tfi\n done\n echo $ret\n return \n }\n checkdeps()\n {\n pkginfo=\"dpkg rpm ipkg pkg_info\"\n for i in $pkginfo; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n\t\t\t\t\tpkginfo=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that for listing packages\"\n\t\t\t\t\tbreak\n fi\n done\n\n if [ ${pkginfo} = \"pkg_info\" ]; then\n # BSD needs PKG_PATH set to load anything over the net.\n if [ x${PKG_PATH} = x ]; then\n\t\t\t\t\techo \"Please set the environment variable PKG_PATH and try again.\"\n\t\t\t\t\texit 1\n fi\n fi\n \n \n pkg_name=\"yum apt-get ipkg pkg_add\"\n for i in ${pkg_name}; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n pkg_name=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that to install packages\"\n\t\t\t\t\tbreak\n fi\n done\n \n\n for i in ${genericdeps} ${gtkdeps} ${kdedeps}; do\n case $pkginfo in\n dpkg)\n deps=\"`dpkg -l \"*$i*\" | grep -- \"^ii\" | cut -d ' ' -f 3`\"\n ;;\n rpm)\n deps=\"`rpm -q $i`\"\n ;;\n pkg_info)\n deps=\"`pkg_info | grep \"$i\" | sed -e 's: .*$::'`\"\n ;;\n ipkg)\n deps=\"todo\"\n ;;\n *)\n echo \"ERROR: No package manager found!\"\n exit 1\n ;;\n esac\n found=`echo ${deps} | grep -v 'not installed' | grep -c \"${i}\" 2>&1`\n if [ $found -gt 0 ]; then\n \techo \"Yes, found $i\"\n else\n\t\t\t\t\techo \"Nope, $i appears to not be installed\"\n\t\t\t\t\tmissing=\"${missing} $i\"\n fi\n done\n\n if [ -n \"${missing}\" ]; then\n echo \"package(s)\\\"${missing}\\\" are missing!\"\n echo \"You will need sudo priviledges to install the packages\"\n if [ x$yes = xno ]; then\n \t$debug sudo ${pkgnet} install ${missing}\n else\n \t$debug sudo ${pkgnet} -y install ${missing}\n fi\n fi\n }\n\t\tinstall_nginx() \n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n apt install -y cron nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"nginx installation failed with error code ${error_code} (nginx installation failed with error code 2)\"\n return 2\n fi\n if [ -f \"/etc/nginx/conf.d/default\" ]; then\n rm -rf /etc/nginx/conf.d/default\n fi\n if [ -f \"/etc/nginx/sites-enabled/default\" ]; then\n rm -rf /etc/nginx/sites-enabled/default\n fi\n if [ -f \"/etc/nginx/sites-available/default\" ]; then\n rm -rf /etc/nginx/sites-available/default\n fi\n service nginx start\n fi\n\t\t\telse\t\t\t\t\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n rpm -Uvh \"http://nginx.org/packages/centos/${OS_VERSION}/noarch/RPMS/nginx-release-centos-${OS_VERSION}-0.el${OS_VERSION}.ngx.noarch.rpm\"\n yum install -y zip cronie nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"cron nginx installation failed with error code ${error_code} cron nginx installation failed with error code 18\"\n return 18\n fi\n if [ -f \"/etc/nginx/conf.d/default.conf\" ]; then\n rm -rf /etc/nginx/conf.d/default.conf\n fi\n if [ -f \"/etc/nginx/sites-enabled/default.conf\" ]; then\n rm -rf /etc/nginx/sites-enabled/default.conf\n fi\n if [ -f \"/etc/nginx/sites-available/default.conf\" ]; then\n rm -rf /etc/nginx/sites-available/default.conf\n fi\n service nginx start\n chkconfig --levels 35 nginx on\n fi\n\t\t\tfi\n\t\t}\n\t\tinstall_php()\n\t\t{\n\t\t\tif ! hash php 2>&-; then\n\t\t\t\techo \"PHP is not installed!\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\t\t\t\t\t\t\t\n echo \"Installing PHP...\"\n apt install -y php7.4 php7.4-common --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"PHP installation failed with error code ${error_code} (PHP installation failed with error code 3)\"\n return 3\n fi\n else \n if ([ \"$pkg_name\" = \"yum\" ])\n then\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n echo \"Note: For the latest version of PHP, we're going to download https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm and https://rpms.remirepo.net/enterprise/remi-release-8.rpm.\"\n echo \"Installing PHP...\"\n dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm\n dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\n dnf module enable php:remi-7.4\n dnf -y install php php-cli php-common\n else\n yum install -y epel-release\n echo \"Note: For the latest version of PHP, we're going to download http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm.\"\n echo \"Installing PHP...\"\n rpm -Uvh \"http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm\"\n yum --enablerepo=remi-php74 install -y php\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"php installation failed with error code ${error_code} (php installation failed with error code 20)\"\n return 20\n fi\n fi\n fi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Installing PHP fpm and cli extension...\"\n\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\tthen\n\t\t\t\tapt install -y php7.4-fpm php7.4-cli --allow-unauthenticated\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"php7.4-cli installation failed with error code ${error_code} (php7.4-cli installation failed with error code 4)\"\n\t\t\t\tfi\n\t\t\t\tservice php7.4-fpm start\n\t\t\telse \n\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\tthen\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n \t\t\tthen\n\t\t\t\t\t\tdnf -y install php-fpm php-devel php-opcache\n\t\t\t\t\t\tdnf -y install php-json\n\t\t\t\t\telse\n\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-fpm php-devel php-cli php-opcache\n\t\t\t\t\tfi\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php-devel installation failed with error code ${error_code} (php-devel installation failed with error code 21)\"\n\t\t\t\t\t\treturn 21\n\t\t\t\t\tfi\t\t\t\t\t\n\t\t\t\t\tservice php-fpm start\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"....\"\n\t\t\telse\n\t\t\t\tchkconfig --levels 35 php-fpm on\t\t\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP curl extension...\"\n\t\t\tphp -m | grep curl\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-curl...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-curl --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-curl installation failed with error code ${error_code} (php7.4-curl installation failed with error code 5)\"\n\t\t\t\t\t\treturn 5\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-curl\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-curl\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-curl installation failed with error code ${error_code} (php-curl installation failed with error code 22)\"\n\t\t\t\t\t\t\treturn 22\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP pgsql extension...\"\n\t\t\tphp -m | grep pgsql\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-pgsql...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install libpq5\n\t\t\t\t\tapt install -y php7.4-pgsql --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-pgsql installation failed with error code ${error_code} (php7.4-pgsql installation failed with error code 6)\"\n\t\t\t\t\t\treturn 6\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pgsql\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pgsql\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-pgsql installation failed with error code ${error_code} (php-pgsql installation failed with error code 23)\"\n\t\t\t\t\t\t\treturn 23\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP mbstring extension...\"\n\t\t\tphp -m | grep mbstring\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-mbstring...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-mbstring --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-mbstring installation failed with error code ${error_code} (php7.4-mbstring installation failed with error code 7)\"\n\t\t\t\t\t\treturn 7\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-mbstring\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-mbstring\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-mbstring installation failed with error code ${error_code} (php-mbstring installation failed with error code 24)\"\n\t\t\t\t\t\t\treturn 24\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP ldap extension...\"\n\t\t\tphp -m | grep ldap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-ldap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-ldap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-ldap installation failed with error code ${error_code} (php7.4-ldap installation failed with error code 8)\"\n\t\t\t\t\t\treturn 8\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-ldap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-ldap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-ldap installation failed with error code ${error_code} (php-ldap installation failed with error code 25)\"\n\t\t\t\t\t\t\treturn 25\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imagick extension...\"\n\t\t\tphp -m | grep imagick\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-imagick...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y gcc\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"gcc installation failed with error code ${error_code} (gcc installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y imagemagick\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"imagemagick installation failed with error code ${error_code} (imagemagick installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y php7.4-imagick --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imagick installation failed with error code ${error_code} (php7.4-imagick installation failed with error code 10)\"\n\t\t\t\t\t\treturn 10\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tyum install -y ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pear\n\t\t\t\t\t\t\tdnf -y install php-gd\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pear\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-gd\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"Installing php-imagick failed with error code ${error_code} (Installing php-imagick failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\n\t\t\t\t\t\tcd /usr/local/src\n\t\t\t\t\t\twget http://pecl.php.net/get/imagick-2.2.2.tgz\n\t\t\t\t\t\ttar zxvf ./imagick-2.2.2.tgz\n\t\t\t\t\t\tcd imagick-2.2.2\n\t\t\t\t\t\tphpize\n\t\t\t\t\t\t./configure\n\t\t\t\t\t\tmake\n\t\t\t\t\t\tmake test\n\t\t\t\t\t\tmake install\n\t\t\t\t\t\techo \"extension=imagick.so\" >> /etc/php.ini\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imap extension...\"\n\t\t\tphp -m | grep imap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php7.4-imap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-imap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imap installation failed with error code ${error_code} (php7.4-imap installation failed with error code 11)\"\n\t\t\t\t\t\treturn 11\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-imap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-imap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-imap installation failed with error code ${error_code} (php-imap installation failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking xml...\"\n\t\t\tphp -m | grep xml\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing xml...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install php7.4-xml --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 56)\"\n\t\t\t\t\t\treturn 56\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-xml\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-xml\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 57)\"\n\t\t\t\t\t\t\treturn 57\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_timezone()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\ttimezone=$(cat /etc/timezone)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php/7.4/fpm/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php/7.4/fpm/php.ini\n\t\t\telse \n\t\t\t\tPHP_VERSION=$(php -v | grep \"PHP 5\" | sed 's/.*PHP \\([^-]*\\).*/\\1/' | cut -c 1-3)\n\t\t\t\techo \"Installed PHP version: '$PHP_VERSION'\"\n\t\t\t\ttimezone=$(cat /etc/sysconfig/clock | grep ZONE | cut -d\"\\\"\" -f2)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php.ini\n\t\t\tfi\n\t\t}\n\t\tinstall_postgresql()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tid -a postgres\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]; then\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n sh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n apt install wget ca-certificates\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n fi\n wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n apt-key add ACCC4CF8.asc\n apt update\n apt install -y postgresql --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n return 13\n fi\n\t\t\t\telse\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ 1 -eq \"$(echo \"${PSQL_VERSION} < 9.3\" | bc)\" ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tsh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n\t\t\t\t\t\tapt install wget ca-certificates\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n\t\t\t\t\t\tfi\n\t\t\t\t\t\twget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n\t\t\t\t\t\tapt-key add ACCC4CF8.asc\n\t\t\t\t\t\tapt update\n\t\t\t\t\t\tapt upgrade\n\t\t\t\t\t\tapt install -y postgresql --allow-unauthenticated\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n\t\t\t\t\t\t\treturn 13\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\tfi\n\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf > /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf.1\n\t\t\t\tcd /etc/postgresql/${PSQL_VERSION}/main || exit\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tservice postgresql restart\n\t\t\telse\n\t\t\t\tif ! which psql > /dev/null 2>&1;\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n if [ $(getconf LONG_BIT) = \"64\" ]; then\n if [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n dnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n else\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n then\n yum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n fi\n fi\n fi\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n dnf module enable postgresql:13\n dnf -y install postgresql-server postgresql-contrib postgresql-libs\n else\n yum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\t\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql13 installation failed with error code ${error_code} (postgresql13 installation failed with error code 29)\"\n return 29\n fi\n\t\t\t\telse \n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tif [[ $PSQL_VERSION < 9.3 ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tif [ $(getconf LONG_BIT) = \"64\" ]; then\n\t\t\t\t\t\t\tif [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n\t\t\t\t\t\t\t\tdnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n\t\t\t\t\t\t\t\tthen\n\t\t\t\t\t\t\t\t\tyum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf module enable postgresql:13\n\t\t\t\t\t\t\tdnf -y install postgresql-server postgresql-contrib postgresql-libs\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 29)\"\n\t\t\t\t\t\t\treturn 29\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^13\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=13\n\t\t\t\tfi\n\t\t\t\tPSQL_FOLDER=$(echo ${PSQL_VERSION} | sed 's/\\.//')\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tpostgresql-setup --initdb\n\t\t\t\telse\n\t\t\t\t\t\"/usr/pgsql-${PSQL_VERSION}/bin/postgresql-${PSQL_VERSION}-setup\" initdb\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl enable postgresql\n\t\t\t\t\tsystemctl start postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl start \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\t\tsystemctl enable \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" start\n\t\t\t\t\t\tchkconfig --levels 35 \"postgresql-${PSQL_VERSION}\" on\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/data/pg_hba.conf\" > \"/var/lib/pgsql/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/data\" || exit\n\t\t\t\telse\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf\" > \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/${PSQL_VERSION}/data\" || exit\n\t\t\t\tfi\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl restart postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl restart \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_geoip()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tif ! hash GeoIP-devel 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-geoip php7.4-dev libgeoip-dev\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code ${error_code} (php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code 50)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\techo \"extension=geoip.so\" >> /etc/php.ini\n\n\t\t\t\tmkdir -v /usr/share/GeoIP\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"GeoIP folder creation failed with error code ${error_code} (GeoIP folder creation failed with error code 52)\"\n\t\t\t\tfi\n\t\t\t\tget_geoip_data\n\t\t\telse\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\t\treturn 47\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tconfigure_restyaboard()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n echo \"Changing server_name in nginx configuration...\"\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\telse\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\tfi\n\t\t}\n\t\tinstall_postfix()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Installing postfix...\"\n\t\t\t\techo \"postfix postfix/mailname string $IPADDR\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\techo \"postfix postfix/main_mailer_type string 'Internet Site'\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\tapt install -y postfix\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"postfix installation failed with error code ${error_code} (postfix installation failed with error code 16)\"\n\t\t\t\tfi\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/fpm/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/fpm/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/cli/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/cli/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php.ini\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tchange_permission()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/media/ $RESTYABOARD_DIR/tmp/cache/ $RESTYABOARD_DIR/client/img/\n\t\t\t\tchcon -Rv --type=httpd_t $RESTYABOARD_DIR/\n\t\t\tfi\n\t\t}\n\t\tpsql_connect()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 34)\"\n\t\t\t\t\treturn 34\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 35)\"\n\t\t\t\t\treturn 35\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 36)\"\n\t\t\t\t\treturn 36\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 37)\"\n\t\t\t\t\treturn 37\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 39)\"\n\t\t\t\t\t\treturn 39\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 40)\"\n\t\t\t\t\treturn 40\n\t\t\t\tfi\t\t\t\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 41)\"\n\t\t\t\t\treturn 41\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 42)\"\n\t\t\t\t\treturn 42\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 43)\"\n\t\t\t\t\treturn 43\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\tif [ \"$?\" = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 45)\"\n\t\t\t\t\t\treturn 45\n\t\t\t\t\tfi\t\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P allow_postfix_local_write_mail_spool 1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tphp_fpm_reset()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \".........\"\n\t\t\telse\n\t\t\t\techo \"Reset php-fpm (use unix socket mode)...\"\n\t\t\t\tif [ -f \"/run/php/php7.4-fpm.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php\\/php7.4-fpm.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\telif [ -f \"/run/php-fpm/www.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php-fpm\\/www.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/unix:\\/run\\/php-fpm\\/www.sock/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\telse\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/127.0.0.1:9000/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_jq()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tapt install -y jq\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 53)\"\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tyum install -y jq\n\t\t\t\terror_code\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 49)\"\n\t\t\t\t\treturn 49\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_db_connection()\n\t\t{\t\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Starting services...\"\n\t\t\t\tservice cron restart\n\t\t\t\tservice php7.4-fpm restart\n\t\t\t\tservice nginx restart\n\t\t\t\tservice postfix restart\n\t\t\t\tapt install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\telse\n\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\telse\n\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\tfi\n\t\t\t\tyum install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P httpd_can_network_connect_db=1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tssl_connectivity()\n\t\t{\n\t\t\tif [[ $IPADDR =~ ^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$ ]]; then\n\t\t\t\techo \"SSL connectivity cannot be set for IP address\"\n\t\t\telse\n\t\t\t\tset +x\n\t\t\t\techo \"Do you want to set up SSL connectivity for your domain and your domain should be publicly accessible Restyaboard instance and your domain should be mappped to this Restyaboard Server, Note: If you're trying to set SSL for Non-publicly accessible instance, then your Restyaboard will not work (y/n)?\"\n\t\t\t\tread -r answer\n\t\t\t\tset -x\n\t\t\t\tcase \"${answer}\" in\n\t\t\t\t\t[Yy])\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tapt install certbot python3-certbot-nginx -y\n\t\t\t\t\t\tservice nginx restart\n\t\t\t\t\t\tservice php7.4-fpm restart\n\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\telse\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install epel-release\n\t\t\t\t\t\t\tdnf -y install certbot python3-certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y epel-release\n\t\t\t\t\t\t\tyum install certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"SSL installation failed with error code ${error_code} (php installation failed with error code 20)\"\n\t\t\t\t\t\t\treturn 20\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tesac\n\t\t\tfi\n\t\t}\n\t\tfind_release\n\t\tcheckdeps\n\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n then\n\t\t\tapt update\n apt install -y net-tools\n\t\t\tapt install -y curl unzip\n\t\telse\n\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n \tthen\n yum install -y net-tools\n\t\t\t\tyum install -y curl unzip\n\t\t\tfi\n\t\tfi\n IFCONFIG_PATH=$(which ifconfig)\n IPADDR=$(${IFCONFIG_PATH} eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n\t\tRESTYABOARD_VERSION=$(curl --silent https://api.github.com/repos/RestyaPlatform/board/releases | grep tag_name -m 1 | awk '{print $2}' | sed -e 's/[^v0-9.]//g')\n\t\tPOSTGRES_DBHOST=localhost\n\t\tPOSTGRES_DBNAME=restyaboard\n\t\tPOSTGRES_DBUSER=restya\n\t\tPOSTGRES_DBPASS=hjVl2!rGd\n\t\tPOSTGRES_DBPORT=5432\n\t\tDOWNLOAD_DIR=/opt/restyaboard\n RESTYABOARD_DIR=/usr/share/nginx/html/restyaboard\n\t\t\n\t\tget_geoip_data () \n\t\t{\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIP.dat.gz\n\t\t\tgunzip GeoIP.dat.gz\n\t\t\tmv GeoIP.dat /usr/share/GeoIP/GeoIP.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz\n\t\t\tgunzip GeoIPv6.dat.gz\n\t\t\tmv GeoIPv6.dat /usr/share/GeoIP/GeoIPv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.xz\n\t\t\tunxz GeoLiteCity.dat.xz\n\t\t\tmv GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCityv6.dat.gz\n\t\t\tgunzip GeoLiteCityv6.dat.gz\n\t\t\tmv GeoLiteCityv6.dat /usr/share/GeoIP/GeoLiteCityv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNum.dat.gz\n\t\t\tgunzip GeoIPASNum.dat.gz\n\t\t\tmv GeoIPASNum.dat /usr/share/GeoIP/GeoIPASNum.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNumv6.dat.gz\n\t\t\tgunzip GeoIPASNumv6.dat.gz\n\t\t\tmv GeoIPASNumv6.dat /usr/share/GeoIP/GeoIPASNumv6.dat\n\t\t}\n\n\t\tupgrade-0.3-0.4()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.4-0.4.1()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.5.2-0.6()\n\t\t{\n\t\t\tsed -i \"s/rewrite ^\\/ical\\/.*/rewrite ^\\/ical\\/([0-9]*)\\/([0-9]*)\\/([a-z0-9]*).ics\\$ \\/server\\/php\\/ical.php?board_id=\\$1\\&user_id=\\$2\\&hash=\\$3 last;/\" /etc/nginx/conf.d/restyaboard.conf\n\t\t}\n\n\t\tupgrade-0.6.3-0.6.4()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_created_date\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_created_date/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.4-0.6.5()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_id\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_id/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.2.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.5-0.6.6()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\t\t\n\t\tupgrade-0.6.6-0.6.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_card_counter-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_card_counter-v0.1.1.zip\n\t\t\tunzip /tmp/r_card_counter-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.2.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_eu_gdpr-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_eu_gdpr-v0.1.2.zip\n\t\t\tunzip /tmp/r_eu_gdpr-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.1.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\t\t\t\n\t\t\t\n\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.3.zip\n\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\t: > /var/spool/cron/crontabs/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n\t\t\telse\n\t\t\t\t: > /var/spool/cron/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.7-0.6.8(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.3.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\n\t\tupgrade-0.6.8-0.6.9(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.4.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.4.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.4.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\t\tupgrade-0.6.9-1.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_togetherjs\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_togetherjs/\n\t\t\tfi\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.5.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.5.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.5.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.2.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\n\t\t\techo \"Applying permission...\"\n\t\t\tuseradd restyaboard\n\t\t\tusermod --password 'hjVl2!rGd' restyaboard\n\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tuser www-data;\n\t\t\t\tusermod -a -G restyaboard www-data\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\telse\n\t\t\t\tuser nginx;\n\t\t\t\tusermod -a -G restyaboard nginx\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\tfi\n\t\t\tchown -R restyaboard:restyaboard $RESTYABOARD_DIR\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n\t\t\tchmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tfi\n\t\t}\n\n\t\tupdate_version()\n\t\t{\n\t\t\tset +x\n\t\t\techo -e \"A newer version ${RESTYABOARD_VERSION} of Restyaboard is available.\\n\\nImportant: Please note that upgrading will remove any commercial apps that were free in previous version.\\nFor more details about commercial apps, please visit https://restya.com/board/pricing\\n\\nDo you want to get it now y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tset +x\n\t\t\t\tset -x\n\t\t\t\t\n\t\t\t\techo \"Downloading files...\"\n\t\t\t\tcurl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n\t\t\t\tunzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n\t\t\t\t\n\t\t\t\techo \"Updating files...\"\n\t\t\t\tcp -r ${DOWNLOAD_DIR}/. \"$RESTYABOARD_DIR\"\n\t\t\t\t\n\t\t\t\techo \"Connecting database to run SQL changes...\"\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$? \n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database connection failed with error code ${error_code} (PostgreSQL database connection failed with error code 32)\"\n\t\t\t\t\treturn 32\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\t\n\t\t\t\techo \"Changing PostgreSQL database name, user and password...\"\n\t\t\t\tsed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\t\tdeclare -a upgrade;\n\t\t\t\tif [[ $version < \"v0.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.3-0.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.4.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4-0.4.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4.2-0.5\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.1-0.5.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.2-0.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6-0.6.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.1-0.6.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.3\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.2-0.6.3\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.3-0.6.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.4-0.6.5\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v0.6.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.5-0.6.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tset +x\n\t\t\t\t\techo \"Before updating make sure to remove duplicate username's and emails used by more than one user, otherwise unique indexing for users will be thrown an error But all other queries will be executed without any issue.\"\n\t\t\t\t\tread -r -s -p $'Press [Enter] key to continue...'\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.6-0.6.7\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.8\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.7-0.6.8\")\n\t\t\t\tfi\t\t \n\t\t\t\tif [[ $version < \"v0.6.9\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.8-0.6.9\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v1.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.9-1.7\")\n\t\t\t\tfi\n\t\t\t\t# use for loop to read all values and indexes\n\t\t\t\tfor i in \"${upgrade[@]}\"\n\t\t\t\tdo\n\t\t\t\t\tif [ \"$(type -t ${i})\" = function ];\n\t\t\t\t\tthen\n\t\t\t\t\t\teval ${i}\n\t\t\t\t\tfi\n\t\t\t\t\tif [ -f \"$RESTYABOARD_DIR/sql/${i}.sql\" ];\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"Updating SQL...\"\n\t\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/${i}.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"PostgreSQL updation of SQL failed with error code ${error_code} (PostgreSQL updation of SQL failed with error code 33)\"\n\t\t\t\t\t\t\treturn 33\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tdone\n\t\t\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\tthen\t\t\t\t \n service nginx restart\n\t\t\t\t\tservice php${PHP_VERSION}-fpm restart\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\telse\n\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\tesac\n\t\t}\n\n\t\tif [ -f \"$DOWNLOAD_DIR/release\" ];\n\t\tthen\n\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\tif [[ $version < $RESTYABOARD_VERSION ]];\n\t\t\tthen\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\telse\n\t\t\t\techo \"No new version available\"\n\t\t\t\texit;\n\t\t\tfi\n\t\telse\n\t\t\tset +x\n\t\t\techo \"Is Restyaboard already installed and configured/working y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\tesac\n\t\tfi\n\n if ([ \"$OS_REQUIREMENT\" = \"Debian\" ])\n then\n sed -i -e 's/deb cdrom/#deb cdrom/g' /etc/apt/sources.list\n sh -c 'echo \"deb http://ftp.de.debian.org/debian jessie main\" > /etc/apt/sources.list.d/debjessie.list'\n apt install apt-transport-https lsb-release ca-certificates -y\n wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg\n echo \"deb https://packages.sury.org/php/ $(lsb_release -sc) main\" | tee /etc/apt/sources.list.d/php.list\n fi\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n apt install debian-keyring debian-archive-keyring -y\n apt update -y\n apt upgrade -y\n apt install python-software-properties -y\n apt install software-properties-common -y\n if ! hash php 2>&-; then\n add-apt-repository -y ppa:ondrej/php\n apt update -y\n apt install libjpeg8 -y --allow-unauthenticated\n fi\n fi\n install_nginx\n \n echo \"Checking PHP...\"\n install_php\n\n echo \"Setting up timezone...\"\n set_timezone\n \n echo \"Checking PostgreSQL...\"\n install_postgresql\n\n install_geoip\n \n echo \"Downloading Restyaboard script...\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\n apt install -y curl\n fi\n mkdir ${DOWNLOAD_DIR}\n curl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n unzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n rm /tmp/restyaboard.zip\n\n configure_restyaboard\n \n \n echo \"Copying Restyaboard script to root directory...\"\n cp -r ${DOWNLOAD_DIR}/* \"$RESTYABOARD_DIR\"\n \n install_postfix\n \n echo \"Changing permission...\"\n useradd restyaboard\n usermod --password 'hjVl2!rGd' restyaboard\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n user www-data;\n usermod -a -G restyaboard www-data\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n else\n user nginx;\n usermod -a -G restyaboard nginx\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n fi\n chown -R restyaboard:restyaboard $RESTYABOARD_DIR\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n chmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n change_permission\n\n psql_connect\n \n echo \"Changing PostgreSQL database name, user and password...\"\n sed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n \n echo \"Setting up cron for every 5 minutes..\"\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n else\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n fi\n php_fpm_reset\n \n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n service nginx restart\n service php7.4-fpm restart\n else\n if [ -f \"/bin/systemctl\" ]; then\n echo \"Starting services with systemd...\"\n systemctl restart nginx\n systemctl restart php-fpm\n else\n echo \"Starting services...\"\n /etc/init.d/php-fpm restart\n /etc/init.d/nginx restart\n fi\n fi\n set_db_connection\n\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\tthen\n\t\t\tssl_connectivity\n\t\telse\n\t\t\tssl_connectivity\n\t\tfi\n\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n\t\t\tsemanage permissive -a httpd_t\n\t\tfi\n\t\tset +x\n\t\techo \"Checking Hosting...\"\n\t\tresponse=$(curl -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2017-04-02 --write-out %{http_code} --connect-timeout 10 --max-time 10 --silent --output /dev/null)\n\t\t\n\t\tif [ -f /etc/ImageMagick-6/policy.xml ]; then\n \t\tsed -i -e 's///g' /etc/ImageMagick-6/policy.xml\n\t\tfi\n\n\t\tif [ -f /etc/ImageMagick/policy.xml ]; then\n\t\t\tsed -i -e 's///g' /etc/ImageMagick/policy.xml\n\t\tfi\n\n\t\tif [ ${response} -eq 200 ];then\n\t\t\techo \"Note: PHP Mailer will not work in Azure. Kindly use external SMTP mail server.\"\n\t\tfi\n\t\tset +x\n\t\tcurl -v -L -G -d \"app=board&os=${os}&version=${version}\" -k \"https://restya.com/success_installation.php\"\n\t\techo \"Restyaboard URL : $IPADDR\"\n\n\t\techo \"Login with username admin and password restya\"\n\t\texit 1\n\t}\n\tmain\n\terror=$?\n\tos=$(lsb_release -i -s)\n\tcurl -v -L -G -d \"app=board&os=${os}&error=${error}\" -k \"https://restya.com/error_installation.php\"\n\techo \"If you're finding it difficult to install Restyaboard from your end, we do also offer installation support that you may consider https://restya.com/contact\"\n\texit 1\n} 2>&1 | tee -a /tmp/restyaboard_install.log","user_defined_fields":[]},{"id":912264,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rocket.Chat One-Click","description":"Rocket.Chat One-Click","ordinal":97,"logo_url":"assets/rocketchat.svg","images":["linode/ubuntu20.04"],"deployments_total":1840,"deployments_active":86,"is_public":true,"mine":false,"created":"2021-09-29T17:16:16","updated":"2023-12-26T03:51:35","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nufw allow 3000\nfail2ban_install\n\n# Snapd & rocketchat install\napt install snapd -y\nsnap install rocketchat-server\nsnap info rocketchat-server\n\n# Check DNS\ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n# SSL\nsnap set rocketchat-server siteurl=https://$FQDN\nsystemctl enable --now snap.rocketchat-server.rocketchat-caddy \nsnap restart rocketchat-server\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA","default":""}]},{"id":609048,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ruby on Rails One-Click","description":"Ruby on Rails One-Click","ordinal":98,"logo_url":"assets/rubyonrails.svg","images":["linode/ubuntu20.04"],"deployments_total":460,"deployments_active":20,"is_public":true,"mine":false,"created":"2019-11-05T07:22:54","updated":"2023-12-14T17:59:49","rev_note":"Initial import","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Ruby on Rails\napt install -y ruby rails\n\n# Configure rails Directory\nmkdir /home/railsapp\ncd /home/railsapp\nrails new $RAILSAPP\ncd $RAILSAPP\nrails s -b 0.0.0.0 &\n\n# Start rails app on reboot\ncrontab -l | { cat; echo \"@reboot cd /home/railsapp/app1/ && rails s -b 0.0.0.0 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"railsapp","label":"Rails Application name","example":"railsapp"}]},{"id":401703,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rust One-Click","description":"Rust - Latest One-Click","ordinal":99,"logo_url":"assets/Rust.svg","images":["linode/ubuntu20.04"],"deployments_total":2477,"deployments_active":7,"is_public":true,"mine":false,"created":"2019-03-08T21:09:34","updated":"2023-12-27T05:15:15","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \nsource \n\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"rustserver\"\n\nset_hostname\napt_setup_update\n\n\nif [[ \"$RUSTHOSTNAME\" = \"\" ]]; then\n RUSTHOSTNAME=\"Linode Rust Server\"\nfi\n\nif [[ \"$LEVEL\" = \"Procedural Map\" ]]; then\n LEVEL=\"\"\nfi\n\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix curl \\\nwget file bzip2 gzip unzip bsdmainutils python \\\nutil-linux ca-certificates binutils bc jq tmux \\\nlib32gcc1 libstdc++6 libstdc++6:i386 lib32z1\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Rust\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\ncp /home/rustserver/lgsm/config-lgsm/rustserver/_default.cfg /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nchown -R rustserver:rustserver /home/rustserver/\n\necho \"server.globalchat $GLOBALCHAT/\" > /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.pve $PVE\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.description \\\"$DESCRIPTION\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.maxplayers $MAXPLAYERS\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.seed \\\"$SEED\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.level $LEVEL\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.hostname \\\"$RUSTHOSTNAME\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.ip $IP\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\nsed -i \"s/rconpassword=\\\"CHANGE_ME\\\"/rconpassword=\\\"$RCONPASSWORD\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/worldsize=\\\"3000\\\"/worldsize=\\\"$WORLDSIZE\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/maxplayers=\\\"50\\\"/maxplayers=\\\"$MAXPLAYERS\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\n\n\n# Start the service and setup firewall\nufw allow 28015\nufw allow 28016\n\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rusthostname","label":"Server Hostname","default":"Linode Rust Server"},{"name":"description","label":"Server Description","default":"Powered by Linode!"},{"name":"rconpassword","label":"RCON Password"},{"name":"maxplayers","label":"Maximum Players","oneof":"10,25,50,75,100","default":"50"},{"name":"level","label":"World","oneof":"Procedural Map,Barren,HapisIsland,SavasIsland_koth","default":"Procedural Map"},{"name":"worldsize","label":"World Size","oneof":"1000,3000,6000","default":"3000"},{"name":"seed","label":"Seed","default":"50000"},{"name":"globalchat","label":"Global Chat Enabled","oneof":"true,false","default":"true"},{"name":"pve","label":"PvE Enabled","oneof":"true,false","default":"false"}]},{"id":971042,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Saltcorn One-Click","description":"Saltcorn One-Click","ordinal":100,"logo_url":"assets/saltcorn.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":308,"deployments_active":7,"is_public":true,"mine":false,"created":"2022-02-08T16:21:05","updated":"2023-12-26T16:00:57","rev_note":"","script":"#!/bin/bash\n## Saltcorn Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction saltcorninstall {\n wget -qO - https://deb.nodesource.com/setup_14.x | sudo bash -\n apt-get install -qqy nodejs\n npx saltcorn-install -y\n systemctl enable saltcorn\n systemctl stop saltcorn\n cat < /lib/systemd/system/saltcorn.service\n[Unit]\nDescription=saltcorn\nDocumentation=https://saltcorn.com\nAfter=network.target\n\n[Service]\nType=notify\nWatchdogSec=5\nUser=saltcorn\nWorkingDirectory=/home/saltcorn\nExecStart=/home/saltcorn/.local/bin/saltcorn serve -p 8080\nRestart=always\nEnvironment=\"NODE_ENV=production\"\n\n[Install]\nWantedBy=multi-user.target\nEND\n systemctl daemon-reload\n systemctl start saltcorn\n}\n\nfunction firewallsaltcorn {\n ufw allow 22\n ufw allow 80\n ufw allow 443\n}\n\nfunction nginxreversesaltcorn {\n apt-get install nginx -y\n cat < /etc/nginx/conf.d/saltcorn.conf\nserver {\n listen 80;\n server_name $FQDN $IP;\n\n location / {\n proxy_set_header X-Forwarded-For \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:8080;\n }\n}\nEND\n nginx -t\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\n\nfunction ssl_saltcorn {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n saltcorninstall\n nginxreversesaltcorn\n firewallsaltcorn\n ssl_saltcorn\n\n}\n# Execute\nmain \nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for Letsencrypt SSL","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":774829,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ServerWand One-Click","description":"ServerWand One-Click","ordinal":101,"logo_url":"assets/serverwand.svg","images":["linode/ubuntu22.04"],"deployments_total":1104,"deployments_active":10,"is_public":true,"mine":false,"created":"2021-02-19T17:28:16","updated":"2023-12-28T04:02:56","rev_note":"","script":"#!/bin/bash\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# serverwand ssh key\nmkdir -p /root/.ssh/\nchmod 700 /root/.ssh/\ncurl https://serverwand.com/api/servers/connect > ~/.ssh/authorized_keys\nchmod 600 /root/.ssh/authorized_keys","user_defined_fields":[]},{"id":1177225,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Seatable One-Click","description":"Seatable One-Click App","ordinal":102,"logo_url":"assets/seatable.svg","images":["linode/debian11"],"deployments_total":45,"deployments_active":2,"is_public":true,"mine":false,"created":"2023-05-16T19:56:00","updated":"2023-12-28T00:03:08","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\nsource \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION \n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Update and basic installs\nsystem_update\ndebian_upgrade\nenable_fail2ban\nsystem_install_package ufw ca-certificates curl gnupg lsb-release curl pwgen\n\n# Install docker\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \\\n \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get -y update\napt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose\n\n# Pull current seatable container\ndocker pull seatable/seatable-enterprise:latest\nmkdir /opt/seatable\nwget -O \"/opt/seatable/docker-compose.yml\" \"https://manual.seatable.io/docker/Enterprise-Edition/docker-compose.yml\"\n\n# Prepare SeaTable\nMYSQL_PASSWORD=`pwgen -s 30 1`\nsed -i \"s|DB_ROOT_PASSWD=.*|DB_ROOT_PASSWD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|MYSQL_ROOT_PASSWORD=.*|MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_LETSENCRYPT=.*|SEATABLE_SERVER_LETSENCRYPT=${LE}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_HOSTNAME=.*|SEATABLE_SERVER_HOSTNAME=${URL}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|TIME_ZONE=.*|TIME_ZONE=${TIMEZONE}|\" /opt/seatable/docker-compose.yml\n\n# Add a license\nmkdir -p /opt/seatable/seatable-data/seatable\ntouch /opt/seatable/seatable-data/seatable/seatable-license.txt\ncat << EOF > /opt/seatable/seatable-data/seatable/seatable-license.txt\n#SeaTable server licence\nName = \"Cloud Trial\"\nLicencetype = \"User\"\nLicenceKEY = \"1672935702\"\nProductID = \"SeaTable server\"\nExpiration = \"2024-01-31\"\nMaxUsers = \"3\"\nMode = \"subscription\"\nHash = \"045af708265d7d549cad51fc2b678272a1d15ab8cbfbf05734e371504bb72b388f4441493c7bfeccce7c19ac9c6877cb8f3aecc3beebe685db007832e1c0231728a92772d45dc1c08facbc225d90776f86d34cb4154bafe7c983b6767ffb31a74b133de61edf15c170564fcefb6e457012f63b95ed4aaf6fd2e1e1cfc2ad93a682cfab2fe86f427f7d93ae9b69cbaf02a7565074a95a8c1176402f250d2e815ab206a6b65009c65d94259772ab31a00c11e5c6b57fda0fbb1b22a69734c10214594a5d7b4c88a995eaeb3a65f9aa5d163d9e5c09f73105a4ef760a8421fb66d1982da739c42808fded9a95e456090747e494b0a1aee2a40f388d9f1146051754\"\nEOF\n\n# firewall\nufw limit ssh\nufw allow 80\nufw allow 443\nufw --force enable\n\n# Message of the day\ncat << EOF > /etc/motd\n#############################\n#############################\nSeaTable Enterprise Server\n\nTo finish the installation, change to the directory /opt/seatable and follow our deployment instructions at https://manual.seatable.io/docker/Enterprise-Edition/Deploy%20SeaTable-EE%20with%20Docker/.\nYou can skip the beginning and start directly with the adjustment of the docker-compose.yml file.\n\nPlease visit https://forum.seatable.io for SeaTable community support.\n#############################\n#############################\n\nEOF\n\necho \"Installation complete\"\nall_set\nstackscript_cleanup","user_defined_fields":[{"name":"url","label":"The domain/subdomain for SeaTable Server","example":"https://seatable.example.org"},{"name":"le","label":"Get a Let's Encrypt certificate","default":"True","oneof":"True,False"},{"name":"timezone","label":"Choose your timezone (e.g Europe/Berlin)","example":"Choices can be found here: http://en.wikipedia.org/wiki/List_of_tz_zones_by_name","default":"Etc/UTC"}]},{"id":604068,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Shadowsocks One-Click","description":"Shadowsocks One-Click","ordinal":103,"logo_url":"assets/shadowsocks.svg","images":["linode/ubuntu20.04"],"deployments_total":9445,"deployments_active":373,"is_public":true,"mine":false,"created":"2019-10-22T16:11:39","updated":"2023-12-28T14:29:52","rev_note":"final edit","script":"#!/usr/bin/env bash\n\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Install & configure shadowsocks\nfunction install_shadowsocks {\n apt-get install shadowsocks-libev -y\n cat </etc/shadowsocks-libev/config.json\n{\n\"server\":\"$IP\",\n\"server_port\":8000,\n\"local_port\":1080,\n\"password\":\"$SHADOWPASSWORD\",\n\"timeout\":60,\n\"method\":\"aes-256-gcm\"\n}\nEND\n systemctl start shadowsocks-libev\n systemctl enable shadowsocks-libev\n systemctl restart shadowsocks-libev\n}\n\nfunction shadowsocks_firewall {\n ufw allow 8000\n}\n\nfunction main {\n install_shadowsocks\n shadowsocks_firewall\n stackscript_cleanup\n}\n\n# Execute function\nmain","user_defined_fields":[{"name":"shadowpassword","label":"Shadowsocks Password","example":"Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1243780,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"SimpleX Chat One-Click","description":"SimpleX Chat","ordinal":104,"logo_url":"assets/simplexchat.svg","images":["linode/ubuntu22.04"],"deployments_total":74,"deployments_active":10,"is_public":true,"mine":false,"created":"2023-09-28T15:20:59","updated":"2023-12-26T16:46:34","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Simplex Settings\n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-simplex-chat\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n # Simplex variables\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n if [[ -n ${DOMAIN} && -n ${SUBDOMAIN} ]]; then\n echo \"addr: ${SUBDOMAIN}.${DOMAIN}\" >> ${group_vars}\n elif [[ -n ${DOMAIN} ]]; then\n echo \"addr: ${DOMAIN}\" >> ${group_vars}\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n\n if [[ -n ${SMP_PASSWORD} ]]; then\n echo \"smp_password: ${SMP_PASSWORD}\" >> ${group_vars};\n fi\n\n if [[ -n ${XFTP_QUOTA} ]]; then\n case ${XFTP_QUOTA} in\n *gb) echo \"xftp_quota: ${XFTP_QUOTA}\" >> ${group_vars} ;;\n *) echo \"xftp_quota: ${XFTP_QUOTA}gb\" >> ${group_vars} ;;\n esac\n fi\n\n # Linode variables\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"smp_password","label":"Set password for smp-server.","example":"123qwe","default":""},{"name":"xftp_quota","label":"Set xftp-server file storage quota in GB.","example":"1/5/10/100gb","default":"10gb"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":869153,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Splunk One-Click","description":"Splunk One-Click","ordinal":105,"logo_url":"assets/splunk.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":977,"deployments_active":93,"is_public":true,"mine":false,"created":"2021-07-20T19:04:43","updated":"2023-12-24T03:14:20","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Splunk settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# Configure Splunk\nwget https://download.splunk.com/products/splunk/releases/8.2.0/linux/splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz\nwget \ntar zxvf splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz -C /opt/\nuseradd splunk --system --shell=/usr/sbin/nologin\nchown -R splunk:splunk /opt/splunk\n\napt install -y expect\n SPLUNK_INSTALL=$(expect -c \"\n set timeout 10\n spawn /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 1 --accept-license\n expect \\\"Please enter an administrator username:\\\"\n send \\\"$SPLUNK_USER\\r\\\"\n expect \\\"Please enter a new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect \\\"Please confirm new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect eof\n \")\n\n# Start daemon\nsystemctl start Splunkd\nsystemctl status Splunkd\n\n# Firewall\nufw allow 22 \nufw allow 8000\nufw allow 8089\nufw allow 9997\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"splunk_user","label":"Splunk Admin User"},{"name":"splunk_password","label":"Splunk Admin password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1","default":""},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd","default":""},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1102904,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Superinsight One-Click","description":"Superinsight One-Click app","ordinal":106,"logo_url":"assets/superinsight.svg","images":["linode/ubuntu22.04"],"deployments_total":30,"deployments_active":2,"is_public":true,"mine":false,"created":"2022-12-20T17:43:01","updated":"2023-12-25T03:06:24","rev_note":"","script":"#!/usr/bin/bash\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Install docker\ncurl -fsSL get.docker.com | sudo sh\n\n# Creating Password\necho \"Superinsight setting up password....\"\nADMIN_PASSWORD=$(openssl rand -hex 12)\nNODE_IP=$(hostname -I | cut -f1 -d' ')\necho \"Downloading and Installing Superinsight instance......\"\n\n# Install Superinsight\ndocker run \\\n--detach \\\n--name superinsight-db-standalone \\\n--restart always \\\n-p 5432:5432 \\\n-v vol-superinsight:/db \\\n-e SUPERINSIGHT_USER=admin \\\n-e SUPERINSIGHT_PASSWORD=\"${ADMIN_PASSWORD}\" \\\nsuperinsight/superinsight-db-standalone:latest\n\n\n# Print instructions\ncat << EOF > /etc/motd\n\n################################################################################################################################################\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSUPERINSIGHT\n################################################################################################################################################\n\nSuperinsight created the user admin with password: ${ADMIN_PASSWORD}\nYou can can connect using a database client with the following connection string postgres://admin:${ADMIN_PASSWORD}@${NODE_IP}:5432/superinsight\nFor complete source code and information, visit: https://github.com/superinsight/superinsight-db\n\n################################################################################################################################################\nEOF","user_defined_fields":[]},{"id":401705,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Terraria One-Click","description":"Terraria One-Click","ordinal":107,"logo_url":"assets/Terraria.svg","images":["linode/ubuntu20.04"],"deployments_total":708,"deployments_active":5,"is_public":true,"mine":false,"created":"2019-03-08T21:10:49","updated":"2023-12-21T16:23:20","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n\n#Game config options\n\n#\n#\n#\n#\n#\n#\n#\n\n\n#Non-MVP config options\n#name=\"autocreate\" label=\"autocreate\" default=\"1\"/>\n#name=\"worldpath\" label=\"worldpath\" default=\"~/.local/share/Terraria/Worlds/\"/>\n#name=\"banlist\" label=\"banlist\" default=\"banlist.txt\"/>\n#name=\"priority\" label=\"priority\" default=\"1\"/>\n#name=\"upnp\" label=\"upnp\" default=\"1\"/>\n#name=\"npcstream\" label=\"npcstream\" default=\"60\"/>\n#name=\"secure\" label=\"secure\" default=\"1\"/>\n#name=\"language\" label=\"language\" default=\"en-US\"/>\n\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\nGAMESERVER=\"terrariaserver\"\n\n### UDF to config\n\nif [[ \"$DIFFICULTY\" = \"Normal\" ]]; then\n DIFFICULTY=\"0\"\nelif [[ \"$DIFFICULTY\" = \"Expert\" ]]; then\n DIFFICULTY=\"1\"\nfi\n\nset_hostname\napt_setup_update\n\n\n# Terraria specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\necho Requires Steam username and password to install\nsu - $GAMESERVER -c \"mkdir -p /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER\"\nsu - $GAMESERVER -c \"touch /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steamuser=\\\"$STEAMUSER\\\" >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steampass=\\''$STEAMPASSWORD'\\' >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\n\n# Install Terraria\ngame_install\n\nsed -i s/#seed=AwesomeSeed/seed=\"$SEED\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/worldname=world1/worldname=\"$WORLDNAME\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/difficulty=0/difficulty=\"$DIFFICULTY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/maxplayers=20/maxplayers=\"$MAXPLAYERS\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/port=7777/port=\"$PORT\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/password=/password=\"$PASSWORD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/motd=.*/motd=\"$MOTD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n#Non-MVP config options\n# sed -i s/autocreate=1/autocreate=\"$AUTOCREATE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/worldpath=\\~\\/\\.local\\/share\\/Terraria\\/Worlds\\//worldpath=\"$WORLDPATH\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/banlist=banlist.txt/banlist=\"$BANLIST\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/\\#priority=1/priority=\"$PRIORITY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#npcstream=60/npcstream=\"$NPCSTREAM\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#upnp=1/upnp=\"$UPNP\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/secure=1/secure=\"$SECURE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/language=en\\-US/language=\"$LANGUAGE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n# Setup crons and create systemd service file\nservice_config\n\n# Start the service and setup firewall\nufw_install\nufw allow \"$PORT\"/tcp\nufw allow \"$PORT\"/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"steamuser","label":"Steam Username","example":"username"},{"name":"steampassword","label":"Steam Password, must have Steam Guard turned off for deployment","example":"YourSteamPassword"},{"name":"worldname","label":"World Name","default":"world1"},{"name":"password","label":"Server Password","default":""},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"difficulty","label":"Difficulty Level","oneof":"Normal,Expert","default":"Normal"},{"name":"maxplayers","label":"Maximum Players","oneof":"1,10,20,50,100,200,255,","default":"20"},{"name":"port","label":"Port","default":"7777"},{"name":"seed","label":"Seed","default":"AwesomeSeed"}]},{"id":401704,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"TF2 One-Click","description":"TF2 One-Click","ordinal":108,"logo_url":"assets/TF2.svg","images":["linode/debian11"],"deployments_total":354,"deployments_active":2,"is_public":true,"mine":false,"created":"2019-03-08T21:10:23","updated":"2023-12-12T02:02:35","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nGAMESERVER=\"tf2server\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\nif [[ \"$SERVERNAME\" = \"\" ]]; then\n SERVERNAME=\"Linode TF2 Server\"\nfi\n\n\n# Server config\nset_hostname\napt_setup_update\n\n\n# Teamfortress2 specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\napt -q -y install mailutils postfix curl wget file \\\nbzip2 gzip unzip bsdmainutils python util-linux \\\nca-certificates binutils bc jq tmux lib32gcc-s1 libstdc++6 \\\nlibstdc++6:i386 libcurl4-gnutls-dev:i386 libtcmalloc-minimal4:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Teamfortress2\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\ncp /home/tf2server/lgsm/config-lgsm/tf2server/_default.cfg /home/tf2server/lgsm/config-lgsm/tf2server/common.cfg\n\n# Custom game configs\n> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\ncat <> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile\nEND\n\necho \"hostname $SERVERNAME\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_maxrounds $MAXROUNDS\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_timelimit $TIMELIMIT\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"\\\"$MOTD\\\"\" > /home/tf2server/serverfiles/tf/cfg/motd_default.txt\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27014:27050/tcp\nufw allow 3478:4380/udp\nufw allow 27000:27030/udp\nufw allow 26901\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode TF2 Server"},{"name":"svpassword","label":"Server Password","default":""},{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,3,5,10,15,20","default":"5"},{"name":"timelimit","label":"Round Time Limit","oneof":"10,15,35,45,60","default":"35"},{"name":"rconpassword","label":"RCON password"}]},{"id":1051711,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UniFi Network Application One-Click","description":"UniFi Network Application One-Click","ordinal":109,"logo_url":"assets/unifi.svg","images":["linode/debian10"],"deployments_total":493,"deployments_active":23,"is_public":true,"mine":false,"created":"2022-09-01T15:41:39","updated":"2023-10-18T12:38:34","rev_note":"","script":"#!/bin/bash\n#\n# Script to install UniFi Controller on Linode\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n## install depends \nexport DEBIAN_FRONTEND=noninteractive\napt-get install apt-transport-https ca-certificates wget dirmngr gpg software-properties-common multiarch-support libcommons-daemon-java jsvc openjdk-11-jre-headless -y \n\n# install mongodb req libssl1\nwget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\ndpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\n\n# install mongodb-3.4\nwget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | apt-key add -\necho \"deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main\" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list\napt update && apt upgrade -y\napt install mongodb-org -y \n \n# install latest UniFi Controller \necho 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list\nsudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg \napt update && apt install unifi -yq \n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n location /wss/ {\n proxy_pass https://localhost:8443;\n proxy_http_version 1.1;\n proxy_buffering off;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"Upgrade\";\n proxy_read_timeout 86400;\n }\n location / {\n proxy_pass https://localhost:8443;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http\nufw allow https\nufw allow 53\nufw allow 3479/udp\nufw allow 5514/udp\nufw allow 8080/tcp\nufw allow 8443/tcp\nufw allow 8880/tcp\nufw allow 8843/tcp\nufw allow 27117/tcp\nufw allow 5656:5699/udp\nufw allow 10001/udp \nufw allow 1900/udp\nufw allow 123/udp\nufw enable \n\nsleep 60 \n\n## install SSL certs. required \napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n \n## add some details \ncat << EOF > /etc/motd\n###################\n\n The installation is now complete, and you can access the UniFi Network Controller GUI from https://${ABS_DOMAIN}\n We recommend using the GUI to complete your configurations of the service\n\n################### \nEOF\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970523,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Uptime Kuma One-Click","description":"Uptime Kuma One-Click","ordinal":110,"logo_url":"assets/uptimekuma.svg","images":["linode/ubuntu22.04"],"deployments_total":2330,"deployments_active":407,"is_public":true,"mine":false,"created":"2022-02-07T16:06:08","updated":"2023-12-25T12:50:06","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## KUMA Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-uptimekuma\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n # Uptimekuma vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":925530,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UTunnel VPN One-Click","description":"UTunnel VPN One-Click","ordinal":111,"logo_url":"assets/utunnel.svg","images":["linode/ubuntu20.04"],"deployments_total":1206,"deployments_active":17,"is_public":true,"mine":false,"created":"2021-10-25T18:55:37","updated":"2023-12-27T20:51:42","rev_note":"","script":"#!/bin/bash\n# Update the packages on the system from the distribution repositories.\t\napt-get update\nDEBIAN_FRONTEND=noninteractive apt-get upgrade -y\n\n# Install pre-requisites for docker-ce\n\nDEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common\n\n#Add Docker official GPG key\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\n#Add repository\n\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n\n# Download and install utnservice\n\nmkdir /utunnel\n\ncd /utunnel \n\nwget https://files.utunnel.io/production/deploy/install_bundle_20.tar\n\ntar -xf install_bundle_20.tar\n\nrm -f install_bundle_20.tar","user_defined_fields":[]},{"id":781317,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Valheim One-Click","description":"Valheim One-Click","ordinal":112,"logo_url":"assets/valheim.svg","images":["linode/debian10"],"deployments_total":2437,"deployments_active":54,"is_public":true,"mine":false,"created":"2021-03-01T13:26:36","updated":"2023-12-26T18:44:04","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Valheim Server Settings - Required\n#\n#\n\n## Linode/SSH Security Settings - Required\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n\n# Download and install dependencies\ndpkg --add-architecture i386\nsystem_update\nsystem_install_package curl wget file tar expect bzip2 gzip unzip \\\n bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 \\\n libc6-dev libsdl2-2.0-0:i386\n\n\n# Open the needed firewall ports\nufw allow 2456:2458/udp\nufw allow 4380/udp\nufw allow 27000:27030/udp\n\n# Install linuxGSM\nGAMESERVER='vhserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Set the Valheim dedicated server's name and password\ncat /home/$USERNAME/lgsm/config-lgsm/vhserver/_default.cfg >> /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/servername=\\\"Valheim Server\\\"/servername=\\\"$SERVER_NAME\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/serverpassword=\\\"\\\"/serverpassword=\\\"$SERVER_PASSWORD\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\n\n# Start and enable the Valheim services\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"server_name","label":"The name of the Valheim dedicated server"},{"name":"server_password","label":"The password for the Valheim dedicated server","example":"S3cuReP@s$w0rd"},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":954759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VictoriaMetrics Single One-Click","description":"VictoriaMetrics Single","ordinal":113,"logo_url":"assets/victoriametricssingle.svg","images":["linode/ubuntu20.04"],"deployments_total":40,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-01-06T18:53:56","updated":"2023-12-07T22:56:22","rev_note":"","script":"#!/bin/bash\n# \nsource \nsystem_set_hostname \"$HOSTNAME\"\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=noninteractive\napt update && apt upgrade -y && apt install -y curl wget net-tools traceroute jq\n# Generate files\nmkdir -p /etc/victoriametrics/single\nmkdir -p /var/lib/victoria-metrics-data\nmkdir -p /var/lib/cloud/scripts/per-instance\n# Create victoriametrics user\ngroupadd -r victoriametrics\nuseradd -g victoriametrics -d /var/lib/victoria-metrics-data -s /sbin/nologin --system victoriametrics\nchown -R victoriametrics:victoriametrics /var/lib/victoria-metrics-data\n# Install VictoriaMetrics Single\nVM_VERSION=`curl -sg \"https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/tags\" | jq -r '.[0].name'`\nwget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/${VM_VERSION}/victoria-metrics-linux-amd64-${VM_VERSION}.tar.gz -O /tmp/victoria-metrics.tar.gz\ntar xvf /tmp/victoria-metrics.tar.gz -C /usr/bin\nchmod +x /usr/bin/victoria-metrics-prod\nchown root:root /usr/bin/victoria-metrics-prod\ntouch /etc/victoriametrics/single/scrape.yml\nchown root:root /etc/victoriametrics/single/scrape.yml\ncat </etc/systemd/system/vmsingle.service\n[Unit]\nDescription=VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database.\n# https://docs.victoriametrics.com\nAfter=network.target\n[Service]\nType=simple\nUser=victoriametrics\nGroup=victoriametrics\nWorkingDirectory=/var/lib/victoria-metrics-data\nStartLimitBurst=5\nStartLimitInterval=0\nRestart=on-failure\nRestartSec=5\nEnvironmentFile=-/etc/victoriametrics/single/victoriametrics.conf\nExecStart=/usr/bin/victoria-metrics-prod \\$ARGS\nExecStop=/bin/kill -s SIGTERM \\$MAINPID\nExecReload=/bin/kill -HUP \\$MAINPID\n# See docs https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#tuning\nProtectSystem=full\nLimitNOFILE=1048576\nLimitNPROC=1048576\nLimitCORE=infinity\nStandardOutput=syslog\nStandardError=syslog\nSyslogIdentifier=vmsingle\n[Install]\nWantedBy=multi-user.target\nEND\ncat </etc/victoriametrics/single/victoriametrics.conf\n# See https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#list-of-command-line-flags to get more information about supported command-line flags\n# \n# If you use IPv6 pleas add \"-enableTCP6\" to args line\nARGS=\"-promscrape.config=/etc/victoriametrics/single/scrape.yml -storageDataPath=/var/lib/victoria-metrics-data -retentionPeriod=12 -httpListenAddr=:8428 -graphiteListenAddr=:2003 -opentsdbListenAddr=:4242 -influxListenAddr=:8089 -enableTCP6\"\nEND\ncat < /etc/profile.d/victoriametrics_welcome.sh\n#!/bin/sh\n#\nmyip=$(hostname -I | awk '{print$1}')\n******************************************************************************** \nWelcome to VictoriaMetrics Single.\nTo keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH), 80 (HTTP), and 443 (HTTPS), 8428 (VictoriaMetrics HTTP), 8089 (VictoriaMetrics Influx),\n4242 (VictoriaMetrics OpenTSDB), 2003 (VictoriaMetrics Graphite)\nIn a web browser, you can view:\n * The VictoriaMetrics Quickstart guide: https://kutt.it/1click-quickstart\nOn the server:\n * The default VictoriaMetrics root is located at /var/lib/victoria-metrics-data\n * VictoriaMetrics is running on ports: 8428, 8089, 4242, 2003 and they are bound to the local interface.\n********************************************************************************\n # This image includes version v1.74.0 of VictoriaMetrics. \n # See Release notes https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.70.0\n # Welcome to VictoriaMetrics droplet!\n # Website: https://victoriametrics.com\n # Documentation: https://docs.victoriametrics.com\n # VictoriaMetrics Github : https://github.com/VictoriaMetrics/VictoriaMetrics\n # VictoriaMetrics Slack Community: https://slack.victoriametrics.com\n # VictoriaMetrics Telegram Community: https://t.me/VictoriaMetrics_en\n # VictoriaMetrics config: /etc/victoriametrics/single/victoriametrics.conf\n # VictoriaMetrics scrape config: /etc/victoriametrics/single/scrape.yml\n # VictoriaMetrics UI accessable on: http://your_droplet_public_ipv4:8428/vmui/\nEND\n# Enable UFW and add some rules to it\nsed -e 's|DEFAULT_FORWARD_POLICY=.*|DEFAULT_FORWARD_POLICY=\"ACCEPT\"|g' \\\n -i /etc/default/ufw\nufw allow ssh comment \"SSH port\"\nufw allow http comment \"HTTP port\"\nufw allow https comment \"HTTPS port\"\nufw allow 8428 comment \"VictoriaMetrics Single HTTP port\"\nufw allow 8089/tcp comment \"TCP Influx Listen port for VictoriaMetrics\"\nufw allow 8089/udp comment \"UDP Influx Listen port for VictoriaMetrics\"\nufw allow 2003/tcp comment \"TCP Graphite Listen port for VictoriaMetrics\"\nufw allow 2003/udp comment \"UDP Graphite Listen port for VictoriaMetrics\"\nufw allow 4242 comment \"OpenTSDB Listen port for VictoriaMetrics\"\nufw --force enable\n# Cleaning up\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n# Start VictoriaMetrics\nsystemctl enable vmsingle.service\nsystemctl start vmsingle.service\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]},{"id":662117,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Virtualmin One-Click","description":"Virtualmin One-Click","ordinal":114,"logo_url":"assets/virtualmin.svg","images":["linode/debian10","linode/ubuntu22.04"],"deployments_total":2218,"deployments_active":138,"is_public":true,"mine":false,"created":"2020-08-12T15:46:13","updated":"2023-12-27T00:05:37","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nIFS=$'\\n\\t'\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n# Import the OCA Helper Functions\nsource \n\nfunction install_virtualmin {\n if [ $(cat /etc/os-release | grep -i 'ubuntu' )]; then\n if [ ! $(cat /etc/os-release | grep -i 'lts') ]; then\n printf \"Virtualmin only works with LTS versions of Ubuntu\\n\"\n exit 1;\n fi\n else\n wget http://software.virtualmin.com/gpl/scripts/virtualmin-install.sh -O /root/virtualmin-install.sh && {\n chmod +x /root/virtualmin-install.sh\n /bin/sh /root/virtualmin-install.sh -f -v\n }\n fi\n}\n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Configure firewall and install Fail2Ban\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\nfail2ban_install\n\n# Install Webmin and Virtualmin\nsource \ninstall_virtualmin\n\n# Disable SSL so that everything works\nsed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n# Restart Webmin\nsystemctl restart webmin\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated intrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688903,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VS Code Server One-Click","description":"Visual Studio Code One-Click","ordinal":115,"logo_url":"assets/vscodeserver.svg","images":["linode/debian10"],"deployments_total":5320,"deployments_active":114,"is_public":true,"mine":false,"created":"2020-11-17T21:10:25","updated":"2023-12-28T17:33:24","rev_note":"","script":"#!/usr/bin/env bash\n\n## VS Code Server OCA Script\n\n### UDF Variables\n\n## VS Code Web Password\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n\nfunction get_code_server {\n local -r username=\"$1\" vs_code_ver=\"$2\"\n\n cd \"/home/$username\"\n\n wget \"https://github.com/cdr/code-server/releases/download/v${vs_code_ver}/code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n tar -xf \"code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n mv code-server-*/ bin/\n\n chown -R \"${username}:${username}\" bin/\n chmod +x bin/code-server\n mkdir data/\n chown -R \"${username}:${username}\" data/\n\n cd /root/\n}\n\nfunction enable_code_service {\n local -r vs_code_password=\"$1\" username=\"$2\"\n\n # Set the password in /etc/systemd/system/code-server.service\n cat << EOF > /etc/systemd/system/code-server.service\n[Unit]\nDescription=code-server\nAfter=nginx.service\n[Service]\nUser=$username\nWorkingDirectory=/home/$username\nEnvironment=PASSWORD=$vs_code_password\nExecStart=/home/${username}/bin/code-server --host 127.0.0.1 --user-data-dir /home/${username}/data --auth password\nRestart=always\n[Install]\nWantedBy=multi-user.target\nEOF\n\n # Enable code-server as a service\n systemctl daemon-reload\n systemctl start code-server\n systemctl enable code-server\n}\n\nfunction certbot_standalone {\n local -r email_address=\"$1\" ssl_domain=\"$2\"\n\n # Get an SSL certificate from CertBot\n system_install_package \"certbot\"\n certbot -n certonly --standalone --agree-tos -m \"$email_address\" -d \"$ssl_domain\"\n}\n\nfunction nginx_reverse_proxy {\n local -r ssl_domain=\"$1\"\n\n ## Setup a reverse proxy with Nginx\n system_install_package \"nginx\"\n\n cat << EOF > /etc/nginx/sites-available/code-server\nserver {\n listen 80;\n server_name $ssl_domain;\n # enforce https\n return 301 https://\\$server_name:443\\$request_uri;\n}\nserver {\n listen 443 ssl http2;\n server_name $ssl_domain;\n ssl_certificate /etc/letsencrypt/live/${ssl_domain}/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/${ssl_domain}/privkey.pem;\n location / {\n proxy_pass http://127.0.0.1:8080/;\n proxy_set_header Host \\$host;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection upgrade;\n proxy_set_header Accept-Encoding gzip;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-available/code-server /etc/nginx/sites-enabled\n nginx -t\n systemctl restart nginx\n}\n\n### Install UFW and open the needed firewall ports\nufw allow 80,443/tcp\n\n### Install and configure VS Code Server\nget_code_server \"$USERNAME\" \"$VS_CODE_VER\"\nenable_code_service \"$VS_CODE_PASSWORD\" \"$USERNAME\"\ncheck_dns_propagation \"$FQDN\" \"$IP\"\ncertbot_standalone \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\nnginx_reverse_proxy \"$FQDN\"\n\n### Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"vs_code_password","label":"The password to login to the VS Code Web UI"},{"name":"vs_code_ver","label":"The version of VS Code Server you'd like installed","default":"3.10.2"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"disable_root","label":"Would you like to disable root login over SSH? (Recommended)","oneof":"Yes,No","default":"Yes"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address for your VirtualHost configuration, DNS records (If Required), and SSL certificates (If Required)."},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above","oneof":"Yes,No","default":"No"}]},{"id":923037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WarpSpeed One-Click","description":"WarpSpeed One-Click","ordinal":116,"logo_url":"assets/warpspeed.svg","images":["linode/ubuntu20.04"],"deployments_total":888,"deployments_active":14,"is_public":true,"mine":false,"created":"2021-10-18T01:12:49","updated":"2023-12-27T15:34:40","rev_note":"","script":"#!/bin/bash\nset -o errexit\nset -o nounset\nset -o pipefail\nset -o xtrace\n\n# \n# \n# \n# \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=\"noninteractive\"\napt-get \\\n -o 'Acquire::ForceIPv4=true' \\\n --yes \\\n update\n\napt-get \\\n -o 'DPkg::options::=--force-confdef' \\\n -o 'DPkg::options::=--force-confold' \\\n --yes \\\n install grub-pc\n\napt-get \\\n -o Acquire::ForceIPv4=true \\\n --yes \\\n update\n# # END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Handle the arguments.\nWIRESPEED_ADMIN_EMAIL=\"$(echo -e \"${WIRESPEED_ADMIN_EMAIL}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"$(echo -e \"${WIRESPEED_HTTP_HOST}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//\\//}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//https:/}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//http:/}\"\n\nif [[ -z \"${WIRESPEED_ADMIN_EMAIL}\" ]]; then\n echo \"Missing required parameter: admin email\"\n exit 101\nfi\n\nif [[ -z \"${WIRESPEED_HTTP_HOST}\" ]]; then\n echo \"Missing required parameter: http host\"\n exit 102\nfi\n\nif [[ -z \"${WIRESPEED_DATA_DIR}\" ]]; then\n WIRESPEED_DATA_DIR=\"/wirespeed\"\nfi\n\n# Set hostname\nIP=\"$(hostname --all-ip-addresses | awk '{ print $1 }')\"\nhostnamectl set-hostname \"${WIRESPEED_HTTP_HOST}\"\necho \"${IP} ${WIRESPEED_HTTP_HOST}\" >>/etc/hosts\n\nwget https://bunker.services/wirespeed-installer.sh\nchmod +x wirespeed-installer.sh\n./wirespeed-installer.sh \\\n \"${WIRESPEED_HTTP_HOST}\" \\\n \"${WIRESPEED_DATA_DIR}\" \\\n \"${WIRESPEED_ADMIN_EMAIL}\" \\\n \"${WIRESPEED_ADMIN_PASSWORD}\" \\\n --non-interactive\n\n# Force IPv4 and noninteractive upgrade after script runs to prevent breaking nf_conntrack for UFW\necho 'Acquire::ForceIPv4 \"true\";' >/etc/apt/apt.conf.d/99force-ipv4\napt-get upgrade --yes\n\nfor file in /root/StackScript /root/ssinclude* /root/wirespeed-installer.sh; do\n rm \"${file}\"\ndone\n\necho 'WireSpeed Installation complete!'","user_defined_fields":[{"name":"wirespeed_admin_email","label":"Admin Email","default":"","example":"it@example.com"},{"name":"wirespeed_admin_password","label":"Admin Password","default":"","example":"Password"},{"name":"wirespeed_http_host","label":"DNS Name","default":"","example":"vpn.example.com"},{"name":"wirespeed_data_dir","label":"Data Directory","default":"/wirespeed","example":"/wirespeed"}]},{"id":913276,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Wazuh One-Click","description":"Wazuh One-Click","ordinal":117,"logo_url":"assets/wazuh.svg","images":["linode/ubuntu22.04"],"deployments_total":5611,"deployments_active":825,"is_public":true,"mine":false,"created":"2021-09-30T18:27:36","updated":"2023-12-28T19:27:04","rev_note":"","script":"#!/bin/bash\n\n# #\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings \n#\n#\n#\n\n## Enable logging\n# set -o pipefail\nset -x\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# UFW https://documentation.wazuh.com/current/getting-started/architecture.html\nufw allow 1514\nufw allow 1515\nufw allow 1516\nufw allow 514\nufw allow 55000\nufw allow 443\nufw allow 80\nufw allow 9200\nufw allow 9300\n\n# NGINX\napt install git nginx certbot python3-certbot-nginx -y\n\nmkdir -p /var/www/certs/.well-known\nchown -R www-data:www-data /var/www/certs/\ncat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\nln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\nunlink /etc/nginx/sites-enabled/default\nsystemctl restart nginx\n\n# SSL Certbot\n#certbot certonly --agree-tos --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n\nfunction get_cert {\n if [ \"$1\" == \"dry_run\" ]; then\n certbot certonly --dry-run --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n elif [ \"$1\" == \"run\" ]; then\n certbot certonly --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n fi\n}\n\nfunction propagate {\n while [[ $count -le $retries ]]; do\n echo \"[Info] Let's Encrypt validation failed. Retrying...\"\n sleep 5\n count=$(( $count + 1 ))\n get_cert dry_run\n\n if [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful..\"\n get_cert run\n return 0\n \n fi\n\n # no more retries left. Exit\n if [[ $count -eq $retries ]]; then\n echo \"[Error] Unable to get Let's Encrypt certificate for $FQDN\"\n return 1\n fi\n done\n}\n\ncount=1\nretries=24\nget_cert dry_run\nif [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful. Getting certificate\"\n get_cert run\nelse\n propagate\nfi\n\n# reorder Wazuh script\ncurl -sO https://packages.wazuh.com/4.4/wazuh-install.sh && sudo bash ./wazuh-install.sh -a \ntar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt >> .deployment-secrets.txt\n\n# Set Variables\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\n\n# Place certificates in /etc/wazuh-dashboard/certs/\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\n\n# Restart Kibana\nservice wazuh-dashboard restart\n\n# Create Cert renewal cron script\ncat </root/certbot-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & Kibana\n# Debug\n# set -xo pipefail\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\nservice wazuh-dashboard restart\nEND\n\nchmod +x /root/certbot-renewal.sh\n\n# Setup Cron\ncrontab -l > cron\necho \"* 1 * * 1 bash /root/certbot-renewal.sh\" >> cron\ncrontab cron\nrm cron\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":662116,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webmin One-Click","description":"Webmin One-Click","ordinal":118,"logo_url":"assets/webmin.svg","images":["linode/debian10"],"deployments_total":1209,"deployments_active":34,"is_public":true,"mine":false,"created":"2020-08-12T15:41:21","updated":"2023-12-27T14:09:52","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n#Check if the script is being sourced by another script\n[[ $_ != $0 ]] && readonly SOURCED=1\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction webmin_install {\n # Install webmin\n echo \"deb http://download.webmin.com/download/repository sarge contrib\" >> /etc/apt/sources.list\n wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add\n system_update\n system_install_package \"webmin\"\n}\n\nfunction webmin_configure {\n local -r email_address=\"$1\"\n local -r fqdn=\"$2\"\n\n # Configure the Virtual Host\n cat < /etc/apache2/sites-available/\"${fqdn}.conf\"\n\n ServerAdmin ${email_address}\n ServerName ${fqdn}\n ProxyPass / http://localhost:10000/\n ProxyPassReverse / http://localhost:10000/\n\nEOF\n # Disable SSL in Webmin so Apache can handle it instead\n sed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n # Add FQDN to the list of allowed domains\n echo \"referers=${fqdn}\" >> /etc/webmin/config\n\n # Restart Webmin\n systemctl restart webmin\n\n # Enable proxy_http module\n a2enmod proxy_http\n systemctl restart apache2\n\n # Enable the Virtual Host\n a2ensite \"${fqdn}\"\n systemctl reload apache2\n}\n\n\n# Open the needed firewall ports\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\n\n# Make sure unzip is installed, or else the webmin install will fail\n[ ! -x /usr/bin/unzip ] && system_install_package \"unzip\"\n\n# \"${package_list[@]}\" contains a list of packages to be installed on the system\npackage_list=(\n \"gnupg1\" \\\n \"python\" \\\n \"apt-show-versions\" \\\n \"libapt-pkg-perl\" \\\n \"libauthen-pam-perl\" \\\n \"libio-pty-perl\" \\\n \"libnet-ssleay-perl\"\n)\n\n# Install all of the packages specified in ${package_list[@]}\nsystem_install_package \"${package_list[@]}\"\n\n# Intall Webmin\nwebmin_install\napache_install\nwebmin_configure \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\n\n# Install SSL Certificate - NOT READY YET\n#certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n## Cleanup before exiting\nif [ \"$SOURCED\" -ne 1 ]; then\n stackscript_cleanup\nfi","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webuzo One-Click","description":"Webuzo One-Click","ordinal":119,"logo_url":"assets/webuzo.svg","images":["linode/ubuntu20.04"],"deployments_total":920,"deployments_active":20,"is_public":true,"mine":false,"created":"2020-11-17T21:04:21","updated":"2023-12-27T14:19:40","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library & Helpers\nsource \nsource \nsource \nsource \n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n# Install Prereq's & Services\napt install -y wget\nwget -N http://files.webuzo.com/install.sh\nchmod +x install.sh\n./install.sh\nsleep 2\nsystemctl start webuzo.service\n\n# firewall\nufw allow 25\nufw allow 53\nufw allow 587\nufw allow 2002\nufw allow 2003\nufw allow 2004\nufw allow 2005\n\n# Cleanup \nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":401706,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WireGuard® One-Click","description":"WireGuard One-Click","ordinal":120,"logo_url":"assets/Wireguard.svg","images":["linode/ubuntu22.04"],"deployments_total":9474,"deployments_active":295,"is_public":true,"mine":false,"created":"2019-03-08T21:11:36","updated":"2023-12-28T16:08:20","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n# \n\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### Set hostname, Apt configuration and update/upgrade\n\nset_hostname\napt_setup_update\n\napt install wireguard wireguard-tools linux-headers-$(uname -r) -y\n\nif [[ \"$PORT\" != \"51820\" ]]; then\n PORT=\"$PORT\"\nfi\n\n# Wireguard\n\nwg genkey | tee ~/wg-private.key | wg pubkey > ~/wg-public.key\n\nPRIVATEKEY=`cat ~/wg-private.key`\n\ncat </etc/wireguard/wg0.conf\n[Interface]\nPrivateKey = $PRIVATEKEY\nAddress = $PRIVATEIP\nListenPort = $PORT\nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -A FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -D FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\nSaveConfig = true\n[Peer]\nPublicKey = $PEERPUBKEY\nAllowedIPs = $PRIVATEIP_CLIENT\nEndpoint = $ENDPOINT:$PORT\nEND\n\n### Enable Port Forwarding\nsed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf\nsysctl -p /etc/sysctl.conf\nsysctl --system\n\n### Services\n\n# wg-quick up wg0. #### Removed to let systemctl manage the service\nsystemctl enable wg-quick@wg0\nsystemctl start wg-quick@wg0\nwg show\nufw_install\nufw allow \"$PORT\"/udp\nufw enable\n\nsystemctl restart wg-quick@wg0\n\nstackscript_cleanup","user_defined_fields":[{"name":"port","label":"Port","example":"51820","default":"51820"},{"name":"privateip","label":"Tunnel IP","example":"10.0.0.1/24, 172.16.0.1/24, 192.168.1.1/24, etc","default":"10.0.1.1/24"},{"name":"peerpubkey","label":"WireGuard Public Key (Client)","default":""},{"name":"privateip_client","label":"Tunnel IP (Client)","example":"10.0.0.2/24, 172.16.0.2/24, 192.168.1.2/24 etc","default":"10.0.1.2/24"},{"name":"endpoint","label":"Endpoint IP (Client)","default":""}]},{"id":401708,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WooCommerce One-Click","description":"WooCommerce One-Click","ordinal":121,"logo_url":"assets/WooCommerce.svg","images":["linode/ubuntu22.04"],"deployments_total":4370,"deployments_active":213,"is_public":true,"mine":false,"created":"2019-03-08T21:12:57","updated":"2023-12-27T03:13:32","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-woocommerce\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":741207,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Yacht One-Click","description":"Yacht One-Click","ordinal":122,"logo_url":"assets/yacht.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":990,"deployments_active":17,"is_public":true,"mine":false,"created":"2021-01-26T21:52:26","updated":"2023-12-27T22:07:20","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Yacht Settings \n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-yacht\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # yacht vars\n \n if [[ -n ${YEMAIL} ]]; then\n echo \"yemail: ${YEMAIL}\" >> ${group_vars};\n fi\n\n if [[ -n ${COMPOSE_SUPPORT} ]]; then\n echo \"compose_support: ${COMPOSE_SUPPORT}\" >> ${group_vars};\n fi\n\n if [[ -n ${YTHEME} ]]; then\n echo \"yacht_theme: ${YTHEME}\" >> ${group_vars};\n fi\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"yemail","label":"Yacht Email","example":"admin@yacht.local","default":"admin@yacht.local"},{"name":"compose_support","label":"Yacht Compose Support","example":"Yes","default":"Yes","oneof":"Yes,No"},{"name":"ytheme","label":"Yacht Theme","example":"Default","default":"Default","oneof":"Default,RED,OMV"}]},{"id":741208,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Zabbix One-Click","description":"Zabbix One-Click","ordinal":123,"logo_url":"assets/zabbix.svg","images":["linode/centos-stream8"],"deployments_total":1815,"deployments_active":80,"is_public":true,"mine":false,"created":"2021-01-26T21:56:54","updated":"2023-12-28T12:33:09","rev_note":"","script":"#!/bin/bash\n\n# \n\nsource \n\nsystem_set_hostname \"$HOSTNAME\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Generate files\nmkdir -p /etc/my.cnf.d/\nmkdir -p /etc/nginx/conf.d/\nmkdir -p /etc/php-fpm.d/\nmkdir -p /etc/php.d/\n# mkdir -p /etc/profile.d/\nmkdir -p /etc/motd.d/\nmkdir -p /etc/zabbix/web/\nmkdir -p /var/lib/cloud/scripts/per-instance\n\ncat </etc/my.cnf.d/zabbix.cnf\n[mysqld]\nuser = mysql\nlocal_infile = 0\n\ndatadir = /var/lib/mysql/\n\ndefault-storage-engine = InnoDB\nskip-name-resolve\nkey_buffer_size = 32M\nmax_allowed_packet = 128M\ntable_open_cache = 1024\ntable_definition_cache = 1024\nmax_connections = 2000\njoin_buffer_size = 1M\nsort_buffer_size = 2M\nread_buffer_size = 256K\nread_rnd_buffer_size = 256K\nmyisam_sort_buffer_size = 1M\nthread_cache_size = 512\nopen_files_limit = 10000\nwait_timeout = 86400\n\noptimizer_switch=index_condition_pushdown=off\n\ntmp_table_size = 32M\nmax_heap_table_size = 32M\n\nbinlog_format=mixed\nbinlog_cache_size = 32M\nmax_binlog_size = 256M\nbinlog_expire_logs_seconds = 259200\n\n# innodb_page_size = 32K\ninnodb_buffer_pool_size = 512M\ninnodb_log_file_size = 256M\ninnodb_log_buffer_size = 64M\ninnodb_file_per_table = 1\ninnodb_flush_method = O_DIRECT\ninnodb_buffer_pool_instances = 4\ninnodb_write_io_threads = 4\ninnodb_read_io_threads = 4\ninnodb_adaptive_flushing = 1\ninnodb_lock_wait_timeout = 50\n\ninnodb_flush_log_at_trx_commit = 1\n\ninnodb_io_capacity = 300\ninnodb_io_capacity_max = 400\ninnodb_flush_neighbors = 0\n\ninnodb_doublewrite = 1\ninnodb_thread_concurrency = 0\n\ninnodb_purge_threads = 1\n\nserver_id = 1\nbinlog_checksum = crc32\n\ninnodb_lru_scan_depth = 512\n\ninnodb_stats_on_metadata = 0\n\nEND\n\ncat </etc/nginx/conf.d/zabbix_ssl.conf\nserver {\n listen 0.0.0.0:443 ssl http2;\n # server_name ;\n index index.php;\n\n root \\$webroot;\n charset utf8;\n set \\$webroot '/usr/share/zabbix';\n\n access_log /var/log/nginx/zabbix_access_ssl.log main;\n error_log /var/log/nginx/zabbix_error_ssl.log error;\n\n ssl_stapling on;\n ssl_stapling_verify on;\n\n #resolver 192.168.13.160 192.168.10.24;\n\n ssl_certificate /etc/ssl/certs/zabbix_example.crt;\n ssl_certificate_key /etc/ssl/private/zabbix_example.key;\n\n ssl_dhparam /etc/ssl/private/zabbix_dhparam.pem;\n\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_verify_depth 3;\n #ssl_ciphers HIGH:!aNULL:!MD5;\n ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;\n #ssl_session_cache shared:SSL:10m;\n ssl_session_cache shared:MozSSL:10m;\n ssl_session_timeout 1d;\n ssl_prefer_server_ciphers off;\n ssl_session_tickets off;\n\n add_header Strict-Transport-Security \"max-age=63072000\" always;\n add_header Content-Security-Policy-Report-Only \"default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report\";\n\n location = /favicon.ico {\n log_not_found off;\n }\n\n location / {\n index index.php;\n try_files \\$uri \\$uri/ =404;\n }\n\n location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {\n access_log off;\n expires 10d;\n }\n\n location ~ /\\.ht {\n deny all;\n }\n\n location ~ /(api\\/|conf[^\\.]|include|locale) {\n deny all;\n return 404;\n }\n\n location ~ [^/]\\.php(/|$) {\n fastcgi_pass unix:/run/php-fpm/zabbix.sock;\n fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n fastcgi_index index.php;\n\n fastcgi_param DOCUMENT_ROOT /usr/share/zabbix;\n fastcgi_param SCRIPT_FILENAME /usr/share/zabbix\\$fastcgi_script_name;\n fastcgi_param PATH_TRANSLATED /usr/share/zabbix\\$fastcgi_script_name;\n\n include fastcgi_params;\n fastcgi_param QUERY_STRING \\$query_string;\n fastcgi_param REQUEST_METHOD \\$request_method;\n fastcgi_param CONTENT_TYPE \\$content_type;\n fastcgi_param CONTENT_LENGTH \\$content_length;\n\n fastcgi_intercept_errors on;\n fastcgi_ignore_client_abort off;\n fastcgi_connect_timeout 60;\n fastcgi_send_timeout 180;\n fastcgi_read_timeout 180;\n fastcgi_buffer_size 128k;\n fastcgi_buffers 4 256k;\n fastcgi_busy_buffers_size 256k;\n fastcgi_temp_file_write_size 256k;\n }\n}\n\nEND\n\ncat </etc/nginx/conf.d/zabbix.conf\nserver {\n listen 0.0.0.0:80;\n # server_name zabbix;\n\n return 301 https://\\$host\\$request_uri;\n}\n\nEND\n\ncat </etc/nginx/nginx.conf\n# For more information on configuration, see:\n# * Official English Documentation: http://nginx.org/en/docs/\n# * Official Russian Documentation: http://nginx.org/ru/docs/\n\nuser nginx;\nworker_processes auto;\nworker_priority -5;\nworker_rlimit_nofile 256000;\n\nerror_log /var/log/nginx/error.log;\n\npid /run/nginx.pid;\n\n# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.\ninclude /usr/share/nginx/modules/*.conf;\n\nevents {\n worker_connections 5120;\n use epoll;\n multi_accept on;\n}\n\n\nhttp {\n include /etc/nginx/mime.types;\n default_type application/octet-stream;\n\n log_format main\n '\\$http_x_forwarded_for - \\$remote_user [\\$time_local] '\n '\"\\$request\" \\$status \\$bytes_sent '\n '\"\\$http_referer\" \"\\$http_user_agent\" '\n '\"\\$gzip_ratio\"';\n\n access_log /var/log/nginx/access.log main;\n\n open_file_cache max=200000 inactive=20s;\n open_file_cache_valid 30s;\n open_file_cache_min_uses 2;\n open_file_cache_errors on;\n\n limit_conn_zone \\$binary_remote_addr zone=perip:10m;\n limit_conn_zone \\$server_name zone=perserver:10m;\n\n client_header_timeout 5m;\n client_body_timeout 5m;\n send_timeout 5m;\n\n connection_pool_size 4096;\n client_header_buffer_size 4k;\n large_client_header_buffers 4 4k;\n request_pool_size 4k;\n\n reset_timedout_connection on;\n\n\n gzip on;\n gzip_min_length 100;\n gzip_buffers 4 8k;\n gzip_comp_level 5;\n gzip_types text/plain text/css text/xml application/x-javascript application/xml application/xhtml+xml;\n\n types_hash_max_size 2048;\n\n output_buffers 128 512k;\n postpone_output 1460;\n aio on;\n directio 512;\n\n sendfile on;\n client_max_body_size 8m;\n fastcgi_intercept_errors on;\n\n tcp_nopush on;\n tcp_nodelay on;\n\n keepalive_timeout 75 20;\n\n ignore_invalid_headers on;\n\n index index.php;\n server_tokens off;\n\n # Load modular configuration files from the /etc/nginx/conf.d directory.\n # See http://nginx.org/en/docs/ngx_core_module.html#include\n # for more information.\n include /etc/nginx/conf.d/*.conf;\n}\n\nEND\n\ncat </etc/php-fpm.d/zabbix.conf\n[zabbix]\nuser = apache\ngroup = apache\n\nlisten = /run/php-fpm/zabbix.sock\nlisten.acl_users = apache,nginx\nlisten.allowed_clients = 127.0.0.1\n\npm = dynamic\npm.max_children = 50\npm.start_servers = 5\npm.min_spare_servers = 5\npm.max_spare_servers = 35\n\nphp_value[session.save_handler] = files\nphp_value[session.save_path] = /var/lib/php/session\n\nphp_value[max_execution_time] = 300\nphp_value[memory_limit] = 128M\nphp_value[post_max_size] = 16M\nphp_value[upload_max_filesize] = 2M\nphp_value[max_input_time] = 300\nphp_value[max_input_vars] = 10000\n; php_value[date.timezone] = Europe/Riga\nEND\n\n# cat </etc/php.d/99-zabbix.ini\n# max_execution_time=300\n# memory_limit=128M\n# post_max_size=16M\n# upload_max_filesize=2M\n# max_input_time=300\n# always_populate_raw_post_data=-1\n# max_input_vars=10000\n# date.timezone=UTC\n# session.save_path=/var/lib/php/\n# END\n\n# cat </etc/profile.d/zabbix_welcome.sh\n# #!/bin/sh\n# #\n# myip=\\$(hostname -I | awk '{print\\$1}')\n# cat </etc/motd.d/zabbix\n********************************************************************************\n\nZabbix frontend credentials:\n\nUsername: Admin\n\nPassword: replace_password\n\n\nTo learn about available professional services, including technical suppport and training, please visit https://www.zabbix.com/services\n\nOfficial Zabbix documentation available at https://www.zabbix.com/documentation/current/\n\n\n********************************************************************************\nEND\n\n# cat </etc/systemd/system/zabbix-instance-init.service\n# [Unit]\n# After=mariadb.service\n\n# [Service]\n# ExecStart=/var/lib/cloud/scripts/per-instance/001-zabbix\n\n# [Install]\n# WantedBy=multi-user.target\n# END\n\n# cat </etc/yum.repos.d/MariaDB.repo\n# # MariaDB 10.3 CentOS repository list - created 2019-03-28 10:57 UTC\n# # http://downloads.mariadb.org/mariadb/repositories/\n# [mariadb]\n# name = MariaDB\n# baseurl = http://yum.mariadb.org/10.2/centos7-amd64\n# gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB\n# gpgcheck=1\n# END\n\ncat </etc/yum.repos.d/Nginx.repo\n[nginx-stable]\nname=nginx stable repo\nbaseurl=http://nginx.org/packages/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=1\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\n\n[nginx-mainline]\nname=nginx mainline repo\nbaseurl=http://nginx.org/packages/mainline/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=0\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\nEND\n\ncat </etc/zabbix/web/zabbix.conf.php\n 'http://localhost:9200',\n//\t'text' => 'http://localhost:9200'\n//];\n// Value types stored in Elasticsearch.\n//\\$HISTORY['types'] = ['uint', 'text'];\n\n// Used for SAML authentication.\n// Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings.\n//\\$SSO['SP_KEY']\t\t\t= 'conf/certs/sp.key';\n//\\$SSO['SP_CERT']\t\t\t= 'conf/certs/sp.crt';\n//\\$SSO['IDP_CERT']\t\t= 'conf/certs/idp.crt';\n//\\$SSO['SETTINGS']\t\t= [];\nEND\n\ncat </tmp/zabbix_server_custom.te\nmodule zabbix_server_custom 1.2;\nrequire {\n type zabbix_var_run_t;\n type tmp_t;\n type zabbix_t;\n class sock_file { create unlink write };\n class unix_stream_socket connectto;\n class process setrlimit;\n class capability dac_override;\n}\n#============= zabbix_t ==============\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:process setrlimit;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:unix_stream_socket connectto;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t tmp_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t zabbix_var_run_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:capability dac_override;\nEND\n\n# Installing RPM packages\nyum makecache\nyum -y upgrade\nyum -y install wget\nwget https://dev.mysql.com/get/mysql80-community-release-el8-3.noarch.rpm\ndnf -y install mysql80-community-release-el8-3.noarch.rpm\ndnf -y module disable mysql\ndnf -y install https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm\ndnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\ndnf -y install epel-release\ndnf -y module enable php:remi-8.1\nyum -y install cloud-init cloud-utils-growpart firewalld nginx php-fpm mysql-community-client mysql-community-server java-1.8.0-openjdk-headless zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent zabbix-get zabbix-sender zabbix-java-gateway zabbix-js\n\n\n# Configure firewalld\nsystemctl enable firewalld\nsystemctl start firewalld\nfirewall-cmd --permanent --add-service=ssh --zone=public\nfirewall-cmd --permanent --add-service=http --zone=public\nfirewall-cmd --permanent --add-service=https --zone=public\nfirewall-cmd --permanent --add-port=10051/tcp --zone=public\nfirewall-cmd --reload\n\n# Configure SELinux\nrm -rf /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.pp\ncheckmodule -M -m -o /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.te\nsemodule_package -o /tmp/zabbix_server_custom.pp -m /tmp/zabbix_server_custom.mod\nsemodule -i /tmp/zabbix_server_custom.pp\n\nsetsebool -P httpd_can_connect_zabbix=1\nsetsebool -P zabbix_can_network=1\n\n# Generate SSL certificate\nmkdir -p /etc/ssl/private\nopenssl dhparam -out /etc/ssl/private/zabbix_dhparam.pem 2048\n\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/zabbix_example.key \\\n -out /etc/ssl/certs/zabbix_example.crt -subj \"/C=LV/ST=Riga/L=Riga/O=Global Security/OU=IT Department/CN=example.zabbix.com\"\n\n# Configure Zabbix instance\nsystemctl enable mysqld\nsystemctl disable nginx\nsystemctl disable php-fpm\nsystemctl disable zabbix-server\nsystemctl enable zabbix-agent\nsystemctl enable zabbix-java-gateway\n\nsystemctl stop nginx php-fpm\n\necho \"Requires=multi-user.target\" >> /usr/lib/systemd/system/cloud-init.target\n\nsystemctl set-default cloud-init.target\n\nchown -R apache:apache /var/lib/php/\n\nchmod g+r /etc/zabbix/zabbix_server.conf\nchmod o+w /run/zabbix/\n\nchmod 755 /etc/my.cnf\nchmod -R 755 /etc/my.cnf.d/\n\nsed -i 's/^#PrintMotd yes/&\\nPrintMotd no/g' /etc/ssh/sshd_config\n\nsed -i '/^; php_value\\[date.timezone\\] /s/^; //' /etc/php-fpm.d/zabbix.conf\n\nsed -i 's/^# JavaGateway=.*/&\\nJavaGateway=127.0.0.1/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# StartJavaPollers=.*/&\\nStartJavaPollers=5/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# LISTEN_IP=.*/&\\nLISTEN_IP=\"127.0.0.1\"/g' /etc/zabbix/zabbix_java_gateway.conf\n\nescape_spec_char() {\n local var_value=$1\n\n var_value=\"${var_value//\\\\/\\\\\\\\}\"\n var_value=\"${var_value//[$'\\n']/}\"\n var_value=\"${var_value//\\//\\\\/}\"\n var_value=\"${var_value//./\\\\.}\"\n var_value=\"${var_value//\\*/\\\\*}\"\n var_value=\"${var_value//^/\\\\^}\"\n var_value=\"${var_value//\\$/\\\\$}\"\n var_value=\"${var_value//\\&/\\\\&}\"\n var_value=\"${var_value//\\[/\\\\[}\"\n var_value=\"${var_value//\\]/\\\\]}\"\n\n echo \"$var_value\"\n}\n\nsystemctl start mysqld\nsystemctl enable mysqld\nsystemctl enable nginx\nsystemctl enable php-fpm\nsystemctl enable zabbix-server\n\nDB_ROOT_TMP_PASS=$(grep 'temporary password' /var/log/mysqld.log | awk '{print $13}' | tail -1)\nWEB_PASS=$(openssl rand -base64 14)\nWEB_PASS=${WEB_PASS%?}\nINST_NAME=$(hostname)\n\nrm -f /root/.my.cnf\n\nDB_ROOT_PASS=$(MYSQL_PWD=\"$DB_ROOT_TMP_PASS\" mysql --connect-expired-password -s -N -e \"SET PASSWORD FOR root@localhost TO RANDOM;\" | awk '{print $3}')\nDB_ZBX_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_srv'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\nDB_ZBXWEB_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_web'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"CREATE DATABASE zabbix CHARACTER SET 'utf8' COLLATE 'utf8_bin'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP, ALTER, INDEX, REFERENCES ON zabbix.* TO 'zabbix_srv'@'localhost'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP ON zabbix.* TO 'zabbix_web'@'localhost'\"\n\ncat > /root/.my.cnf << EOF\n[client]\npassword=\"$DB_ROOT_PASS\"\nEOF\n\nzcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -uroot zabbix\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"UPDATE users SET passwd = MD5('$WEB_PASS') WHERE username = 'Admin'\" zabbix\n\nWEB_PASS=$(escape_spec_char \"$WEB_PASS\")\nsed -i \"s/replace_password/$WEB_PASS/g\" /etc/motd.d/zabbix\n\nsed -i \"s/replace_name/$INST_NAME/g\" /etc/zabbix/web/zabbix.conf.php\n\nDB_ZBX_PASS=$(escape_spec_char \"$DB_ZBX_PASS\")\nDB_ZBXWEB_PASS=$(escape_spec_char \"$DB_ZBXWEB_PASS\")\n\nsed -i \"s/^DBUser=.*/DBUser=zabbix_srv/g\" /etc/zabbix/zabbix_server.conf\nsed -i -e \"/^[#;] DBPassword=/s/.*/&\\nDBPassword=$DB_ZBX_PASS/\" /etc/zabbix/zabbix_server.conf\nsed -i \"s/replace_password/$DB_ZBXWEB_PASS/g\" /etc/zabbix/web/zabbix.conf.php\nsed -i \"s/replace_user/zabbix_web/g\" /etc/zabbix/web/zabbix.conf.php\n\n# Cleaning up remote machine\nrm -rf /etc/nginx/conf.d/default.conf\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n\n\n\nsystemctl start zabbix-server zabbix-agent zabbix-java-gateway\nsystemctl start nginx php-fpm\n\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]}],"page":1,"pages":1,"results":129} \ No newline at end of file +{"data":[{"id":1146319,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster Null One-Click","description":"MongoDB Cluster Null One-Click\r\nNull stackscript for 1067004","ordinal":0,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":38,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-03-23T14:00:01","updated":"2023-10-18T12:38:31","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1146324,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster Null One-Click","description":"Galera Cluster Null One-Click\r\nNull Stackscript for 1088136","ordinal":0,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":148,"deployments_active":15,"is_public":true,"mine":false,"created":"2023-03-23T14:19:14","updated":"2023-12-08T19:36:03","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1142293,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Redis Sentinel Cluster Null One-Click","description":"Redis Sentinel Cluster Null One-Click\r\nNull stackscript for 1132204","ordinal":0,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":171,"deployments_active":8,"is_public":true,"mine":false,"created":"2023-03-16T14:20:59","updated":"2023-11-29T17:28:24","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":1146322,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster Null One-Click","description":"PostgreSQL Cluster Null One-Click\r\nNull Stackscript for 1068726","ordinal":0,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":215,"deployments_active":6,"is_public":true,"mine":false,"created":"2023-03-23T14:17:07","updated":"2023-12-12T10:46:19","rev_note":"","script":"#!/bin/bash\n\n# Null","user_defined_fields":[]},{"id":1226546,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Null One-Click","description":"Nomad Cluster Null One-Click","ordinal":0,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":378,"deployments_active":12,"is_public":true,"mine":false,"created":"2023-08-25T19:08:21","updated":"2023-11-29T10:42:40","rev_note":"","script":"#!/bin/bash/","user_defined_fields":[]},{"id":1226547,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster Clients Null One-Click","description":"Nomad Cluster Clients One-Click","ordinal":0,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":407,"deployments_active":18,"is_public":true,"mine":false,"created":"2023-08-25T19:08:57","updated":"2023-11-29T10:45:14","rev_note":"","script":"#!/bin/bash","user_defined_fields":[]},{"id":401697,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WordPress One-Click","description":"Wordpress One Click App","ordinal":1,"logo_url":"assets/WordPress.svg","images":["linode/ubuntu22.04"],"deployments_total":65125,"deployments_active":4799,"is_public":true,"mine":false,"created":"2019-03-08T21:04:07","updated":"2023-12-12T15:12:42","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-wordpress\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":632758,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Nextcloud One-Click","description":"One Click App - Nextcloud","ordinal":2,"logo_url":"assets/nextcloud.svg","images":["linode/ubuntu22.04"],"deployments_total":19114,"deployments_active":843,"is_public":true,"mine":false,"created":"2020-02-18T16:40:45","updated":"2023-12-12T16:02:03","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n\n# Install docker\ncurl -fsSL https://get.docker.com | sudo sh\n\n# Adjust permissions\nsudo mkdir -p /mnt/ncdata\nsudo chown -R 33:0 /mnt/ncdata\n\n# Install Nextcloud\nsudo docker run -d \\\n--init \\\n--name nextcloud-aio-mastercontainer \\\n--restart always \\\n-p 80:80 \\\n-p 8080:8080 \\\n-p 8443:8443 \\\n-e NEXTCLOUD_MOUNT=/mnt/ \\\n-e NEXTCLOUD_DATADIR=/mnt/ncdata \\\n--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \\\n--volume /var/run/docker.sock:/var/run/docker.sock:ro \\\nnextcloud/all-in-one:latest\n\n# Some Info\ncat << EOF > /etc/motd\n # # ###### # # ##### #### # #### # # #####\n ## # # # # # # # # # # # # # #\n # # # ##### ## # # # # # # # # #\n # # # # ## # # # # # # # # #\n # ## # # # # # # # # # # # # #\n # # ###### # # # #### ###### #### #### #####\nIf you point a domain to this server ($(hostname -I | cut -f1 -d' ')), you can open the admin interface at https://yourdomain.com:8443\nOtherwise you can open the admin interface at https://$(hostname -I | cut -f1 -d' '):8080\n \nFurther documentation is available here: https://github.com/nextcloud/all-in-one\nEOF\n\n# Install unattended upgrades\nsudo apt-get install unattended-upgrades -y\n\n# firewall\nufw allow 80\nufw allow 443\nufw allow 8080\nufw allow 8443\nufw allow 3478\n\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA email address","default":""}]},{"id":1017300,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kali Linux One-Click","description":"Kali Linux One-Click","ordinal":3,"logo_url":"assets/kalilinux.svg","images":["linode/kali"],"deployments_total":16968,"deployments_active":485,"is_public":true,"mine":false,"created":"2022-06-21T14:38:37","updated":"2023-12-12T15:23:22","rev_note":"","script":"#!/bin/bash\n## Kali\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction headlessoreverything {\n if [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"Yes\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $EVERYTHING == \"Yes\" ] && [ $HEADLESS == \"No\" ]; then\n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-everything -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"Yes\" ] && [ $EVERYTHING == \"No\" ]; then \n DEBIAN_FRONTEND=noninteractive apt-get install kali-linux-headless -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n elif [ $HEADLESS == \"No\" ] && [ $EVERYTHING == \"No\" ]; then \n echo \"No Package Selected\"\n fi\n}\n\nfunction vncsetup {\n if [ $VNC == \"Yes\" ]; then \n ## XFCE & VNC Config\n apt-get install xfce4 xfce4-goodies dbus-x11 tigervnc-standalone-server expect -y -yq -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"\n\n readonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\n sleep 2\n killvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\n kill $killvncprocess\n touch /etc/systemd/system/vncserver@.service\n cat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start vncserver@1.service\n systemctl enable vncserver@1.service\n\n cat < /etc/motd\n###################################\n# VNC SSH Tunnel Instructions #\n###################################\n\n* Ensure you have a VNC Client installed on your local machine\n* Run the command below to start the SSH tunnel for VNC \n\n ssh -L 61000:localhost:5901 -N -l $USERNAME $FQDN\n\n* For more Detailed documentation please visit the offical Documentation below\n\n https://www.linode.com/docs/products/tools/marketplace/guides/kalilinux\n\n### To remove this message, you can edit the /etc/motd file ###\nEOF\n fi\n}\n\nfunction main {\n headlessoreverything\n vncsetup\n stackscript_cleanup\n}\n\nmain","user_defined_fields":[{"name":"everything","label":"Would you like to Install the Kali Everything Package?","oneof":"Yes,No","default":"Yes"},{"name":"headless","label":"Would you like to Install the Kali Headless Package?","oneof":"Yes,No","default":"No"},{"name":"vnc","label":"Would you like to setup VNC to access Kali XFCE Desktop","oneof":"Yes,No","default":"Yes"},{"name":"username","label":"The VNC user to be created for the Linode. The username accepts only lowercase letters, numbers, dashes (-) and underscores (_)"},{"name":"password","label":"The password for the limited VNC user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA records (Requires API token)","default":""}]},{"id":593835,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plesk One-Click","description":"Plesk is the leading secure WordPress and website management platform. This Stackscript installs the latest publicly available Plesk, activates a trial license, installs essential extensions, and sets up and configures the firewall. Please allow the script around 15 minutes to finish.","ordinal":4,"logo_url":"assets/plesk.svg","images":["linode/centos7","linode/ubuntu20.04"],"deployments_total":10526,"deployments_active":482,"is_public":true,"mine":false,"created":"2019-09-26T17:34:17","updated":"2023-12-12T10:41:10","rev_note":"updated wording","script":"#!/bin/bash\n# This block defines the variables the user of the script needs to input\n# when deploying using this script.\n#\n## Enable logging\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction pleskautoinstall {\n echo \"Downloading Plesk Auto-Installer\"\n sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)\n echo \"turning on http2\"\n /usr/sbin/plesk bin http2_pref --enable\n}\n\nfunction firewall {\n echo \"Setting Firewall to allow proper ports.\"\n if [ \"${detected_distro[distro]}\" = 'centos' ]; then \n iptables -I INPUT -p tcp --dport 21 -j ACCEPT\n iptables -I INPUT -p tcp --dport 22 -j ACCEPT\n iptables -I INPUT -p tcp --dport 25 -j ACCEPT\n iptables -I INPUT -p tcp --dport 80 -j ACCEPT\n iptables -I INPUT -p tcp --dport 110 -j ACCEPT\n iptables -I INPUT -p tcp --dport 143 -j ACCEPT\n iptables -I INPUT -p tcp --dport 443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 465 -j ACCEPT\n iptables -I INPUT -p tcp --dport 993 -j ACCEPT\n iptables -I INPUT -p tcp --dport 995 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8443 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8447 -j ACCEPT\n iptables -I INPUT -p tcp --dport 8880 -j ACCEPT\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n ufw allow 21\n ufw allow 22\n ufw allow 25\n ufw allow 80\n ufw allow 110\n ufw allow 143\n ufw allow 443\n ufw allow 465\n ufw allow 993\n ufw allow 995\n ufw allow 8443\n ufw allow 8447\n ufw allow 8880\nelse \necho \"Distro Not supported\"\nfi\n}\n\nfunction main {\n pleskautoinstall\n firewall\n}\n\n# Execute script\nsystem_update\nmain\nstackscript_cleanup","user_defined_fields":[]},{"id":595742,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"cPanel One-Click","description":"cPanel One-Click","ordinal":5,"logo_url":"assets/cpanel.svg","images":["linode/ubuntu20.04","linode/almalinux8","linode/rocky8"],"deployments_total":28203,"deployments_active":995,"is_public":true,"mine":false,"created":"2019-09-30T20:17:52","updated":"2023-12-12T13:47:10","rev_note":"","script":"#!/bin/bash\nset -e\n\n# Commit: fde6587e08ea95321ce010e52a9c1b8d02455a97\n# Commit date: 2023-02-13 17:00:46 -0600\n# Generated: 2023-02-17 11:00:28 -0600\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\necho $(date +%Y%m%d%H%M%S) >> /tmp/cpdebug.log\n\n# Linode's Weblish console will truncate lines unless you do this tput smam. This\n# instructs the terminal to wrap your lines, which is especially important so that\n# the WHM login URL that gets printed at the end can be copied.\ntput smam\n\nsource /etc/os-release\n\nis_os_and_version_id_prefix() {\n [[ $ID == $1 ]] && [[ $VERSION_ID =~ ^$2 ]]\n}\n\nis_almalinux8() {\n is_os_and_version_id_prefix almalinux 8\n}\n\nis_centos7() {\n is_os_and_version_id_prefix centos 7\n}\n\nis_cloudlinux7() {\n is_os_and_version_id_prefix cloudlinux 7\n}\n\nis_cloudlinux8() {\n is_os_and_version_id_prefix cloudlinux 8\n}\n\nis_rocky8() {\n is_os_and_version_id_prefix rocky 8\n}\n\nis_ubuntu20() {\n is_os_and_version_id_prefix ubuntu 20.04\n}\n\nis_supported_os() {\n is_almalinux8 || \\\n is_centos7 || \\\n is_cloudlinux7 || \\\n is_cloudlinux8 || \\\n is_rocky8 || \\\n is_ubuntu20\n}\n\nhas_yum() {\n which yum >/dev/null 2>&1\n}\n\nhas_dnf() {\n which dnf >/dev/null 2>&1\n}\n\nhas_apt() {\n which apt >/dev/null 2>&1\n}\n\nis_networkmanager_enabled() {\n systemctl is-enabled NetworkManager.service > /dev/null 2>&1\n}\n\n# cPanel & WHM is incompatible with NetworkManager\nif is_networkmanager_enabled; then\n systemctl stop NetworkManager.service\n systemctl disable NetworkManager.service\n if has_dnf; then\n dnf -y remove NetworkManager\n elif has_yum; then\n yum -y remove NetworkManager\n fi\nfi\n\nhostnamectl set-hostname server.hostname.tld\n\ncd /home && curl -so installer -L https://securedownloads.cpanel.net/latest\n\nif is_supported_os; then\n if is_ubuntu20; then\n apt-get -o Acquire::ForceIPv4=true update -y\n DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\n sh installer --skiplicensecheck --skip-cloudlinux\n else\n sh installer --skiplicensecheck\n fi\nelse\n echo \"Your distribution is not supported by this StackScript.\"\n install -d -v -m 711 /var/cpanel\n touch /var/cpanel/cpinit.failed\nfi\n\nrm -f /etc/cpupdate.conf\ncat > /root/.bash_profile <<'END_OF_BASH_PROFILE'\n# .bash_profile\n# Get the aliases and functions\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n# User specific environment and startup programs\nPATH=$PATH:$HOME/bin\nexport PATH\nbash /etc/motd.sh\nif [ -t 0 ]; then\n URL=`whmlogin --nowait 2> /dev/null`\n WHMLOGIN_RETURN=$?\n if [ $WHMLOGIN_RETURN == 1 ]; then\n # whmlogin doesn't support --nowait. Output a URL and hope it's accurate.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n whmlogin\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n if [ $WHMLOGIN_RETURN == 2 ]; then\n # whmlogin indicates that cpinit hasn't updated the IP/hostname yet.\n echo \"To log in to WHM as the root user, run the command 'whmlogin' to get a web address for your browser.\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n else\n # whmlogin returned a valid URL to use.\n echo \"To log in to WHM as the root user, visit the following address in your web browser:\"\n echo \"\"\n echo \"$URL\"\n echo \"\"\n echo \"Thank you for using cPanel & WHM!\"\n fi\n fi\nfi\nEND_OF_BASH_PROFILE\n\ncat > /etc/motd.sh <<'END_OF_MOTD'\n#!/bin/bash\nsource /etc/os-release\necho \"\n ____ _ ___ __ ___ _ __ __\n ___| _ \\ __ _ _ __ ___| | ( _ ) \\ \\ / / | | | \\/ |\n / __| |_) / _. | ._ \\ / _ \\ | / _ \\/\\ \\ \\ /\\ / /| |_| | |\\/| |\n| (__| __/ (_| | | | | __/ | | (_> < \\ V V / | _ | | | |\n \\___|_| \\__._|_| |_|\\___|_| \\___/\\/ \\_/\\_/ |_| |_|_| |_|\n\"\necho \"Welcome to cPanel & WHM `/usr/local/cpanel/cpanel -V`\"\necho \"\"\necho \"Running $PRETTY_NAME\"\necho \"\"\necho \"For our full cPanel & WHM documentation: https://go.cpanel.net/docs\"\necho \"\"\necho \"For information on how to quickly set up a website in cPanel & WHM: https://go.cpanel.net/buildasite\"\necho \"\" # This new line makes output from bash_profiles easier to read\nEND_OF_MOTD\ntouch /var/cpanel/cpinit.done","user_defined_fields":[]},{"id":691621,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Cloudron One-Click","description":"Cloudron One-Click","ordinal":6,"logo_url":"assets/cloudron.svg","images":["linode/ubuntu20.04"],"deployments_total":13796,"deployments_active":629,"is_public":true,"mine":false,"created":"2020-11-30T21:21:45","updated":"2023-12-12T08:21:34","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\nwget https://cloudron.io/cloudron-setup\nchmod +x cloudron-setup\n./cloudron-setup --provider linode-mp\n\necho All finished! Rebooting...\n(sleep 5; reboot) &","user_defined_fields":[]},{"id":692092,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Secure Your Server One-Click","description":"Secure Your Server One-Click","ordinal":7,"logo_url":"assets/secureyourserver.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":4687,"deployments_active":717,"is_public":true,"mine":false,"created":"2020-12-03T10:01:28","updated":"2023-12-12T08:01:50","rev_note":"","script":"#!/usr/bin/env bash\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n#\n\n## Block Storage\n#\n#\n\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source Linode Helpers\nsource \nsource \nsource \nsource \n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode. (lower case only)"},{"name":"password","label":"The password for the limited sudo user"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode"},{"name":"disable_root","label":"Would you like to disable root login over SSH?","oneof":"Yes,No"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address. This is used for creating DNS records and website VirtualHost configuration.","default":""},{"name":"send_email","label":"Would you like to be able to send email from this domain? (Requires domain)","oneof":"Yes,No","default":"No"},{"name":"volume","label":"To use a Block Storage volume, enter its name here.","default":""},{"name":"volume_size","label":"If creating a new Block Storage volume, enter its size in GB (NOTE: This creates a billable resource at $0.10/month per GB).","default":""}]},{"id":925722,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pritunl One-Click","description":"Pritunl One-Click","ordinal":8,"logo_url":"assets/pritunl.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":1170,"deployments_active":81,"is_public":true,"mine":false,"created":"2021-10-26T15:23:37","updated":"2023-12-12T15:30:26","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nfail2ban_install\n\n# Mongo Install\napt-get install -y wget gnupg dirmngr \nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Pritunl\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv E162F504A20CDF15827F718D4B7C549A058F8B6B\napt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.pritunl.com/stable/apt buster main\" | tee /etc/apt/sources.list.d/pritunl.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb http://repo.pritunl.com/stable/apt focal main\" | tee /etc/apt/sources.list.d/pritunl.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\n\napt update -y\napt install -y pritunl\n\nsystemctl enable pritunl.service\nsystemctl start pritunl.service\n\n# Performance tune\necho \"* hard nofile 64000\" >> /etc/security/limits.conf\necho \"* soft nofile 64000\" >> /etc/security/limits.conf\necho \"root hard nofile 64000\" >> /etc/security/limits.conf\necho \"root soft nofile 64000\" >> /etc/security/limits.conf\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA record","default":""}]},{"id":741206,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CyberPanel One-Click","description":"CyberPanel One-Click","ordinal":9,"logo_url":"assets/cyberpanel.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":11157,"deployments_active":596,"is_public":true,"mine":false,"created":"2021-01-27T02:46:19","updated":"2023-12-12T14:07:19","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### Install cyberpanel\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/cybersetup.sh )\n\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401709,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Minecraft: Java Edition One-Click","description":"Minecraft OCA","ordinal":10,"logo_url":"assets/Minecraft.svg","images":["linode/ubuntu20.04"],"deployments_total":20418,"deployments_active":345,"is_public":true,"mine":false,"created":"2019-03-08T21:13:32","updated":"2023-12-12T16:04:12","rev_note":"remove maxplayers hard coded options [oca-707]","script":"#!/usr/bin/env bash\n# Game config options:\n# https://minecraft.gamepedia.com/Server.properties\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n## Linode/SSH Security Settings - Required\n#\n#\n## Linode/SSH Settings - Optional\n#\n#\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n# Difficulty\n[[ \"$DIFFICULTY\" = \"Peaceful\" ]] && DIFFICULTY=0\n[[ \"$DIFFICULTY\" = \"Easy\" ]] && DIFFICULTY=1\n[[ \"$DIFFICULTY\" = \"Normal\" ]] && DIFFICULTY=2\n[[ \"$DIFFICULTY\" = \"Hard\" ]] && DIFFICULTY=3\n\n# Gamemode\n[[ \"$GAMEMODE\" = \"Survival\" ]] && GAMEMODE=0\n[[ \"$GAMEMODE\" = \"Creative\" ]] && GAMEMODE=1\n[[ \"$GAMEMODE\" = \"Adventure\" ]] && GAMEMODE=2\n[[ \"$GAMEMODE\" = \"Spectator\" ]] && GAMEMODE=3\n\n# Player Idle Timeout\n[[ \"$PLAYERIDLETIMEOUT\" = \"Disabled\" ]] && PLAYERIDLETIMEOUT=0\n\n# Minecraft-specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\nsystem_install_package mailutils postfix curl netcat wget file bzip2 \\\n gzip unzip bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux openjdk-17-jre dirmngr software-properties-common\n\n# Install LinuxGSM and Minecraft and enable the 'mcserver' service\nreadonly GAMESERVER='mcserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Minecraft configurations\nsed -i s/server-ip=/server-ip=\"$IP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Customer config\nsed -i s/allow-flight=false/allow-flight=\"$ALLOWFLIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/allow-nether=true/allow-nether=\"$ALLOWNETHER\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/announce-player-achievements=true/announce-player-achievements=\"$ANNOUNCEPLAYERACHIEVEMENTS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/difficulty=1/difficulty=\"$DIFFICULTY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-command-block=false/enable-command-block=\"$ENABLECOMMANDBLOCK\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-query=true/enable-query=\"$ENABLEQUERY\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/force-gamemode=false/force-gamemode=\"$FORCEGAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/gamemode=0/gamemode=\"$GAMEMODE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/generate-structures=true/generate-structures=\"$GENERATESTRUCTURES\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/hardcore=false/hardcore=\"$HARDCORE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-name=world/level-name=\"$LEVELNAME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-seed=/level-seed=\"$LEVELSEED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/level-type=DEFAULT/level-type=\"$LEVELTYPE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-build-height=256/max-build-height=\"$MAXBUILDHEIGHT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-players=20/max-players=\"$MAXPLAYERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-tick-time=60000/max-tick-time=\"$MAXTICKTIME\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/max-world-size=29999984/max-world-size=\"$MAXWORLDSIZE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/motd=.*/motd=\"$MOTD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/network-compression-threshold=256/network-compression-threshold=\"$NETWORKCOMPRESSIONTHRESHOLD\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/op-permission-level=4/op-permission-level=\"$OPPERMISSIONLEVEL\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/player-idle-timeout=0/player-idle-timeout=\"$PLAYERIDLETIMEOUT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/pvp=true/pvp=\"$PVP\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/resource-pack-sha1=/resource-pack-sha1=\"$RESOURCEPACKSHA1\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/server-port=25565/server-port=\"$PORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/snooper-enabled=true/snooper-enabled=\"$SNOOPERENABLED\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-animals=true/spawn-animals=\"$SPAWNANIMALS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-monsters=true/spawn-monsters=\"$SPAWNMONSTERS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/spawn-npcs=true/spawn-npcs=\"$SPAWNNPCS\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/use-native-transport=true/use-native-transport=\"$USENATIVETRANSPORT\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/view-distance=10/view-distance=\"$VIEWDISTANCE\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/rcon.password=*/rcon.password=\"\\\"$RCONPASSWORD\\\"\"/ /home/\"$USERNAME\"/serverfiles/server.properties\nsed -i s/enable-rcon=false/enable-rcon=true/ /home/\"$USERNAME\"/serverfiles/server.properties\n\n# Start the service and setup firewall\nufw allow \"$PORT\"\nufw allow \"25575\"\n\n# Start and enable the Minecraft service\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"levelname","label":"World Name","default":"world"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"allowflight","label":"Flight Enabled","oneof":"true,false","default":"false"},{"name":"allownether","label":"Nether World Enabled","oneof":"true,false","default":"true"},{"name":"announceplayerachievements","label":"Player Achievements Enabled","oneof":"true,false","default":"true"},{"name":"maxplayers","label":"Maximum Players","default":"25"},{"name":"playeridletimeout","label":"Player Idle Timeout Limit","oneof":"Disabled,15,30,45,60","default":"Disabled"},{"name":"difficulty","label":"Difficulty Level","oneof":"Peaceful,Easy,Normal,Hard","default":"Easy"},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"true,false","default":"false"},{"name":"pvp","label":"PvP Enabled","oneof":"true,false","default":"true"},{"name":"forcegamemode","label":"Force Game Mode Enabled","oneof":"true,false","default":"false"},{"name":"leveltype","label":"World Type","oneof":"DEFAULT,AMPLIFIED,FLAT,LEGACY","default":"DEFAULT"},{"name":"levelseed","label":"World Seed","default":""},{"name":"spawnanimals","label":"Spawn Animals Enabled","oneof":"true,false","default":"true"},{"name":"spawnmonsters","label":"Spawn Monsters Enabled","oneof":"true,false","default":"true"},{"name":"spawnnpcs","label":"Spawn NPCs Enabled","oneof":"true,false","default":"true"},{"name":"gamemode","label":"Game Mode","oneof":"Survival,Creative,Adventure,Spectator","default":"Survival"},{"name":"generatestructures","label":"Structure Generation Enabled","oneof":"true,false","default":"true"},{"name":"maxbuildheight","label":"Maximum Build Height","oneof":"50,100,200,256","default":"256"},{"name":"maxworldsize","label":"Maximum World Size","oneof":"100,1000,10000,100000,1000000,10000000,29999984","default":"29999984"},{"name":"viewdistance","label":"View Distance","oneof":"2,5,10,15,25,32","default":"10"},{"name":"enablecommandblock","label":"Command Block Enabled","oneof":"true,false","default":"false"},{"name":"enablequery","label":"Querying Enabled","oneof":"true,false","default":"true"},{"name":"enablercon","label":"Enable RCON","oneof":"true,false","default":"false"},{"name":"rconpassword","label":"RCON Password","default":""},{"name":"rconport","label":"RCON Port","default":"25575"},{"name":"maxticktime","label":"Maximum Tick Time","default":"60000"},{"name":"networkcompressionthreshold","label":"Network Compression Threshold","default":"256"},{"name":"oppermissionlevel","label":"Op-permission Level","oneof":"1,2,3,4","default":"4"},{"name":"port","label":"Port Number","default":"25565"},{"name":"snooperenabled","label":"Snooper Enabled","oneof":"true,false","default":"true"},{"name":"usenativetransport","label":"Use Native Transport Enabled","oneof":"true,false","default":"true"},{"name":"username","label":"The username for the Linode's non-root admin/SSH user(must be lowercase)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's non-root admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":869129,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"aaPanel One-Click","description":"aaPanel One-Click","ordinal":11,"logo_url":"assets/aapanel.svg","images":["linode/centos7"],"deployments_total":5389,"deployments_active":320,"is_public":true,"mine":false,"created":"2021-07-20T18:50:46","updated":"2023-12-12T14:34:45","rev_note":"","script":"#!/bin/bash\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Yum Update\nyum update -y\n\n# Install aapanel\nyum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && echo y|bash install.sh aapanel\n\n# Log aaPanel login information\nbt default > /root/.aapanel_info\n\n# Stackscript Cleanup\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[]},{"id":923033,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Akaunting One-Click","description":"Akaunting One-Click","ordinal":12,"logo_url":"assets/akaunting.svg","images":["linode/ubuntu22.04"],"deployments_total":638,"deployments_active":23,"is_public":true,"mine":false,"created":"2021-10-18T01:01:19","updated":"2023-12-09T12:28:31","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# \n# \n# \n# \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nDEBIAN_FRONTEND=noninteractive apt-get update -qq >/dev/null\n\n###########################################################\n# Install NGINX\n###########################################################\napt-get install -y nginx\n\ncat <<'END' >/var/www/html/index.html\n\n \n \n \n \n \n\n Installing Akaunting\n\n \n \n\n \n \n\n \n
\n
\n \n
\n\n
\n \n
\n
\n

Installing...

Get back after 3 minutes!

\n
\n
\n \n\nEND\n\nchown www-data:www-data /var/www/html/index.html\nchmod 644 /var/www/html/index.html\n\n###########################################################\n# MySQL\n###########################################################\napt install -y mariadb-server expect\n\nfunction mysql_secure_install {\n # $1 - required - Root password for the MySQL database\n [ ! -n \"$1\" ] && {\n printf \"mysql_secure_install() requires the MySQL database root password as its only argument\\n\"\n return 1;\n }\n local -r db_root_password=\"$1\"\n local -r secure_mysql=$(\nexpect -c \"\nset timeout 10\nspawn mysql_secure_installation\nexpect \\\"Enter current password for root (enter for none):\\\"\nsend \\\"$db_root_password\\r\\\"\nexpect \\\"Change the root password?\\\"\nsend \\\"n\\r\\\"\nexpect \\\"Remove anonymous users?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Disallow root login remotely?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Remove test database and access to it?\\\"\nsend \\\"y\\r\\\"\nexpect \\\"Reload privilege tables now?\\\"\nsend \\\"y\\r\\\"\nexpect eof\n\")\n printf \"$secure_mysql\\n\"\n}\n\n# Set DB root password\necho \"mysql-server mysql-server/root_password password ${DB_PASSWORD}\" | debconf-set-selections\necho \"mysql-server mysql-server/root_password_again password ${DB_PASSWORD}\" | debconf-set-selections\n\nmysql_secure_install \"$DB_PASSWORD\"\n\n# Create DB\necho \"CREATE DATABASE ${DB_NAME};\" | mysql -u root -p\"$DB_PASSWORD\"\n\n# create DB user with password\necho \"CREATE USER '$DBUSER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\" | mysql -u root -p\"$DB_PASSWORD\"\n\necho \"GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DBUSER'@'localhost';\" | mysql -u root -p\"$DB_PASSWORD\"\necho \"FLUSH PRIVILEGES;\" | mysql -u root -p\"$DB_PASSWORD\"\n\n\n###########################################################\n# Install PHP \n###########################################################\napt-get install -y zip unzip php-mbstring php-zip php-gd php-cli php-curl php-intl php-imap php-xml php-xsl php-tokenizer php-sqlite3 php-pgsql php-opcache php-simplexml php-fpm php-bcmath php-ctype php-json php-pdo php-mysql\n\n###########################################################\n# Akaunting\n###########################################################\nmkdir -p /var/www/akaunting \\\n && curl -Lo /tmp/akaunting.zip 'https://akaunting.com/download.php?version=latest&utm_source=linode&utm_campaign=developers' \\\n && unzip /tmp/akaunting.zip -d /var/www/html \\\n && rm -f /tmp/akaunting.zip\n\ncat </var/www/html/.env\nAPP_NAME=Akaunting\nAPP_ENV=production\nAPP_LOCALE=en-GB\nAPP_INSTALLED=false\nAPP_KEY=\nAPP_DEBUG=false\nAPP_SCHEDULE_TIME=\"09:00\"\nAPP_URL=\n\nDB_CONNECTION=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_DATABASE=${DB_NAME}\nDB_USERNAME=${DBUSER}\nDB_PASSWORD=${DBUSER_PASSWORD}\nDB_PREFIX=\n\nBROADCAST_DRIVER=log\nCACHE_DRIVER=file\nSESSION_DRIVER=file\nQUEUE_CONNECTION=sync\nLOG_CHANNEL=stack\n\nMAIL_MAILER=mail\nMAIL_HOST=localhost\nMAIL_PORT=2525\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_NAME=null\nMAIL_FROM_ADDRESS=null\n\nFIREWALL_ENABLED=false\nEND\n\ncd /var/www/html && php artisan key:generate\n\n# Install Akaunting\nphp /var/www/html/artisan install --db-host=\"localhost\" --db-name=\"$DB_NAME\" --db-username=\"$DBUSER\" --db-password=\"$DBUSER_PASSWORD\" --company-name=\"$COMPANY_NAME\" --company-email=\"$COMPANY_EMAIL\" --admin-email=\"$ADMIN_EMAIL\" --admin-password=\"$ADMIN_PASSWORD\"\n\n# Fix permissions\nchown -Rf www-data:www-data /var/www/html\nfind /var/www/html/ -type d -exec chmod 755 {} \\;\nfind /var/www/html/ -type f -exec chmod 644 {} \\;\n\n###########################################################\n# Configure NGINX\n###########################################################\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat << END > /etc/nginx/nginx.conf\n# Generic startup file.\nuser www-data;\n\n#usually equal to number of CPUs you have. run command \"grep processor /proc/cpuinfo | wc -l\" to find it\nworker_processes auto;\nworker_cpu_affinity auto;\n\nerror_log /var/log/nginx/error.log;\npid /var/run/nginx.pid;\n\n# Keeps the logs free of messages about not being able to bind().\n#daemon off;\n\nevents {\nworker_connections 1024;\n}\n\nhttp {\n# rewrite_log on;\n\ninclude mime.types;\ndefault_type application/octet-stream;\naccess_log /var/log/nginx/access.log;\nsendfile on;\n# tcp_nopush on;\nkeepalive_timeout 64;\n# tcp_nodelay on;\n# gzip on;\n #php max upload limit cannot be larger than this \nclient_max_body_size 13m;\nindex index.php index.html index.htm;\n\n# Upstream to abstract backend connection(s) for PHP.\nupstream php {\n #this should match value of \"listen\" directive in php-fpm pool\n server unix:/run/php/php$PHP_VERSION-fpm.sock;\n server 127.0.0.1:9000;\n}\n\nserver {\n listen 80 default_server;\n\n server_name _;\n\n root /var/www/html;\n\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-XSS-Protection \"1; mode=block\";\n add_header X-Content-Type-Options \"nosniff\";\n\n index index.html index.htm index.php;\n\n charset utf-8;\n\n location / {\n try_files \\$uri \\$uri/ /index.php?\\$query_string;\n }\n\n # Prevent Direct Access To Protected Files\n location ~ \\.(env|log) {\n deny all;\n }\n\n # Prevent Direct Access To Protected Folders\n location ~ ^/(^app$|bootstrap|config|database|overrides|resources|routes|storage|tests|artisan) {\n deny all;\n }\n\n # Prevent Direct Access To modules/vendor Folders Except Assets\n location ~ ^/(modules|vendor)\\/(.*)\\.((?!ico|gif|jpg|jpeg|png|js\\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ {\n deny all;\n }\n\n error_page 404 /index.php;\n\n # Pass PHP Scripts To FastCGI Server\n location ~ \\.php$ {\n fastcgi_split_path_info ^(.+\\.php)(/.+)\\$;\n fastcgi_pass php;\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n include fastcgi_params;\n }\n\n location ~ /\\.(?!well-known).* {\n deny all;\n }\n}\n}\nEND\n\n# Remove installation screen\nrm -f /var/www/html/index.html\n\nservice nginx reload\n\n###########################################################\n# Firewall\n###########################################################\napt-get install ufw -y\nufw limit ssh\nufw allow http\nufw allow https\n\nufw --force enable\n\n###########################################################\n# Stackscript cleanup\n###########################################################\nrm /root/StackScript\nrm /root/ssinclude*\necho \"Installation complete!\"","user_defined_fields":[{"name":"company_name","label":"Company Name","example":"My Company"},{"name":"company_email","label":"Company Email","example":"my@company.com"},{"name":"admin_email","label":"Admin Email","example":"my@company.com"},{"name":"admin_password","label":"Admin Password","example":"s3cur39a55w0r0"},{"name":"db_name","label":"MySQL Database Name","example":"akaunting"},{"name":"db_password","label":"MySQL root Password","example":"s3cur39a55w0r0"},{"name":"dbuser","label":"MySQL Username","example":"akaunting"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur39a55w0r0"}]},{"id":985374,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Enterprise Edition One-Click","description":"Ant Media Enterprise Edition One-Click","ordinal":13,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":1375,"deployments_active":63,"is_public":true,"mine":false,"created":"2022-03-08T17:39:39","updated":"2023-12-11T20:31:23","rev_note":"","script":"#!/usr/bin/env bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\nZIP_FILE=\"https://antmedia.io/linode/antmedia_2.5.3.zip\"\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":804144,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ant Media Server: Community Edition One-Click","description":"Ant Media Server One-Click","ordinal":14,"logo_url":"assets/antmediaserver.svg","images":["linode/ubuntu20.04"],"deployments_total":5639,"deployments_active":466,"is_public":true,"mine":false,"created":"2021-04-01T12:50:57","updated":"2023-12-12T15:11:24","rev_note":"","script":"#!/usr/bin/env bash \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nZIP_FILE=\"https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.5.3/ant-media-server-community-2.5.3.zip\"\n\n\nINSTALL_SCRIPT=\"https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh\"\n\nwget -q --no-check-certificate $ZIP_FILE -O /tmp/antmedia.zip && wget -q --no-check-certificate $INSTALL_SCRIPT -P /tmp/\n\nif [ $? == \"0\" ]; then\n bash /tmp/install_ant-media-server.sh -i /tmp/antmedia.zip\nelse\n logger \"There is a problem in installing the ant media server. Please send the log of this console to contact@antmedia.io\"\n exit 1\nfi","user_defined_fields":[]},{"id":1102900,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Apache Airflow One-Click","description":"Apache Airflow One-Click App","ordinal":15,"logo_url":"assets/apacheairflow.svg","images":["linode/ubuntu20.04"],"deployments_total":127,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-12-20T17:32:08","updated":"2023-11-28T13:38:46","rev_note":"","script":"#!/bin/bash\n#\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n# install depends\nexport DEBIAN_FRONTEND=noninteractive\nsudo apt update\n#sudo apt -y upgrade\nsudo apt install -y python3-pip\nsudo apt install -y build-essential libssl-dev libffi-dev python3-dev\nsudo apt install -y python3-venv # One of the Airflow examples requires virtual environments\n\nexport AIRFLOW_HOME=~/airflow\n\n# Install Airflow using the constraints file\nAIRFLOW_VERSION=2.4.1\nPYTHON_VERSION=\"$(python3 --version | cut -d \" \" -f 2 | cut -d \".\" -f 1-2)\"\n# For example: 3.7\nCONSTRAINT_URL=\"https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt\"\n# For example: https://raw.githubusercontent.com/apache/airflow/constraints-2.4.1/constraints-3.7.txt\npip install \"apache-airflow==${AIRFLOW_VERSION}\" --constraint \"${CONSTRAINT_URL}\"\n\n# The Standalone command will initialise the database, make a user,\n# and start all components for you.\nairflow standalone &\n\n###\n# \n# systemd unit file and per component settings go here\n# \n### \n\n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${DEFAULT_RDNS};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http \nufw allow https \nsystemctl enable ufw\n\nsleep 60 \n\n## install SSL certs. required \npip install pyOpenSSL --upgrade\napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n\n## write some login details\nexport ADMIN_PASS=$(cat /root/airflow/standalone_admin_password.txt)\ncat < /etc/motd \nThe installation of Apache Airflow is now complete, and the application is running in standalone mode.\n#\nYou can log into the Airflow GUI at ${ABS_DOMAIN}\nWith the credentials: \nUsername: admin\nPassword: ${ADMIN_PASS}\n#\nStandalone mode is not recommended for production.\nEND\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1160820,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Appwrite One-Click","description":"Appwrite One-Click ","ordinal":16,"logo_url":"assets/appwrite.svg","images":["linode/ubuntu22.04"],"deployments_total":177,"deployments_active":11,"is_public":true,"mine":false,"created":"2023-04-21T13:09:13","updated":"2023-12-10T01:42:24","rev_note":"","script":"#!/bin/bash\n### linode \n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nbash ./get-docker.sh\n\n# install haveged\nsudo apt-get install -y haveged\n\n# Install Appwrite\n# Grab latest version\nappversion=$(curl -s https://api.github.com/repos/appwrite/appwrite/releases/latest | grep -oP '\"tag_name\": \"\\K.*?(?=\")')\n\ndocker run --rm \\\n --volume /var/run/docker.sock:/var/run/docker.sock \\\n --volume \"$(pwd)\"/appwrite:/usr/src/code/appwrite:rw \\\n appwrite/appwrite:$appversion sh -c \"install --httpPort=80 --httpsPort=443 --interactive=N\"\n\necho \"Installation complete!\"","user_defined_fields":[]},{"id":401699,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ark One-Click","description":"Ark - Latest One-Click","ordinal":17,"logo_url":"assets/Ark@1x.svg","images":["linode/debian11"],"deployments_total":1145,"deployments_active":3,"is_public":true,"mine":false,"created":"2019-03-08T21:05:54","updated":"2023-12-05T18:43:30","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"arkserver\"\n\nset_hostname\napt_setup_update\n\n\n# ARK specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc-s1 libstdc++6 libstdc++6:i386 \n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install ARK\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\nsed -i s/XPMultiplier=.*/XPMultiplier=\"$XPMULTIPLIER\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPassword=.*/ServerPassword=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerHardcore=.*/ServerHardcore=\"$SERVERPASSWORD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerPVE=.*/ServerPVE=\"$SERVERPVE\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/Message=.*/Message=\"$MOTD\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/SessionName=.*/SessionName=\"$SESSIONNAME\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\nsed -i s/ServerAdminPassword=.*/ServerAdminPassword=\"\\\"$RCONPASSWORD\\\"\"/ /home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015/udp\nufw allow 7777:7778/udp\nufw allow 27020/tcp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rconpassword","label":"RCON password"},{"name":"sessionname","label":"Server Name","default":"Ark Server"},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"serverpassword","label":"Server Password","default":""},{"name":"hardcore","label":"Hardcore Mode Enabled","oneof":"True,False","default":"False"},{"name":"xpmultiplier","label":"XP Multiplier","oneof":"1,1.5,2,5,10,20","default":"2"},{"name":"serverpve","label":"Server PvE","oneof":"True,False","default":"False"}]},{"id":662118,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Azuracast One-Click","description":"AzuraCast One-Click","ordinal":18,"logo_url":"assets/azuracast.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":2704,"deployments_active":191,"is_public":true,"mine":false,"created":"2020-08-12T15:50:09","updated":"2023-12-12T06:14:05","rev_note":"","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, apt configuration and update/upgrade\nset_hostname\napt_setup_update\n\n# Install GIT\napt-get update && apt-get install -q -y git\n# Cloning AzuraCast and install\nmkdir -p /var/azuracast\ncd /var/azuracast\ncurl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh > docker.sh\nchmod a+x docker.sh\nyes 'Y' | ./docker.sh setup-release\nyes '' | ./docker.sh install\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":913277,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BeEF One-Click","description":"BeEF One-Click","ordinal":19,"logo_url":"assets/beef.svg","images":["linode/ubuntu22.04"],"deployments_total":30530,"deployments_active":1166,"is_public":true,"mine":false,"created":"2021-09-30T18:28:58","updated":"2023-12-12T15:52:32","rev_note":"","script":"#!/bin/bash\n#\n# Script to install BEEF on Linode\n# \n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \nbeef_config=\"/home/beef/config.yaml\"\nkey=\"privkey.pem\"\ncert=\"fullchain.pem\"\n# System Update\napt_setup_update\n# UFW\nufw allow 80\nufw allow 443\nufw allow 3000\nfunction configure_nginx {\n apt install git nginx ruby-dev -y\n # NGINX\n mkdir -p /var/www/certs/.well-known\n chown -R www-data:www-data /var/www/certs/\n cat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\nfunction configure_ssl {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\nfunction create_beef_user {\n function create_beef {\n groupadd --system beef\n useradd -s /sbin/nologin --system -g beef beef\n }\n grep beef /etc/passwd\n if [ $? -eq 1 ];then\n create_beef\n else\n echo \"[INFO] beef already on the system. Deleting user\"\n deluser --remove-home beef\n create_beef\n fi\n}\nfunction configure_beef {\n git clone https://github.com/beefproject/beef.git /home/beef\n chown -R beef: /home/beef\n cd /home/beef\n cp /etc/letsencrypt/live/$FQDN/$key .\n cp /etc/letsencrypt/live/$FQDN/$cert .\n # get line number to replace\n get_https_enable=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"enable:\" | awk -F \"-\" {'print $1'})\n get_https_public_enabled=$(grep -n -C 10 \"key:\" $beef_config | grep -v \"#\" | grep \"https:\" -A 5 | grep \"public_enabled:\" | awk -F \"-\" {'print $1'})\n # replacing line numebr\n sed -i \"\"$get_https_enable\"s/enable: false/enable: true/\" $beef_config\n sed -i \"\"$get_https_public_enabled\"s/public_enabled: false/public_enabled: true/\" $beef_config\n sed -i \"/key:/c\\ key: \\\"$key\\\"\" $beef_config\n sed -i \"/cert:/c\\ cert: \\\"$cert\\\"\" $beef_config\n # creds\n #sed -i \"/user:/c\\ user: \\\"beef\\\"\" $beef_config\n sed -i \"/passwd:/c\\ passwd: \\\"$BEEFPASSWORD\\\"\" $beef_config\n # install local copy of beef\n # install deps\n apt install curl git build-essential openssl libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison nodejs libcurl4-openssl-dev ruby-dev -y\n su - -s /bin/bash beef\n bundle3.0 config set --local path /home/beef/.gem\n bundle3.0 install\n gem install --user-install xmlrpc\n \n}\nfunction beef_startup {\n cat < /home/beef/start_beef\n#!/bin/bash\nfunction start_beef {\n cd /home/beef\n echo no | ./beef\n}\nstart_beef\nEOF\n chown -R beef:beef /home/beef\n chmod +x /home/beef/start_beef\n}\n \nfunction beef_job {\n cat < /etc/systemd/system/beef.service\n[Unit]\nDescription=Browser Exploitation Framework\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=beef\nGroup=beef\nExecStart=/home/beef/start_beef\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start beef\n systemctl enable beef\n}\nfunction ssl_renew_cron {\n cat </root/certbot-beef-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & BeEf\n# Debug\n# set -xo pipefail\nexport BEEF_FULL=/home/beef/fullchain.pem\nexport BEEF_PRIVKEY=/home/beef/privkey.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat \\$FULLCHAIN > \\$BEEF_FULL\ncat \\$PRIVKEY > \\$BEEF_PRIVKEY\nservice beef reload\nEND\n chmod +x /root/certbot-beef-renewal.sh\n# Setup Cron\n crontab -l > cron\n echo \"* 1 * * 1 bash /root/certbot-beef-renewal.sh\" >> cron\n crontab cron\n rm cron\n}\nfunction install_complete {\n cat < /root/beef.info\n##############################\n# BEEF INSTALLATION COMPLETE #\n##############################\nEndpoint: https://$FQDN:3000/ui/panel\nCredentials can be found here:\n/home/beef/config.yaml\nHappy hunting!\nEOF\n}\nfunction main {\n create_beef_user\n configure_nginx\n configure_ssl\n configure_beef\n beef_startup\n beef_job\n ssl_renew_cron\n install_complete\n}\nmain\n# Clean up\nstackscript_cleanup\ncat /root/beef.info","user_defined_fields":[{"name":"beefpassword","label":"BEEF Password"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode. The username cannot contain any spaces or capitol letters. For this application the username 'beef' is reserved for the application, so please choose an alternative username for this deployment.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"BitNinja One-Click","description":"BitNinja One-Click","ordinal":20,"logo_url":"assets/bitninja.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":35,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T01:03:02","updated":"2023-11-28T09:18:11","rev_note":"","script":"#!bin/bash\n\n# \n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nwget -qO- https://get.bitninja.io/install.sh | /bin/bash -s - --license_key=\"$license_key\" -y","user_defined_fields":[{"name":"license_key","label":"License Key"}]},{"id":1037036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Budibase One-Click","description":"Budibase One Click App","ordinal":21,"logo_url":"assets/budibase.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":438,"deployments_active":26,"is_public":true,"mine":false,"created":"2022-08-02T18:42:41","updated":"2023-12-12T01:21:50","rev_note":"","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker.io\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Install Docker Compose\ncurl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\ndocker-compose --version\n\necho \"Creating passwords for /opt/budibase/.env\"\nVAR_JWT_SECRET=$(pwgen 16)\nVAR_MINIO_ACCESS_KEY=$(pwgen 16)\nVAR_MINIO_SECRET_KEY=$(pwgen 16)\nVAR_COUCH_DB_PASSWORD=$(pwgen 16)\nVAR_REDIS_PASSWORD=$(pwgen 16)\nVAR_INTERNAL_API_KEY=$(pwgen 16)\nIP=`hostname -I | awk '{print$1}'`\n\nmkdir -p /opt/budibase\ncd /opt/budibase\necho \"Fetch budibase docker compose file\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/docker-compose.yaml -o /opt/budibase/docker-compose.yml\necho \"Fetch budibase .env template\"\ncurl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/.env -o /opt/budibase/.env\necho \"Set passwords in /opt/budibase/.env\"\nsed -i \"s/JWT_SECRET=testsecret/JWT_SECRET=$VAR_JWT_SECRET/\" /opt/budibase/.env\nsed -i \"s/MINIO_ACCESS_KEY=budibase/MINIO_ACCESS_KEY=$VAR_MINIO_ACCESS_KEY/\" /opt/budibase/.env\nsed -i \"s/MINIO_SECRET_KEY=budibase/MINIO_SECRET_KEY=$VAR_MINIO_SECRET_KEY/\" /opt/budibase/.env\nsed -i \"s/COUCH_DB_PASSWORD=budibase/COUCH_DB_PASSWORD=$VAR_COUCH_DB_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/REDIS_PASSWORD=budibase/REDIS_PASSWORD=$VAR_REDIS_PASSWORD/\" /opt/budibase/.env\nsed -i \"s/INTERNAL_API_KEY=budibase/INTERNAL_API_KEY=$VAR_INTERNAL_API_KEY/\" /opt/budibase/.env\nsed -i \"s/MAIN_PORT=10000/MAIN_PORT=$BBPORT/\" /opt/budibase/.env\ndocker-compose up -d\n\ncat </etc/profile.d/budibase_welcome.sh\n#!/bin/sh\n#\nIP=$(hostname -I | awk '{print$1}')\necho \"\n********************************************************************************\nWelcome to Budibase!\nTo help keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH) and the Web UI port $BBPORT.\n********************************************************************************\n # Budibase UI: http://$IP:$BBPORT/\n # Website: https://budibase.com\n # Documentation: https://docs.budibase.com\n # Github: https://github.com/Budibase/budibase\n # Community Support: https://github.com/Budibase/budibase/discussions\n # Restart Budibase: cd /opt/budibase; docker-compose down; docker-compose up -d\n # Budibase config: /etc/budibase/.env\n\"\nEND\nchmod +x /etc/profile.d/budibase_welcome.sh\n# Enable UFW and add some rules to it\nufw enable\nufw limit ssh/tcp comment 'Rate limit the SSH port'\nufw allow $BBPORT/tcp comment \"TCP Listen port for Budibase\"\nufw --force enable\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"BBPORT","label":"Budibase Port","example":"Default: 80","default":"80"}]},{"id":869155,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Chevereto One-Click","description":"Chevereto One-Click","ordinal":22,"logo_url":"assets/chevereto.svg","images":["linode/ubuntu20.04"],"deployments_total":236,"deployments_active":6,"is_public":true,"mine":false,"created":"2021-07-20T19:07:56","updated":"2023-10-30T19:52:12","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/chevereto/linode-marketplace\n\nset -e\n\nCHEVERETO_INSTALLER_TAG=\"3.1.0\"\nWORKING_DIR=\"/var/www/html\"\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php\napt install -y mysql-server\napt install -y php\napt install -y php-{common,cli,curl,fileinfo,gd,imagick,intl,json,mbstring,mysql,opcache,pdo,pdo-mysql,xml,xmlrpc,zip}\napt install -y python3-certbot-apache software-properties-common unzip\n\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\n\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Chevereto at http://\\$myip/installer.php\n * Secure your database by running:\n > mysql_secure_installation\n * Setup email delivery at http://\\$myip/dashboard/settings/email\nFor help and more information visit https://chevereto.com\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\n\ncat >/etc/cron.d/chevereto </etc/php/7.4/apache2/conf.d/chevereto.ini <>/var/log/per-instance.log\n\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\n\nCHEVERETO_DB_HOST=localhost\nCHEVERETO_DB_PORT=3306\nCHEVERETO_DB_NAME=chevereto\nCHEVERETO_DB_USER=chevereto\nCHEVERETO_DB_PASS=$(openssl rand -hex 16)\n\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\n\necho \"[OK] Chevereto Installer $CHEVERETO_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":869158,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ClusterControl One-Click","description":"ClusterControl One-Click","ordinal":23,"logo_url":"assets/clustercontrol.svg","images":["linode/ubuntu20.04"],"deployments_total":174,"deployments_active":4,"is_public":true,"mine":false,"created":"2021-07-20T19:13:44","updated":"2023-12-09T22:12:37","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Severalnines settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\nworkdir=/tmp\nIP=`hostname -I | awk '{print$1}'`\n# if command -v dig &>/dev/null; then\n# echo -e \"\\nDetermining network interfaces.\" \n# ext_ip=$(dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null)\n# [[ ! -z $ext_ip ]] && IP=${ext_ip}\n# fi\nlog_progress() {\n\n echo \"$1\" >> /root/cc_install.log\n}\n\ninstall_cc() {\n export HOME=/root\n export USER=root\n wget --no-check-certificate https://severalnines.com/downloads/cmon/install-cc\n chmod +x install-cc\n echo \"mysql cmon password = $CMONUSER_PASSWORD\" >> /root/.cc_passwords\n echo \"mysql root password = $DBROOT_PASSWORD\" >> /root/.cc_passwords\n SEND_DIAGNOSTICS=0 S9S_CMON_PASSWORD=$CMONUSER_PASSWORD S9S_ROOT_PASSWORD=$DBROOT_PASSWORD INNODB_BUFFER_POOL_SIZE=256 ./install-cc\n}\n\nfirstboot() {\n hostnamectl set-hostname clustercontrol\n\n ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N \"\"\n ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub\n SSH_KEY=$(cat /root/.ssh/id_rsa.pub)\n\n cat < /etc/update-motd.d/99-cc-motd \n#!/bin/sh\necho \"###\"\necho \"\"\necho \"Welcome to Severalnines Database Monitoring and Management Application - ClusterControl\"\necho \"Open your web browser to http://${IP}/clustercontrol to access ClusterControl's web application\"\necho \"\"\necho \"The public SSH key (root) is:\"\necho \"$SSH_KEY\"\necho \"\"\necho \"###\"\nEND\n\n chmod +x /etc/update-motd.d/99-cc-motd\n}\n\nenable_fw() {\n ufw default deny incoming\n ufw default allow outgoing\n ufw allow ssh\n ufw allow http\n ufw allow https\n ufw allow 9999\n ufw allow 9501\n}\n\ncleanup() {\n rm -rf /tmp/* /var/tmp/* /root/scripts\n history -c\n cat /dev/null > /root/.bash_history\n unset HISTFILE\n\n apt-get -y autoremove\n apt-get -y autoclean\n\n cat /dev/null > /var/log/lastlog; cat /dev/null > /var/log/wtmp; cat /dev/null > /var/log/auth.log\n\n ufw enable\n ufw status\n\n touch /.cc-provisioned\n}\n\nlog_progress \"** Installing ClusterControl, this could take several minutes. Please wait ...\"\ninstall_cc\nlog_progress \"** Setting motd ...\"\nfirstboot\nlog_progress \"** Enabling firewall ...\"\nenable_fw\nif [[ \"$SSL\" == \"Yes\" ]]; then\n log_progress \"** Enabling Let's Encrypt SSL ...\"\n python --version | grep -q 3.\n [[ $? -eq 0 ]] && PYTHON3=1\n if [[ -n $PYTHON3 ]]; then\n apt install -y certbot python3-certbot-apache\n else\n apt install -y certbot python-certbot-apache\n fi\n\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\ncleanup\n\n# Clean up\nlog_progress \"** Stackscript cleanup please wait ...\"\nstackscript_cleanup\n\nlog_progress \"** Installation successful...\"\n/etc/update-motd.d/99-cc-motd | tee -a /root/cc_install.log\n\nsystemctl restart sshd","user_defined_fields":[{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"cmonuser_password","label":"CMON user password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above)","oneof":"Yes,No","default":"Yes"}]},{"id":401700,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"CS:GO One-Click","description":"CS:GO - Latest One-Click","ordinal":24,"logo_url":"assets/CSGO2.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":2142,"deployments_active":6,"is_public":true,"mine":false,"created":"2019-03-08T21:06:26","updated":"2023-11-02T20:39:58","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"csgoserver\"\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\n#Buyanywhere\nif [[ \"$BUYANYWHERE\" = \"Enabled\" ]]; then\n BUYANYWHERE=1\nelif [[ \"$BUYANYWHERE\" = \"Disabled\" ]]; then\n BUYANYWHERE=0\nelif [[ \"$BUYANYWHERE\" = \"Terrorists Only\" ]]; then\n BUYANYWHERE=2\nelif [[ \"$BUYANYWHERE\" = \"Counter-Terrorists Only\" ]]; then\n BUYANYWHERE=3\nfi\n\n#friendlyfire\n\nif [[ \"$FRIENDLYFIRE\" = \"Enabled\" ]]; then\n FRIENDLYFIRE=1\nelif [[ \"$FRIENDLYFIRE\" = \"Disabled\" ]]; then\n FRIENDLYFIRE=0\nfi\n\nset_hostname\napt_setup_update\n\n\n# CSGO specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install CSGO\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\n> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\n\ncat <> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsv_contact \"\"\nsv_lan 0\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile 0\nsv_hibernate_when_empty 1\nsv_hibernate_ms 5\nhost_name_store 1\nhost_info_show 1\nhost_players_show 2\nexec banned_user.cfg\nexec banned_ip.cfg\nwriteid\nwriteip\nEND\n\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"hostname $SERVERNAME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_roundtime $ROUNDTIME\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nsed -i s/mp_buy_anywhere.*/mp_buy_anywhere\\ \"$BUYANYWHERE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_maxrounds.*/mp_maxrounds\\ \"$MAXROUNDS\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/mp_friendlyfire.*/mp_friendlyfire\\ \"$FRIENDLYFIRE\"/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"$MOTD\" > /home/csgoserver/serverfiles/csgo/motd.txt\n\n\nif [[ \"$FRIENDLYFIRE\" = \"1\" ]]; then\nsed -i s/ff_damage_reduction_bullets.*/ff_damage_reduction_bullets\\ 0\\.85/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade.*/ff_damage_reduction_gernade\\ 0\\.33/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_gernade_self.*/ff_damage_reduction_gernade_self\\ 0\\.4/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\nsed -i s/ff_damage_reduction_other.*/ff_damage_reduction_other\\ 1/ /home/csgoserver/serverfiles/csgo/cfg/gamemode_casual.cfg\necho \"sv_kick_ban_duration 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\necho \"mp_disable_autokick 0\" >> /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg\nfi\n\n# Start the service and setup firewall\nufw_install\nufw allow 27015\nufw allow 27020/udp\nufw allow 27005/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server."},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode CS:GO Server"},{"name":"rconpassword","label":"RCON password"},{"name":"svpassword","label":"CSGO server password","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"roundtime","label":"Round Time Limit","oneof":"5,10,15,20,60","default":"5"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,5,10,15,20","default":"10"},{"name":"buyanywhere","label":"Buy Anywhere ","oneof":"Disabled,Enabled,Counter-Terrorists Only, Terrorists Only","default":"Disabled"},{"name":"friendlyfire","label":"Friendly Fire Enabled","oneof":"Enabled,Disabled","default":"Disabled"}]},{"id":688891,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Discourse One-Click","description":"Discourse One-Click","ordinal":25,"logo_url":"assets/discourse.svg","images":["linode/ubuntu20.04"],"deployments_total":1214,"deployments_active":59,"is_public":true,"mine":false,"created":"2020-11-17T20:55:26","updated":"2023-12-12T07:15:54","rev_note":"","script":"#!/bin/bash\n\n## Discourse Settings\n\n#\n#\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n#Install dependencies needed for Discourse\napt install git apt-transport-https ca-certificates curl software-properties-common net-tools -y\n\n#Clone Discourse Docker repo for install and management\ngit clone https://github.com/discourse/discourse_docker.git /var/discourse\n#UFW Firewall Rules\nufw allow http\nufw allow https\nufw allow 25\nufw allow 465\nufw allow 587\nufw enable <\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Python & Django\napt-get install -y python3 python3-pip\npip3 install Django\n\n# Create & Setup Django APP\nmkdir /var/www/\ncd /var/www/\ndjango-admin startproject DjangoApp\ncd DjangoApp\npython3 manage.py migrate\necho \"from django.contrib.auth.models import User; User.objects.create_superuser('$DJANGOUSER', '$DJANGOUSEREMAIL', '$DJANGOUSERPASSWORD')\" | python3 manage.py shell\nsed -i \"s/ALLOWED_HOSTS = \\[\\]/ALLOWED_HOSTS = \\['$IP'\\]/g\" DjangoApp/settings.py\npython3 manage.py runserver 0.0.0.0:8000 &\n\n# Start Django app on reboot\ncrontab -l | { cat; echo \"@reboot cd /var/www/DjangoApp && python3 manage.py runserver 0.0.0.0:8000 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"djangouser","label":"Django USER","example":"user1"},{"name":"djangouserpassword","label":"Django Password","example":"s3cure_p4ssw0rd"},{"name":"djangouseremail","label":"Django USER email","example":"user@email.tld"}]},{"id":607433,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Docker One-Click","description":"Docker One Click App","ordinal":27,"logo_url":"assets/docker.svg","images":["linode/ubuntu22.04"],"deployments_total":36066,"deployments_active":1839,"is_public":true,"mine":false,"created":"2019-10-31T20:14:04","updated":"2023-12-12T15:57:24","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Docker Settings\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-docker\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":401698,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Drupal One-Click","description":"Drupal One-Click","ordinal":28,"logo_url":"assets/Drupal.svg","images":["linode/ubuntu22.04"],"deployments_total":1850,"deployments_active":79,"is_public":true,"mine":false,"created":"2019-03-08T21:04:47","updated":"2023-12-11T03:05:01","rev_note":"","script":"#!/usr/bin/env bash\n## Drupal Settings\n# \n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, apt configuration and update/upgrade\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Install/configure UFW\nufw allow http\nufw allow https\n\n# Install/configure MySQL\napt-get install mariadb-server -y\nsystemctl start mariadb\nsystemctl enable mariadb\nmysql_root_preinstall\nrun_mysql_secure_installation\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE drupaldb\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT ALL ON drupaldb.* TO 'drupal'@'localhost' IDENTIFIED BY '$DB_PASSWORD'\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\n# Install & Configure Apache\napt-get install -y apache2\ntouch /var/log/apache2/drupal-error_log /var/log/apache2/drupal-access_log\ncp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/drupal.conf\ncat < /etc/apache2/sites-available/drupal.conf\n\n DocumentRoot /var/www/drupal\n ServerName $FQDN\n ServerAlias www.$FQDN\n \n Options FollowSymLinks\n AllowOverride All\n Order allow,deny\n allow from all\n RewriteEngine on\n RewriteBase /\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteCond %{REQUEST_URI} !=/favicon.ico\n RewriteRule ^ index.php [L]\n\n ErrorLog /var/log/apache2/drupal-error_log\n CustomLog /var/log/apache2/drupal-access_log common\n\nEND\na2enmod rewrite\na2dissite 000-default.conf\na2ensite drupal.conf\nsed -ie \"s/KeepAlive Off/KeepAlive On/g\" /etc/apache2/apache2.conf\nsystemctl restart apache2\nsystemctl enable apache2\n\n# Install PHP 8.1\napt-get install php libapache2-mod-php php-mysql php-curl php-cgi php-gd php-mbstring php-xml php-xmlrpc -y\nPHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\ncat < /etc/php/$PHP_VERSION/apache2/php.ini\nerror_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR\nerror_log = /var/log/php/error.log\nmax_input_time = 30\nEND\nmkdir /var/log/php\nchown www-data /var/log/php\n\n# Install Drupal\nrm -r /var/www/html\ncd ~; wget -4 https://www.drupal.org/download-latest/tar.gz\ntar -xf tar.gz -C /var/www/ && mv /var/www/drupal* /var/www/drupal\nrm tar.gz\nmkdir /var/www/drupal/sites/default/files\nchmod a+w /var/www/drupal/sites/default/files\ncp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php\nchmod a+w /var/www/drupal/sites/default/settings.php\ncat <> /var/www/drupal/sites/default/settings.php\n\\$settings['trusted_host_patterns'] = [\n '^$FQDN\\$',\n];\nEND\n\n# Cleanup\nsystemctl restart apache2\nsystemctl restart mysql\n\n# SSL\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"E-Mail Address","example":"Your email address"},{"name":"dbroot_password","label":"MySQL root Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"db_password","label":"Database Password","example":"an0th3r_s3cure_p4ssw0rd"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Drupal server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1008125,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Easypanel One-Click","description":"Easypanel One-Click","ordinal":29,"logo_url":"assets/easypanel.svg","images":["linode/ubuntu22.04"],"deployments_total":1424,"deployments_active":79,"is_public":true,"mine":false,"created":"2022-05-18T16:43:00","updated":"2023-12-11T07:40:49","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# install docker\ncurl -fsSL https://get.docker.com -o get-docker.sh\nsh get-docker.sh\n\n# setup easypanel\ndocker run --rm \\\n -v /etc/easypanel:/etc/easypanel \\\n -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n easypanel/easypanel setup","user_defined_fields":[]},{"id":691620,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"FileCloud One-Click","description":"FileCloud One-Click","ordinal":30,"logo_url":"assets/filecloud.svg","images":["linode/ubuntu20.04"],"deployments_total":790,"deployments_active":14,"is_public":true,"mine":false,"created":"2020-11-30T21:16:19","updated":"2023-12-12T10:31:20","rev_note":"","script":"#!/bin/bash \n\n## Domain Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source and run the New Linode Setup script for DNS configuration\n# This also sets some useful variables, like $IP and $FQDN\n\nsource \n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nset pipefail -o\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Allow traffic on ports 80 and 443\nufw allow 80\nufw allow 443\n\n# Installing Filecloud and Prequisites\nwget -qO - https://repo.filecloudlabs.com/static/pgp/filecloud.asc | sudo apt-key add -\nwget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\necho \"deb [ arch=amd64 ] https://repo.filecloudlabs.com/apt/ubuntu focal/filecloud/22.1 main\" | sudo tee /etc/apt/sources.list.d/filecloud.list\napt-get update -y\napt-get install apache2 mongodb-org -y\napt install -y --no-install-recommends php8.1*\nACCEPT_EULA=Y apt-get install filecloud -y\n\nif [[ \"$SSL\" == \"Yes\" ]]; then\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\nfi\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"ssl","label":"Would you like to use a free CertBot SSL certificate?","oneof":"Yes,No","default":"No"},{"name":"soa_email_address","label":"Email Address for Lets' Encrypt Certificate","default":""},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":609392,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Flask One-Click","description":"Flask One-Click","ordinal":31,"logo_url":"assets/flask.svg","images":["linode/debian10"],"deployments_total":2171,"deployments_active":136,"is_public":true,"mine":false,"created":"2019-11-07T06:24:17","updated":"2023-12-11T05:42:53","rev_note":"Initial import","script":"#!/bin/bash\n\n## Enable logging\nexec > /var/log/stackscript.log 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\nufw_install\nufw allow http\n\n# Install Prereq's & Flask APP\napt install -y git\ncd /home\ngit clone https://github.com/abalarin/Flask-on-Linode.git flask_app_project\n\n# Install & configure Nginx\napt install -y nginx\ncat < /etc/nginx/sites-enabled/flask_app\nserver {\n listen 80;\n server_name $IP;\n location / {\n proxy_pass http://127.0.0.1:8000;\n proxy_set_header Host \\$host;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\n\nunlink /etc/nginx/sites-enabled/default\nnginx -s reload\n\n# Install python & Packages\napt install -y python3 python3-pip\ncd /home/flask_app_project\npip3 install -r flask_app/requirements.txt\n\n# Configure Flask\ncat < /etc/config.json\n{\n \"SECRET_KEY\": \"$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)\",\n \"SQLALCHEMY_DATABASE_URI\": \"sqlite:///site.db\"\n}\nEND\n\ncat < /home/flask_app_project/flask_app/__init__.py\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_login import LoginManager\nimport json\nimport urllib3\napp = Flask(__name__)\nwith open('/etc/config.json') as config_file:\n config = json.load(config_file)\napp.config['SECRET_KEY'] = config.get('SECRET_KEY')\napp.config['SQLALCHEMY_DATABASE_URI'] = config.get('SQLALCHEMY_DATABASE_URI')\ndb = SQLAlchemy(app)\nlogin_manager = LoginManager()\nlogin_manager.init_app(app)\nfrom flask_app import routes\nEND\n\n# Install and Configure Gunicorn\napt install -y gunicorn3\ngunicorn3 --workers=3 flask_app:app &\n\n# Install and Configure Supervisor\napt install -y supervisor\ncat < /etc/supervisor/conf.d/flask_app.conf\n[program:flask_app]\ndirectory=/home/flask_app_project\ncommand=gunicorn3 --workers=3 flask_app:app\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/flask_app/flask_app.err.log\nstdout_logfile=/var/log/flask_app/flask_app.out.log\nEND\n\nmkdir /var/log/flask_app\ntouch /var/log/flask_app/flask_app.out.log\ntouch /var/log/flask_app/flask_app.err.log\nsupervisorctl reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":971045,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Focalboard One-Click","description":"Focalboard One-Click","ordinal":32,"logo_url":"assets/focalboard.svg","images":["linode/ubuntu22.04"],"deployments_total":480,"deployments_active":21,"is_public":true,"mine":false,"created":"2022-02-08T16:23:08","updated":"2023-12-09T17:50:19","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Focalboard Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-focalboard\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n #Focalboard vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1088136,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Galera Cluster One-Click","description":"Galera Cluster One-Click","ordinal":33,"logo_url":"assets/galeramarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":130,"deployments_active":9,"is_public":true,"mine":false,"created":"2022-11-15T20:41:27","updated":"2023-12-08T19:32:12","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/galera-occ\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/galera-occ\" ]; then\n rm -rf /tmp/galera-occ\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n export DEBIAN_FRONTEND=non-interactive\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # add private IP address\n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/galera-occ\n cd /tmp/galera-occ/\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip3 install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"cluster_name","label":"Cluster Name"},{"name":"token_password","label":"Your Linode API token"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Galera CA"},{"name":"common_name","label":"Common Name","default":"Galera Server"},{"name":"cluster_size","label":"Galera cluster size","default":"3","oneof":"3"}]},{"id":688911,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gitea One-Click","description":"Gitea One-Click","ordinal":34,"logo_url":"assets/gitea.svg","images":["linode/debian10"],"deployments_total":1016,"deployments_active":69,"is_public":true,"mine":false,"created":"2020-11-17T21:16:09","updated":"2023-12-12T13:07:22","rev_note":"","script":"#! /bin/bash\n\n## Database Settings\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n#assigns var for IP address\nreadonly ip=$(hostname -I | awk '{print$1}')\n\n#intall git\napt install -y git\n\n#install nginx\napt install -y nginx\n\n#install mysql and secure\nmysql_root_preinstall\napt-get install -y mariadb-server\nsystemctl start mariadb\nsystemctl enable mariadb\nrun_mysql_secure_installation\n\n#create mysql db and user\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE gitea;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"CREATE USER 'gitea'@'localhost' IDENTIFIED BY '$(printf '%q' \"$DB_PASSWORD\")';\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' WITH GRANT OPTION;\"\nmysql -u root --password=\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES;\"\n\n#create user for gitea\nadduser --system --disabled-password --group --shell /bin/bash --gecos 'Git Version Control' --home /home/git git\n\n#create directories for gitea\nmkdir -p /var/lib/gitea/{custom,data,log}\nchown -R git:git /var/lib/gitea/\nchmod -R 750 /var/lib/gitea/\nmkdir /etc/gitea\nchown root:git /etc/gitea\nchmod 770 /etc/gitea\n\n#pull down gitea binary\nwget -O gitea https://dl.gitea.io/gitea/1.13.0/gitea-1.13.0-linux-amd64\nchmod +x gitea\n\n#validate gpg\napt install gnupg -y\ngpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2\ngpg --verify gitea-1.13.0-linux-amd64.asc gitea-1.13.0-linux-amd64\n\n#copy gitea to global location\ncp gitea /usr/local/bin/gitea\n\n#download systemd file from gitea\nwget https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service -P /etc/systemd/system/\n\n#add requires mysql to the systemd file\nsed -i 's/#Requires=mariadb.service/Requires=mariadb.service/' /etc/systemd/system/gitea.service\n\n#start gitea as systemd service\nsystemctl daemon-reload\nsystemctl start gitea\nsystemctl enable gitea\n\n#configures ufw rules before nginx\nsystemctl start ufw\nufw allow http\nufw allow https\nufw enable\n\n#set absolute domain if any, otherwise use localhost\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=localhost\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n\n location / {\n proxy_pass http://localhost:3000;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx\n\nsleep 60\n\n#sets certbot ssl\nif [[ $SSL = \"Yes\" ]]; then\n check_dns_propagation ${ABS_DOMAIN} ${ip}\n apt install python3-certbot-nginx -y\n certbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${EMAIL_ADDRESS} -w /var/www/html/\nfi\n\nstackscript_cleanup","user_defined_fields":[{"name":"dbroot_password","label":"MySQL root Password"},{"name":"db_password","label":"gitea Database Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records.","default":""},{"name":"subdomain","label":"The subdomain for your server (Domain required)","default":""},{"name":"domain","label":"Your domain (API Token required)","default":""},{"name":"soa_email_address","label":"SOA Email for your domain (Required for new domains)","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate for your domain?","oneof":"Yes,No","default":"No"},{"name":"email_address","label":"Admin Email for Let's Encrypt certificate","default":""}]},{"id":401707,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"GitLab One-Click","description":"GitLab One-Click","ordinal":35,"logo_url":"assets/GitLab.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":3270,"deployments_active":139,"is_public":true,"mine":false,"created":"2019-03-08T21:12:21","updated":"2023-12-09T12:02:06","rev_note":"Remove SSH Pubkey UDF","script":"#!/usr/bin/env bash\n\n## Gitlab Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction gitlab {\n # Install dependencies\n apt-get install curl ca-certificates apt-transport-https gnupg2 -y\n\n curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash\n apt-get update -y\n EXTERNAL_URL=\"https://$FQDN\" apt-get install gitlab-ce -y\n\n}\n\nfunction sslgitlab {\n # Taking advantage of Gitlab's Let's Encrypt cert capabilities\n sed -i \"s/# letsencrypt\\['enable'\\] = nil/letsencrypt\\['enable'\\] = true/g\" /etc/gitlab/gitlab.rb\n sed -i -E \"s/(# )(letsencrypt\\['auto_renew*)/\\2/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/letsencrypt['auto_renew_minute'] = nil/letsencrypt['auto_renew_minute'] = 0/g\" /etc/gitlab/gitlab.rb\n sed -i \"s/# letsencrypt\\['contact_emails'\\] = \\[\\]/letsencrypt\\['contact_emails'\\] = \\['$SOA_EMAIL_ADDRESS']/g\" /etc/gitlab/gitlab.rb\n\n gitlab-ctl reconfigure\n}\n\nfunction firewallgitlab {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n gitlab\n firewallgitlab\n sslgitlab\n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Gitlab server's DNS records","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""}]},{"id":1102905,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Gopaddle One-Click","description":"Gopaddle One-Click app","ordinal":36,"logo_url":"assets/gopaddle.svg","images":["linode/ubuntu22.04"],"deployments_total":46,"deployments_active":2,"is_public":true,"mine":false,"created":"2022-12-20T17:44:47","updated":"2023-12-09T22:36:44","rev_note":"","script":"#!/bin/bash\nexec >/var/log/stackscript.log 2>&1\n# Install Docker\napt-get update -y\napt-get install -y ca-certificates curl gnupg lsb-release\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\napt-get update -y\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get update -y\napt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\n\n# Install microk8s\napt-get install snapd -y \nsudo snap install core\nexport PATH=$PATH:/snap/bin\nsnap install microk8s --classic --channel=1.25\nsnap refresh microk8s --channel=1.25\nmicrok8s status --wait-ready\n\n\n# Install gopaddle\nmicrok8s addons repo add gp-lite https://github.com/gopaddle-io/microk8s-community-addons-gplite.git\nmicrok8s enable gopaddle-lite\n\necho Waiting for gopaddle services to move to running state ...\nmicrok8s.kubectl wait --for=condition=ready pod -l released-by=gopaddle -n gp-lite --timeout=15m\n\nRDNS=$(dnsdomainname -A | awk '{print $1}')\n\necho gopaddle-lite installation is complete ! You can now access the gopaddle dashboard @ http://$RDNS:30003/","user_defined_fields":[]},{"id":607256,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Grafana One-Click","description":"Grafana One Click App","ordinal":37,"logo_url":"assets/grafana.svg","images":["linode/debian11"],"deployments_total":835,"deployments_active":55,"is_public":true,"mine":false,"created":"2019-10-30T20:43:07","updated":"2023-12-10T22:50:48","rev_note":"","script":"#!/usr/bin/env bash\n\n### Grafana OCA\n\n## Grafana Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Source the Bash StackScript Library\nsource \n\n# Source and run the New Linode Setup script for SSH configuration\nsource \n\n# Install PreReqs\napt-get install -y apt-transport-https \\\nsoftware-properties-common \\\nwget \\\ngnupg2 \\\nsqlite3\n\nwget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\necho \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\napt-get -y update\napt-get -y install grafana\nsystemctl start grafana-server\nsystemctl enable grafana-server\n\n## reset Grafana admin password\n#grafana-cli --homepath \"/usr/share/grafana\" admin reset-admin-password $grafana_password. --not working -hmorris\necho \"Initializing DB.....\" && sleep 25\nsqlite3 /var/lib/grafana/grafana.db <\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction grav {\n apt-get install -y apache2 php libapache2-mod-php php-mysql mysql-server composer php-curl php-common php-gd php-json php-mbstring php-xml php-zip\n run_mysql_secure_installation_ubuntu20\n cd /var/www/html\n git clone https://github.com/getgrav/grav.git\n cd grav\n chown www-data:www-data -R .\n su -l www-data -s /bin/bash -c \"cd /var/www/html/grav && composer install --no-dev -o && bin/grav install && bin/gpm install admin\"\n chown www-data:www-data -R .\n}\n\nfunction apache_conf {\n cat < /etc/apache2/sites-available/grav.conf\n\nServerAdmin $SOA_EMAIL_ADDRESS\nDocumentRoot /var/www/html/grav/\nServerName $FQDN\nServerAlias www.$FQDN\n\nOptions FollowSymLinks\nAllowOverride All\nOrder allow,deny\nallow from all\n\nErrorLog /var/log/apache2/$FQDN-error_log\nCustomLog /var/log/apache2/$FQDN-access_log common\n\n\nEND\n a2enmod rewrite\n a2ensite grav.conf\n a2dissite 000-default.conf\n service apache2 restart\n}\n\nfunction ssl {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\nfunction firewall {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n firewall\n grav\n apache_conf\n ssl\n\n}\n\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":688914,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Guacamole One-Click","description":"Guacamole One-Click","ordinal":39,"logo_url":"assets/guacamole.svg","images":["linode/ubuntu22.04"],"deployments_total":4459,"deployments_active":63,"is_public":true,"mine":false,"created":"2020-11-17T21:28:05","updated":"2023-12-12T02:07:58","rev_note":"","script":"#!/usr/bin/env bash\n### Apache Guacamole OCA\n### Required UDFs\n## Guacamole Settings\n#\n#\n#\n#\n#\n### Optional UDFs\n## Linode/SSH Security Settings\n#\n#\n## Domain Settings\n#\n#\n#\n## Logging and other debugging helpers\n# Put bash into verbose mode\nset -o pipefail\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Imports\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n### Main Script\n## Open the needed firewall ports\nufw allow http\nufw allow https\n# Install dependencies\nsystem_install_package build-essential libcairo2-dev libpng-dev libtool-bin libossp-uuid-dev libvncserver-dev freerdp2-dev libssh2-1-dev \\\nlibtelnet-dev libwebsockets-dev libpulse-dev libvorbis-dev libwebp-dev \\\nlibssl-dev libpango1.0-dev libswscale-dev libavcodec-dev libavutil-dev \\\nlibavformat-dev\n# Download the Guacamole Server source code\n# Fetch the latest release page\nlatest_release_page=$(curl -sL https://guacamole.apache.org/releases/ | grep -m 1 -o 'href=\"/releases/[0-9.]\\+/\"')\n# Extract the version number from the release page URL\nlatest_version=$(echo $latest_release_page | grep -Eo '[0-9]\\.[0-9]+.[0-9]+')\n# Download the server component\nwget https://downloads.apache.org/guacamole/$latest_version/source/guacamole-server-$latest_version.tar.gz\ntar -xvf guacamole-server-$latest_version.tar.gz\ncd guacamole-server-$latest_version\n# Build Guacamole Server using the downloaded source code\n./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots\nmake\nmake install\n# Update installed library cache and reload systemd\nldconfig\nsystemctl daemon-reload\n# Start guacd\nsystemctl enable guacd\n## Install Guacamole Web App\n# Install Apache Tomcat\nsystem_install_package tomcat9 tomcat9-admin tomcat9-common tomcat9-user\n# Download and install the Guacamole Client\nwget https://downloads.apache.org/guacamole/$latest_version/binary/guacamole-$latest_version.war\nmv guacamole-$latest_version.war /var/lib/tomcat9/webapps/guacamole.war\nsystemctl restart tomcat9 guacd\n## Guacamole configs\nmkdir /etc/guacamole\nreadonly ENCRYPTED_GUACAMOLE_PASSWORD=\"$(echo -n \"$GUACAMOLE_PASSWORD\" | openssl md5 | awk '{print $2}')\"\ncat <> /etc/guacamole/user-mapping.xml\n\n \n \n \n \n vnc\n localhost\n 5901\n ${PASSWORD}\n \n \n\nEOF\ncat <> /etc/guacamole/guacd.conf\n[daemon]\npid_file = /var/run/guacd.pid\n#log_level = debug\n[server]\nbind_host = 127.0.0.1\nbind_port = 4822\nEOF\ncat <> /etc/guacamole/guacamole.properties\n# Hostname and port of guacamole proxy\nguacd-hostname: localhost\nguacd-port: 4822\nEOF\nsystemctl restart tomcat9 guacd\n## Install a desktop environment (XFCE) and VNC Server\n# Install XFCE & NVC\nsystem_install_package xfce4 xfce4-goodies tigervnc-standalone-server expect\n# Set the VNC Server password\nreadonly VNCSERVER_SET_PASSWORD=$(expect -c \"\nspawn sudo -u $USERNAME vncserver\nexpect \\\"Password:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Verify:\\\"\nsend \\\"$PASSWORD\\r\\\"\nexpect \\\"Would you like to enter a view-only password (y/n)?\\\"\nsend \\\"n\\r\\\"\nexpect eof\n\")\necho \"$VNCSERVER_SET_PASSWORD\"\nsystemctl restart tomcat9 guacd\nkillvncprocess=$(ps aux | grep \"/usr/bin/Xtigervnc :1 -localhost=1 -desktop\" | head -n 1 | awk '{ print $2; }')\nkill $killvncprocess\n# Create a systemd service for Tiger VNC\ntouch /etc/systemd/system/vncserver@.service\ncat < /etc/systemd/system/vncserver@.service\n[Unit]\nDescription=a wrapper to launch an X server for VNC\nAfter=syslog.target network.target\n[Service]\nType=forking\nUser=$USERNAME\nGroup=$USERNAME\nWorkingDirectory=/home/$USERNAME\nExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1\nExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i\nExecStop=/usr/bin/vncserver -kill :%i\n[Install]\nWantedBy=multi-user.target\nEOF\n# Start and enable the systemd service\nsystemctl start vncserver@1.service\nsystemctl enable vncserver@1.service\n## Reverse proxy for the Guacamole client\n# Install Apache\napache_install\na2enmod proxy proxy_http headers proxy_wstunnel\n# Create the VirtualHost for Guacamole\ncat < /etc/apache2/sites-available/guacamole.conf\n\n ServerName $FQDN\n ErrorLog ${APACHE_LOG_DIR}/guacamole_error.log\n CustomLog ${APACHE_LOG_DIR}/guacamole_access.log combined\n \n Require all granted\n ProxyPass http://localhost:8080/guacamole/ flushpackets=on\n ProxyPassReverse http://localhost:8080/guacamole/\n \n \n Require all granted\n ProxyPass ws://localhost:8080/guacamole/websocket-tunnel\n ProxyPassReverse ws://localhost:8080/guacamole/websocket-tunnel\n \n Header always unset X-Frame-Options\n\nEOF\n# Enable the VirtualHost\na2ensite guacamole.conf\nsystemctl restart apache2\n## HTTPS\nsystem_install_package python3-certbot-apache\ncertbot -n --apache --agree-tos --redirect --hsts --staple-ocsp --email \"$SOA_EMAIL_ADDRESS\" -d \"$FQDN\" \n## Cleanup after ourselves\nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo/VNC user to be created for the Linode"},{"name":"password","label":"The password for the limited sudo/VNC user"},{"name":"guacamole_user","label":"The username to be used with Guacamole"},{"name":"guacamole_password","label":"The password to be used with Guacamole"},{"name":"soa_email_address","label":"Email for SSL certificate"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required if filling out any of the domain-related fields.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record","default":""},{"name":"domain","label":"The domain for the Linode's DNS record","default":""}]},{"id":1102902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HaltDOS Community WAF One-Click","description":"HaltDOS Community WAF One-Click app","ordinal":40,"logo_url":"assets/haltdos.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":174,"deployments_active":8,"is_public":true,"mine":false,"created":"2022-12-20T17:34:20","updated":"2023-12-07T12:34:52","rev_note":"","script":"#!/bin/bash\n\nset -x\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\necho -e \"\\n---------------HALTDOS COMMUNITY WAF SETUP---------------\"\n\nexport NEEDRESTART_SUSPEND=1\nip=`ip route get 8.8.8.8 | awk -F\"src \" 'NR==1{split($2,a,\" \");print a[1]}'`\necho -e \"Checking OS ...\"\nsource /etc/os-release > /dev/null 2>&1\narch=`uname -m`\nif [[ \"$ID\" == \"ubuntu\" || \"$ID\" == \"debian\" ]]; then\n if [[ \"$VERSION_ID\" == \"18.04\" || \"$VERSION_ID\" == \"20.04\" || \"$VERSION_ID\" == \"22.04\" || \"$VERSION_ID\" == \"11\" ]]; then\n if [ \"$arch\" != \"x86_64\" ]; then\n echo -e \"\\e[1;31m$arch is not yet supported. Supported System Architecture - x86_64 \\e[0m\"\n fi\n else\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported OS - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\n fi\nelse\n echo -e \"\\e[1;31mThis OS is not yet supported. Supported Versions - Ubuntu 18.04, 20.04, 22.04 and Debian 11 \\e[0m\"\n exit 1\nfi\n\necho -e \"Downloading dependencies ...\"\n\napt-get update &> /dev/null\n\napt-get install -y default-jdk default-jre &> /dev/null\necho \"JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/\" >> /etc/environment\nsource /etc/environment\n\necho -e \"Downloading latest binaries ...\"\n\nsource /etc/os-release > /dev/null 2>&1\nif [ \"$VERSION_ID\" == \"18.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null \n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-18/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"20.04\" ]; then\n apt-get install -y libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-20/hd-community-waf-x86_64.deb &> /dev/null\nelif [ \"$VERSION_ID\" == \"22.04\" ]; then\n apt-get install -y libmaxminddb-dev libmaxminddb0 mmdb-bin python2-dev python2 &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/ubuntu-22/hd-community-waf-x86_64.deb &> /dev/null\nelif [[ \"$ID\" == \"debian\" && \"$VERSION_ID\" == \"11\" ]]; then\n apt-get install -y sudo libmaxminddb-dev python-dev python &> /dev/null\n curl -s -k -o hd-community-waf.deb https://binary.haltdos.com/community/waf/deb/debian-11/hd-community-waf-x86_64.deb &> /dev/null\nfi\n\napt-get install -y ./hd-community-waf.deb &> /dev/null\nrm hd-community-waf.deb\necho -e \"Haltdos Community WAF Installed\"\n\n\ncurl -s -k -o hd-community-controller.deb https://binary.haltdos.com/community/waf/gui/hd-community-controller-x86_64.deb &> /dev/null\napt-get install -y ./hd-community-controller.deb &> /dev/null\nrm hd-community-controller.deb\necho -e \"Haltdos Community Controller Installed\"\n\n\necho -e \"Haltdos Community WAF Setup Done\\n\"\necho -e \"Configure your WAF on https://$ip:9000\\n\"\nexport NEEDRESTART_SUSPEND=0","user_defined_fields":[]},{"id":912262,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Harbor One-Click","description":"Harbor One-Click","ordinal":41,"logo_url":"assets/harbor.svg","images":["linode/ubuntu22.04"],"deployments_total":290,"deployments_active":13,"is_public":true,"mine":false,"created":"2021-09-29T17:06:13","updated":"2023-12-12T10:54:07","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## harbor Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-harbor\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # harbor vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the Harbor server and Let's Encrypt SSL certificate"}]},{"id":1037037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad One-Click","description":"HashiCorp Nomad One Click App","ordinal":42,"logo_url":"assets/nomad.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":105,"deployments_active":3,"is_public":true,"mine":false,"created":"2022-08-02T18:46:19","updated":"2023-12-09T07:05:18","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## set some variables\nexport NOMAD_DIR=/usr/bin\nexport NOMAD_PATH=${NOMAD_DIR}/nomad\nexport NOMAD_CONFIG_DIR=/etc/nomad.d\nexport NOMAD_DATA_DIR=/opt/nomad/data\nexport NOMAD_TLS_DIR=/opt/nomad/tls\nexport NOMAD_ENV_VARS=${NOMAD_CONFIG_DIR}/nomad.conf\nexport IP=$(hostname -I | awk '{print$1}')\n\n\n## install gpg\napt-get install -y gpg\n\n## Install Nomad\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\nsudo apt update -y && sudo apt install -y nomad\n\n#echo \"Start Nomad in -server mode\"\nsudo tee ${NOMAD_ENV_VARS} > /dev/null < ${NOMAD_ENV_VARS}\n[Unit]\nDescription=Nomad Agent\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nRestart=on-failure\nEnvironmentFile=/etc/nomad.d/nomad.conf\nExecStart=/usr/local/bin/nomad agent -config /etc/nomad.d $FLAGS\nExecReload=/bin/kill -HUP $MAINPID\nKillSignal=SIGTERM\nUser=root\nGroup=root\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\n## enable and start nomad\nsystemctl enable nomad\nsystemctl start nomad\n\n## Install Docker\ncurl -fsSL get.docker.com | sudo sh\n\n## Configure nginx container\ncat << EOF > /root/nginx.conf\nevents {}\n\nhttp {\n server {\n location / {\n proxy_pass http://nomad-ws;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n\n # Nomad blocking queries will remain open for a default of 5 minutes.\n # Increase the proxy timeout to accommodate this timeout with an\n # additional grace period.\n proxy_read_timeout 310s;\n\n # Nomad log streaming uses streaming HTTP requests. In order to\n # synchronously stream logs from Nomad to NGINX to the browser\n # proxy buffering needs to be turned off.\n proxy_buffering off;\n\n # The Upgrade and Connection headers are used to establish\n # a WebSockets connection.\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"upgrade\";\n\n # The default Origin header will be the proxy address, which\n # will be rejected by Nomad. It must be rewritten to be the\n # host address instead.\n proxy_set_header Origin \"\\${scheme}://\\${proxy_host}\";\n }\n }\n\n # Since WebSockets are stateful connections but Nomad has multiple\n # server nodes, an upstream with ip_hash declared is required to ensure\n # that connections are always proxied to the same server node when possible.\n upstream nomad-ws {\n ip_hash;\n server host.docker.internal:4646;\n }\n}\nEOF\n\n## start docker container\ndocker run -d --publish=8080:80 --add-host=host.docker.internal:host-gateway \\\n --mount type=bind,source=$PWD/nginx.conf,target=/etc/nginx/nginx.conf \\\n nginx:latest\n\n## firewall\nufw allow 22\nufw allow 80\nufw allow 443\nufw allow 4646\nufw allow 8080\n\ncat << EOF > /etc/motd\n#################################\n The Nomad GUI is now available at HTTP://${IP}:8080\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Nomad configurations at https://www.nomadproject.io/docs/configuration\n#################################\nEOF\n\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1226544,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Cluster One-Click","description":"Nomad Cluster One-Click","ordinal":43,"logo_url":"assets/nomadocc.svg","images":["linode/ubuntu22.04"],"deployments_total":97,"deployments_active":5,"is_public":true,"mine":false,"created":"2023-08-25T19:05:25","updated":"2023-12-03T16:18:47","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\ngit_username=\"akamai-compute-marketplace\"\nexport GIT_REPO_1=\"https://github.com/$git_username/nomad-occ.git\"\nexport GIT_REPO_2=\"https://github.com/$git_username/nomad-client-occ.git\"\nexport DEBIAN_FRONTEND=non-interactive\nexport UUID=$(uuidgen | awk -F - '{print $1}')\nexport CLUSTER_MODE='cluster'\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-server-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n REGION=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .region)\n export REGION=\"${REGION}\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${UUID}-${REGION}\\\"]}\" \\ \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO_1} /tmp/linode\n git clone ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n # clone one branch to test \n # git clone -b develop ${GIT_REPO_1} /tmp/linode\n # git clone -b develop ${GIT_REPO_2} /tmp/linode/nomad-client-occ\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Total instance count","default":"6","oneof":"6"},{"name":"servers","label":"Nomad Server count","default":"3","oneof":"3"},{"name":"clients","label":"Nomad client size","default":"3","oneof":"3"}]},{"id":1226545,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Nomad Clients Cluster One-Click","description":"Nomad Cluster Clients One-Click","ordinal":44,"logo_url":"assets/nomadclientsocc.svg","images":["linode/ubuntu22.04"],"deployments_total":3,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-08-25T19:07:27","updated":"2023-11-14T15:53:47","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}-client-1-${UUID}\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction tag_provisioner {\n echo \"[info] tagging the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" -X PUT \\\n -d \"{\\\"tags\\\": [\\\"${CLUSTER_UUID}\\\"]}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID} \n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=noninteractive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n tag_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n # clone one branch to test \n # git clone -b develop ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Nomad Client Count","default":"3","oneof":"3,5,7"},{"name":"consul_nomad_autojoin_token_password","label":"consul_nomad_autojoin_token generated by Nomad Server OCC"},{"name":"cluster_uuid","label":"cluster_uuid tag for the Nomad Server OCC being joined to.","# git repogit_username":"akamai-compute-marketplace","export git_repo":"https://github.com/$git_username/nomad-client-occ.git"}]},{"id":1037038,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"HashiCorp Vault One-Click","description":"HashiCorp Vault One Click App","ordinal":45,"logo_url":"assets/vault.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":217,"deployments_active":17,"is_public":true,"mine":false,"created":"2022-08-02T18:47:32","updated":"2023-12-12T08:52:30","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nexport IP=$(hostname -I | awk '{print$1}')\nexport VAULT_ADDR=\"http://${IP}:8200\"\n\n## install gpg\napt install -y gpg\n\n## add hashicorp gpg key and repo\nwget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg >/dev/null\necho \"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/hashicorp.list\n\n## install vault\napt update && apt install -y vault\n\n## basic vault configs\nmkdir -p /vault/data\nchown -R vault:vault /vault\ncat << EOF > /etc/vault.d/vault.hcl\nstorage \"raft\" {\n path = \"/vault/data\"\n node_id = \"node1\"\n}\n\nlistener \"tcp\" {\n address = \"${IP}:8200\"\n tls_disable = \"true\"\n}\n\ndisable_mlock = true\n\napi_addr = \"http://127.0.0.1:8200\"\ncluster_addr = \"https://127.0.0.1:8201\"\nui = true\nEOF\n\n## systemd for vault\nsystemctl enable vault.service\n\n## Start vault server and stash the tokens\nsystemctl start vault.service\ntouch /root/.vault_tokens.txt\nsleep 20\nvault operator init | grep 'Token\\|Unseal' >> /root/.vault_tokens.txt\n\n## firewall\nufw allow 22\nufw allow 8200\n\n## config info and recommendations\ncat << EOF > /etc/motd\n#####################################\n The Vault server GUI is now available at ${VAULT_ADDR}\n The randomly generate Unseal Tokens and Initial Root Token are listed in /root/.vault_tokens.txt\n ** STORE THESE VALUES SOMEWHERE SAFE AND SECURE **\n\n This is a minimal installation with limited configurations.\n Please review configurations before using this application in production.\n\n Information on Vault configurations at https://www.vaultproject.io/docs/configuration\n######################################\nEOF\n\nsleep 20\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1177605,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Illa Builder One-Click","description":"Illa Builder One-Click App","ordinal":46,"logo_url":"assets/illabuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":99,"deployments_active":3,"is_public":true,"mine":false,"created":"2023-05-17T14:22:00","updated":"2023-12-11T08:04:06","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Sources OCA helpers\nsource \nsource \nsource \nsource \n# Apt update/upgrade\nexport DEBIAN_FRONTEND=non-interactive\napt update && apt upgrade -y\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 pwgen ufw\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Check to ensure Docker is running and installed correctly\nsystemctl status docker\ndocker -v\n\n# Env config\nILLA_HOME_DIR=~/illa\nPG_VOLUMN=${ILLA_HOME_DIR}/database\nDRIVE_VOLUMN=${ILLA_HOME_DIR}/drive\n\n\n# Init\nmkdir -p ${ILLA_HOME_DIR}\nmkdir -p ${PG_VOLUMN}\nmkdir -p ${DRIVE_VOLUMN}\n\n# Run\ndocker run -d \\\n --name illa_builder \\\n -v $PG_VOLUMN:/opt/illa/database \\\n -v $DRIVE_VOLUMN:/opt/illa/drive \\\n -p 80:2022 \\\n illasoft/illa-builder:latest\n\necho \"\n********************************************************************************\nWelcome to ILLA Builder!\n********************************************************************************\n # ILLA Builder: http://\"$FQDN\"\n # Website: https://www.illacloud.com\n # Documentation: https://www.illacloud.com/docs/about-illa\n # Github: https://github.com/illacloud\n # Community Support: https://github.com/orgs/illacloud/discussions\n\"","user_defined_fields":[]},{"id":607401,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jenkins One-Click","description":"Jenkins One-Click App","ordinal":47,"logo_url":"assets/jenkins.svg","images":["linode/debian11"],"deployments_total":2001,"deployments_active":133,"is_public":true,"mine":false,"created":"2019-10-31T15:29:54","updated":"2023-12-11T20:27:48","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prereq's & Jenkins\napt install -y default-jre wget gnupg2\nwget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -\nsh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'\napt_setup_update\napt install -y jenkins\nsystemctl enable --now jenkins\n\n# Cleanup \nstackscript_cleanup","user_defined_fields":[]},{"id":869623,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"JetBackup One-Click","description":"JetBackup One-Click","ordinal":48,"logo_url":"assets/jetbackup.svg","images":["linode/centos7","linode/almalinux8"],"deployments_total":102,"deployments_active":1,"is_public":true,"mine":false,"created":"2021-07-21T12:45:59","updated":"2023-11-21T02:29:13","rev_note":"","script":"#!/bin/bash\n\n# JetBackup StackScript UDF Variables\n# \n# \n#\n# The next line makes the Official cPanel StackScript available if cPanel/WHM is selected as the control panel. Do not remove this line.\n# source \n#\n# Log File Paths:\n# StackScript Log: /var/log/stackscript.log\n# cPanel/WHM installation: /var/log/stackscript-595742.log\n# Debugging: /var/log/stackscript-debug.log\n#\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>/var/log/stackscript-debug.log\necho \"PID: $$\"\nCONTROLPANEL=${CONTROLPANEL}\nRELEASE=${RELEASETIER}\nJBDIR=\"/usr/local/jetapps/etc/jetbackup5\"\n\nif [[ -z ${CONTROLPANEL} ]]; then\necho \"Error: No panel selected. Please select a panel to deploy JetBackup.\"\nexit 1\nelif [[ -d ${JBDIR} ]]; then\necho \"Error: JetBackup already installed. Aborting StackScript.\"\nexit 0\nfi\n\necho \"Installing JetApps Repository\"\nrpm --import http://repo.jetlicense.com/centOS/RPM-GPG-KEY-JETAPPS\nyum -y -q install http://repo.jetlicense.com/centOS/jetapps-repo-latest.rpm\nyum -y -q install jetapps --disablerepo=* --enablerepo=jetapps\necho \"JetApps Repository Successfully Installed.\"\n\ncpanelinstall() {\n\necho \"Running cPanel/WHM Marketplace StackScript. You can track the progress of cPanel/WHM with: tail -f /var/log/stackscript-595742.log \"\n(source /root/ssinclude-595742 >>/var/log/stackscript-595742.log 2>&1)\n\n}\n\n# JETBACKUP 5 FOR LINUX - STANDALONE INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"Linux\" ]; then\necho \"Installing JetBackup 5.\"\npackage='jetbackup5-linux'\njetapps --install $package $RELEASE\njbhostname=$(hostname)\njbhostname=\"https://${jbhostname}:3035\"\necho \"Adding a Firewall rule to open port 3035. Port 3035 must be open for access to the JetBackup 5 Linux UI.\"\nfirewall-cmd --permanent --add-port=3035/tcp\nfirewall-cmd --reload\necho \"To go to JetBackup and Accept the User Agreement, go to ${jbhostname} and enter your root login credentials.\"\necho \"To generate a one-time JetBackup 5 login URL after installation and acceptance of the EULA type the following command in the terminal:\"\necho \"jb5login\"\nfi\n\n# JETBACKUP 5 FOR CPANEL/WHM INSTALLATION\n\nif [ \"${CONTROLPANEL}\" = \"cPanel/WHM\" ]; then\n\npackage='jetbackup5-cpanel'\ncpanelinstall\nsleep 2\necho \"Installing JetBackup 5.\"\njetapps --install $package $RELEASE\necho \"To log in to cPanel/WHM as root user, please enter the following command to generate a one-time login token:\"\necho \"\"\necho \"whmlogin\"\nfi\n\necho \"Review the JetBackup 5 Getting Started Guide at https://docs.jetbackup.com/v5.1/adminpanel/gettingStarted.html\"\ninstallVersion=\"$(jetbackup5 --version | cut -d ' ' -f 1,3,4 | sed \"2 d\")\"\necho \"${installVersion} Successfully Installed!\"\nrm /root/ssinclude-595742\nrm /root/StackScript\nexit 0","user_defined_fields":[{"name":"CONTROLPANEL","label":"Choose a Control Panel to use with JetBackup 5. cPanel/WHM or Linux (No Control Panel)","default":"cPanel/WHM","oneof":"cPanel/WHM,Linux"},{"name":"RELEASETIER","label":"Choose a JetBackup Release Tier.","default":"stable","oneof":"stable,beta,edge"}]},{"id":662121,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Jitsi One-Click","description":"Jitsi One-Click","ordinal":49,"logo_url":"assets/jitsi.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":4521,"deployments_active":131,"is_public":true,"mine":false,"created":"2020-08-12T16:08:51","updated":"2023-12-12T15:23:16","rev_note":"","script":"#!/bin/bash\n\n## Jitsi Settings\n#\n\n## Domain Settings\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# dependencies\nexport DEBIAN_FRONTEND=noninteractive\napt install apt-transport-https gnupg2 curl wget -y\napt-add-repository universe\napt update -y\n\n#Install Jitisi dep Prosody\necho deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list\nwget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -\napt install lua5.2\n\n#Install Nginx\napt install -y nginx\nsystemctl start nginx\nsystemctl enable nginx\n\n#Install Jitsi Meet\ncurl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg'\necho 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null\n\n# update all package sources\napt update -y\necho \"jitsi-videobridge jitsi-videobridge/jvb-hostname string $FQDN\" | debconf-set-selections\necho \"jitsi-meet-web-config jitsi-meet/cert-choice select 'Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)'\" | debconf-set-selections\napt --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes install jitsi-meet\n\n# Firewall\nsudo ufw allow 80/tcp\nsudo ufw allow 443/tcp\nsudo ufw allow 10000/udp\nsudo ufw allow 22\nsudo ufw allow 3478/udp\nsudo ufw allow 5349/tcp\nsudo ufw enable\n\n# SSL \ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh <\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction lampjoomla {\n apt-get install apache2 mariadb-server php php-common libapache2-mod-php php-cli php-fpm php-mysql php-json php-opcache php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-zip -y\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cat < /etc/php/$PHP_VERSION/apache2/php.ini\nmemory_limit = 512M\nupload_max_filesize = 256M\npost_max_size = 256M \nmax_execution_time = 300\noutput_buffering = off\ndisplay_errors = off\nupload_tmp_dir = \"/var/www/html/joomla/tmp\"\nEND\n}\n\nfunction databaseconf {\n run_mysql_secure_installation\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE DATABASE joomla_db;\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER 'joomla'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD';\"\n mysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla'@'localhost';\"\n}\n\nfunction apachejoomla {\n apt-get install wget unzip -y\n mkdir -p /var/www/html/joomla\n cd /tmp && wget https://downloads.joomla.org/cms/joomla4/4-1-0/Joomla_4-1-0-Stable-Full_Package.zip?format=zip\n unzip Joomla_4* -d /var/www/html/joomla\n chown -R www-data:www-data /var/www/html/joomla \n chmod -R 755 /var/www/html/joomla\n cat < /etc/apache2/sites-available/joomla.conf\n\n ServerAdmin $SOA_EMAIL_ADDRESS\n DocumentRoot /var/www/html/joomla\n ServerName $FQDN\n\n \n Options FollowSymlinks\n AllowOverride All\n Require all granted\n \n\n ErrorLog ${APACHE_LOG_DIR}/$FQDN_error.log\n CustomLog ${APACHE_LOG_DIR}/$FQDN_access.log combined\n\n\nEND\n a2ensite joomla.conf\n a2enmod rewrite\n a2enmod php$PHP_VERSION\n a2dissite 000-default.conf\n systemctl restart apache2\n\n ufw allow http\n ufw allow https\n}\nfunction ssljoomla {\n apt install certbot python3-certbot-apache -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n}\n\nfunction main {\n lampjoomla\n databaseconf\n apachejoomla\n ssljoomla\n stackscript_cleanup\n}\n# Execute script\nmain","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":985380,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Joplin One-Click","description":"Joplin One-Click","ordinal":51,"logo_url":"assets/joplin.svg","images":["linode/ubuntu20.04"],"deployments_total":424,"deployments_active":31,"is_public":true,"mine":false,"created":"2022-03-08T18:14:30","updated":"2023-12-09T22:04:54","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Joplin setup\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-joplin\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n \n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # Joplin vars\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n \n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":688912,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Kepler Builder One-Click","description":"Kepler Builder One-Click","ordinal":52,"logo_url":"assets/keplerbuilder.svg","images":["linode/ubuntu22.04"],"deployments_total":264,"deployments_active":4,"is_public":true,"mine":false,"created":"2020-11-17T21:17:33","updated":"2023-12-06T21:13:24","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-keplerbuilder\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401701,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LAMP One-Click","description":"LAMP One-Click","ordinal":53,"logo_url":"assets/LAMP.svg","images":["linode/ubuntu22.04"],"deployments_total":13746,"deployments_active":1111,"is_public":true,"mine":false,"created":"2019-03-09T02:07:09","updated":"2023-12-12T15:27:55","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LAMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-lamp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lamp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":606691,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LEMP One-Click","description":"LEMP Stack","ordinal":54,"logo_url":"assets/LEMP.svg","images":["linode/ubuntu22.04"],"deployments_total":4161,"deployments_active":314,"is_public":true,"mine":false,"created":"2019-10-27T15:29:04","updated":"2023-12-12T02:47:42","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## LEMP Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-lemp\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n webserver_stack: lemp\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":923032,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiteSpeed cPanel One-Click","description":"LiteSpeed cPanel One-Click","ordinal":55,"logo_url":"assets/litespeedcpanel.svg","images":["linode/almalinux8"],"deployments_total":1017,"deployments_active":21,"is_public":true,"mine":false,"created":"2021-10-18T00:57:12","updated":"2023-12-08T17:46:01","rev_note":"","script":"#!/bin/bash\n## Logging\nexec > /var/log/stackscript.log 2>&1\n## Install cPanel\nyum install -y kernel grub2\nsed -i -e \"s/GRUB_TIMEOUT=5/GRUB_TIMEOUT=10/\" /etc/default/grub\nsed -i -e \"s/crashkernel=auto rhgb console=ttyS0,19200n8/console=ttyS0,19200n8/\" /etc/default/grub\nmkdir /boot/grub\ngrub2-mkconfig -o /boot/grub/grub.cfg\nsystemctl stop firewalld.service\nsystemctl disable firewalld.service\nsystemctl stop NetworkManager\nsystemctl disable NetworkManager\nsystemctl enable network\nsystemctl start network\nyum remove NetworkManager -y\ncd /home \ncurl -o latest -L https://securedownloads.cpanel.net/latest && sh latest\nyum remove ea-apache24-mod_ruid2 -y\n## Install LSWS on cPanel\nADMIN_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo '')\ncat <>/home/lsws.options\n## 1 = enable, 0 = disable, 2 = user home directory\nphp_suexec=\"2\"\nport_offset=\"0\"\nadmin_user=\"admin\"\nadmin_pass=\"${ADMIN_PASS}\"\nadmin_email=\"root@localhost\"\neasyapache_integration=\"1\"\nauto_switch_to_lsws=\"1\"\ndeploy_lscwp=\"1\"\nEOT\nbash <( curl https://get.litespeed.sh ) TRIAL","user_defined_fields":[]},{"id":1008123,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"LiveSwitch One-Click","description":"LiveSwitch One-Click","ordinal":56,"logo_url":"assets/liveswitch.svg","images":["linode/ubuntu20.04"],"deployments_total":195,"deployments_active":1,"is_public":true,"mine":false,"created":"2022-05-18T16:41:37","updated":"2023-12-09T04:23:19","rev_note":"","script":"#!/bin/bash\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n## Import the Bash StackScript Library\nsource \n\nsudo dpkg --configure -a\n\n# kill any background updater jobs\nsudo killall apt apt-get\n\n# helpers\nsudo apt-get install dialog apt-utils -y -q\n\nsudo DEBIAN_FRONTEND=noninteractive apt-get update -y\nsudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef -y\n\n# firewall\n# normal defaults\nsudo ufw default deny incoming\nsudo ufw default allow outgoing\n# ssh on\nsudo ufw allow ssh\n# dynamic inbound traffic\nsudo ufw allow 49152:65535/udp\n# TURN\nsudo ufw allow 3478/udp\n# TURN TCP\nsudo ufw allow 80/tcp\n# TURNS\nsudo ufw allow 443/tcp\n# admin (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 9090/tcp\nsudo ufw allow 9443/tcp\n# gateway (only really should do this for a demo system where it's all on one box)\nsudo ufw allow 8080/tcp\nsudo ufw allow 8443/tcp\n\n# sip\n# sudo ufw allow 5061/udp\n# sudo ufw allow 5061/tcp\n\n# we will turn on the firewall at the end because it disconnects us\n\n# install docker\nsudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\napt-cache policy docker-ce\nsudo apt-get install -y docker-ce\n\n# entropy fix for docker\nsudo apt-get install -y haveged\n\n# install docker compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n\n# retrieve docker compose files\nmkdir -p /opt/liveswitch\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose-liveswitch.service\" -o /opt/liveswitch/docker-compose-liveswitch.service\nsudo curl -L \"https://raw.githubusercontent.com/jvenema/liveswitch-docker-compose/main/docker-compose.yml\" -o /opt/liveswitch/docker-compose.yml\n\n# install liveswitch docker compose\nsudo cp /opt/liveswitch/docker-compose-liveswitch.service /etc/systemd/system/\nsudo systemctl enable docker\nsudo systemctl enable docker-compose-liveswitch\nsudo systemctl start docker-compose-liveswitch\n\n# clean up some logs\nsudo rm -f /var/log/cloud-init-output.log\nsudo rm -f /var/log/dpkg.log\nsudo rm -f /var/log/kern.log\nsudo rm -f /var/log/ufw.log\n\n# turn on the firewall\nsudo ufw --force enable\nsudo reboot","user_defined_fields":[]},{"id":869159,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MagicSpam One-Click","description":"MagicSpam One-Click","ordinal":57,"logo_url":"assets/magicspam.svg","images":["linode/centos7"],"deployments_total":6,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-07-20T19:13:52","updated":"2023-12-11T15:26:23","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\n# source the stackscript for the selected control panel\nif [ \"$CONTROL_PANEL\" == \"cPanel\" ]; then\n # redirect ALL output to the stackscript log for future troubleshooting\n exec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n # cPanel Marketplace App install\n source \n\n # set the hostname to replicate Plesk stackscript for consistent behavior\n IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n echo $HOSTNAME > /etc/hostname\n hostname -F /etc/hostname\n echo $IPADDR $HOSTNAME >> /etc/hosts\nelif [ \"$CONTROL_PANEL\" == \"Plesk\" ]; then\n # Plesk Marketplace App install\n # NOTE: do not redirect output to the stackscript log to avoid duplicate log\n # lines as the Plesk stackscript already redirects to it\n source \nelse\n echo \"Invalid control panel option detected. Aborting...\"\n exit 1\nfi\n\n# install MagicSpam via the installer script\nwget https://www.magicspam.com/download/magicspam-installer.sh -O /root/magicspam-installer\nchmod +x /root/magicspam-installer\n/root/magicspam-installer -l \"$MS_LICENSE_KEY\"","user_defined_fields":[{"name":"control_panel","label":"The Control Panel to deploy alongside with MagicSpam. Make sure to select an Image supported by the selected Control Panel. For more information, please refer to the MagicSpam App Information Sidebar.","oneof":"cPanel,Plesk"},{"name":"ms_license_key","label":"The MagicSpam license key. Please make sure to use the appropriate license key for the selected Control Panel. For more information, please refer to the MagicSpam App information sidebar."},{"name":"hostname","label":"The server's hostname."}]},{"id":1243759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept FFmpeg Plugins Demo One-Click","description":"MainConcept FFmpeg Plugins","ordinal":58,"logo_url":"assets/mainconcept.svg","images":["linode/debian11"],"deployments_total":6,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-09-28T15:02:48","updated":"2023-12-06T21:14:38","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\n\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-ffmpeg-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""}]},{"id":1243760,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept Live Encoder Demo One-Click","description":"MainConcept Live Encoder\r\n\r\n","ordinal":59,"logo_url":"assets/mainconcept.svg","images":["linode/centos-stream9"],"deployments_total":20,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-09-28T15:04:08","updated":"2023-12-06T15:19:44","rev_note":"","script":"#!/bin/bash\n\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-live-encoder-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(dnsdomainname -A | awk '{print $1}')\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n yum install dnf -y\n dnf update -y\n dnf upgrade -y\n dnf install -y git python3 python3-pip\n\n dnf makecache\n dnf install epel-release -y\n dnf makecache\n dnf install ansible -y\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone --single-branch --branch ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -vvvv $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SSL Generation","default":""}]},{"id":1243762,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept P2 AVC ULTRA Transcoder Demo One-Click","description":"MainConcept P2 AVC ULTRA Transcoder","ordinal":60,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:01","updated":"2023-12-07T16:54:44","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept P2 AVC Ultra Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-p2-avc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept P2 AVC Ultra Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243763,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XAVC Transcoder Demo One-Click","description":"MainConcept XAVC Transcoder","ordinal":61,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":2,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:05:47","updated":"2023-12-06T21:20:30","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XAVC Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xavc-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XAVC Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1243764,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MainConcept XDCAM Transcoder Demo One-Click","description":"MainConcept XDCAM Transcoder","ordinal":62,"logo_url":"assets/mainconcept.svg","images":["linode/ubuntu22.04"],"deployments_total":1,"deployments_active":0,"is_public":true,"mine":false,"created":"2023-09-28T15:06:28","updated":"2023-12-06T21:21:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## MainConcept XDCAM Transcoder Demo Settings\n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-mc-xdcam-demo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n mc_port: ${MC_PORT}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n \n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"No domain entered\";\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"mc_port","label":"MainConcept XDCAM Transcoder API Port","example":"Default: 8080","default":"8080"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"soa_email_address","label":"Email address for domain SOA. REQUIRED for DNS","example":"user@domain.tld","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1096122,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mastodon One-Click","description":"Mastodon is an open-source and decentralized micro-blogging platform, supporting federation and public access to the server.","ordinal":63,"logo_url":"assets/mastodon.svg","images":["linode/debian11"],"deployments_total":1696,"deployments_active":62,"is_public":true,"mine":false,"created":"2022-12-05T15:57:04","updated":"2023-12-11T21:43:20","rev_note":"","script":"#!/bin/bash\nset -x\n## Mastodon Settings\n#\n#\n#\n#\n#\n#\n\n\n# git repo + workdirs\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/mastodon-oca.git\"\nexport WORK_DIR=\"/tmp/oca-deployment\"\nexport LINODE_API_TOKEN=\"${TOKEN_PASSWORD}\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nsource \n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction setup {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip python3-dev build-essential\n\n #clone repo and set up ansible environment\n mkdir -p ${WORK_DIR}\n cd ${WORK_DIR}\n git clone $GIT_REPO\n cd mastodon-oca\n\n # write udf vars\n cat < group_vars/mastodon/vars\n domain: ${DOMAIN}\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n owner_username: ${OWNER_USERNAME}\n owner_email: ${OWNER_EMAIL}\n single_user_mode: ${SINGLE_USER_MODE}\nEND\n\n #venv\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n}\n\nfunction run {\n# run playbooks\n ansible-playbook -v site.yml\n}\n\n# main\nsetup\nrun\ncleanup\necho \"Installation Complete!\"","user_defined_fields":[{"name":"domain","label":"Domain name for your Mastodon instance.","example":"domain.tld"},{"name":"token_password","label":"Your Linode API token"},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"owner_username","label":"Username for Mastodon Owner","example":""},{"name":"owner_email","label":"Email address for Mastodon Owner","example":"owner@example.com"},{"name":"single_user_mode","label":"Do you want to start Mastodon in single-user mode?","oneof":"Yes,No"}]},{"id":611895,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MEAN One-Click","description":"MEAN One-Click","ordinal":64,"logo_url":"assets/mean.svg","images":["linode/ubuntu20.04"],"deployments_total":726,"deployments_active":36,"is_public":true,"mine":false,"created":"2019-11-14T04:49:44","updated":"2023-12-06T14:01:30","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MEAN Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction dependmean {\n apt-get install -y build-essential git fontconfig libpng-dev ruby ruby-dev wget gnupg\n gem install sass\n}\n\nfunction mongoinstall {\n cd && wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n echo \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\n\nfunction meaninstall {\n apt-get install -y curl software-properties-common\n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n apt-get install -y nodejs\n\n # MEAN APP CONFIGURATION\n cd && mkdir -p /opt/mean\n cd /opt/mean\n cat <> package.json\n{\n\"name\" : \"mean\",\n\"version\": \"0.0.1\"\n}\nEND\n npm install express --save\n npm install angular\n cat <> server.js\nvar express = require('express');\nvar app = express();\nvar port = 3000;\napp.get('/', function(req, res) {\nres.send('Hello World Powered By: Linode Marketplace');\n});\napp.listen(port, function(){\nconsole.log(\"Listening at port: \" + port);\n})\nEND\n # Start App on reboot\n cd && npm install pm2 -g\n pm2 start --name=\"MEAN_APP\" /opt/mean/server.js\n pm2 startup \n pm2 save\n}\n\nfunction nginxmean {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslmean {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallmean {\n ufw allow http\n ufw allow https\n}\n\nfunction main {\n dependmean\n firewallmean\n mongoinstall\n meaninstall\n nginxmean\n sslmean\n\n}\n\n# execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":401702,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MERN One-Click","description":"MERN One-Click","ordinal":65,"logo_url":"assets/MERN.svg","images":["linode/debian10","linode/ubuntu20.04","linode/debian11"],"deployments_total":1433,"deployments_active":58,"is_public":true,"mine":false,"created":"2019-03-08T21:07:40","updated":"2023-12-10T12:50:08","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3000\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install dependencies\napt-get install -y build-essential git \n\n# Install Mongodb\napt-get install -y wget gnupg\nwget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \necho \"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get update -y\napt-get install -y mongodb-org\nsystemctl enable mongod.service\nsystemctl start mongod.service\n\n# Install NodeJS and NPM\napt-get install -y curl software-properties-common\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \ncurl -fsSL https://deb.nodesource.com/setup_16.x | bash -\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\ncurl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\nelse \necho \"Setting this up for the future incase we add more distros\"\nfi\napt-get install -y nodejs\n\n# Install ExpressJS\nnpm update -g\nnpm install --global express\nnpm link express\nnpm -g install create-react-app\ncd /opt\ncreate-react-app hello-world\nnpm i --package-lock-only\nnpm audit fix\n\n# Start App on reboot\ncat < /lib/systemd/system/hello-world.service\n[Unit]\nDescription=Hello World React Application Service\nRequires=hello-world.service\nAfter=hello-world.service\n\n[Service]\nType=simple\nUser=root\nRemainAfterExit=yes\nRestart=on-failure\nWorkingDirectory=/opt/hello-world\nExecStart=npm start --host 0.0.0.0 --port=3000\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nsystemctl daemon-reload\nsystemctl start hello-world\nsystemctl enable hello-world\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":1051714,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Microweber One-Click","description":"Microweber One-Click","ordinal":66,"logo_url":"assets/microweber.svg","images":["linode/ubuntu20.04"],"deployments_total":478,"deployments_active":21,"is_public":true,"mine":false,"created":"2022-09-01T15:43:41","updated":"2023-12-09T11:00:07","rev_note":"","script":"#!/usr/bin/env bash\n# https://github.com/microweber/microweber\nset -o pipefail\nMICROWEBER_INSTALLER_TAG=\"1.3.1\"\nWORKING_DIR=\"/var/www/html\"\nDOWNLOAD_URL='http://updater.microweberapi.com/builds/master/microweber.zip'\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## 03-force-ssh-logout.sh\ncat >>/etc/ssh/sshd_config </dev/null\napt install -y apache2 libapache2-mod-php8.1\napt install -y mysql-server\napt install -y php8.1-{bcmath,xml,fpm,mysql,iconv,xsl,zip,intl,ldap,gd,cli,dev,bz2,curl,exif,mbstring,pgsql,sqlite3,tokenizer,opcache,soap,cgi,common,imap,opcache}\napt install -y python3-certbot-apache software-properties-common unzip curl\napt install -y php-pear\npecl install -f libsodium\nsed -i 's/;opcache.enable\\s*=.*/opcache.enable=1/g' /etc/php/8.1/cli/php.ini\necho 'extension=sodium.so' > /etc/php/8.1/cli/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/fpm/10-sodium.ini\necho 'extension=sodium.so' > /etc/php/8.1/cgi/10-sodium.ini\n# 01-fs.sh\ncat >/etc/apache2/sites-available/000-default.conf <\n \n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n \n ServerAdmin webmaster@localhost\n DocumentRoot /var/www/html\n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEOM\ncat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com\nIMPORTANT:\n * After connecting to the server for the first time, immediately install\n Microweber at http://\\$myip/\n * Secure your database by running:\n > mysql_secure_installation\nFor help and more information visit https://microweber.org\n********************************************************************************\nTo delete this message of the day: rm -rf \\$(readlink -f \\${0})\nEOF\nEOM\nchmod +x /etc/update-motd.d/99-one-click\ncat >/etc/cron.d/microweber </etc/php/8.1/apache2/conf.d/30-microweber.ini <>/var/log/per-instance.log\nMYSQL_ROOT_PASS=$(openssl rand -hex 16)\nDEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16)\nMICROWEBER_DB_HOST=localhost\nMICROWEBER_DB_PORT=3306\nMICROWEBER_DB_NAME=microweber\nMICROWEBER_DB_USER=microweber\nMICROWEBER_DB_PASS=$(openssl rand -hex 16)\ncat >/root/.mysql_password <>/etc/apache2/envvars </etc/mysql/debian.cnf <>/var/log/per-instance.log\necho \"[OK] Microweber Installer $MICROWEBER_INSTALLER_TAG provisioned!\"","user_defined_fields":[]},{"id":691614,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Mist.io One-Click","description":"Mist.io One-Click","ordinal":67,"logo_url":"assets/mistio.svg","images":["linode/debian10"],"deployments_total":326,"deployments_active":1,"is_public":true,"mine":false,"created":"2020-11-30T20:25:44","updated":"2023-12-12T12:08:07","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# apt-get updates\n echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get update -y\n\n# \n\n# \n\n## install docker\nsudo apt-get install -y \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n gnupg-agent \\\n software-properties-common\n\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -\n\nsudo add-apt-repository \\\n \"deb [arch=amd64] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) \\\n stable\"\n\nsudo apt-get update\n\nsudo apt-get install -y docker-ce docker-ce-cli containerd.io\n\n## install docker-compose\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n\nsudo chmod +x /usr/local/bin/docker-compose\n\n## get latest mist\nmkdir ~/mist && cd ~/mist\n\nexport MIST_CE_REPO=https://github.com/mistio/mist-ce/releases/latest\nexport LATEST_TAG=\"$(curl -sI \"${MIST_CE_REPO}\" | grep -Po 'tag\\/\\K(v\\S+)')\"\n\nwget https://github.com/mistio/mist-ce/releases/download/$LATEST_TAG/docker-compose.yml\n\n# set CORE_URI\nmkdir settings\nexport IP=$(ip r | grep /24 | grep -Eo \"([0-9]{1,3}[\\.]){3}[1-9]{1,3}\")\necho 'CORE_URI=\"http://'$IP'\"' > settings/settings.py\n\ndocker-compose up -d\n\nwhile !(curl -sSLf http://localhost >/dev/null); do\n sleep 5\ndone\n\ndocker-compose exec -T api ./bin/adduser --admin \"${MIST_EMAIL}\" --password \"${MIST_PASSWORD}\"","user_defined_fields":[{"name":"mist_email","label":"Mist admin user's email.","example":"Set your admin user's email."},{"name":"mist_password","label":"Mist admin user's password.","example":"Set your admin user's password."}]},{"id":609195,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB One-Click","description":"MongoDB One-Click","ordinal":68,"logo_url":"assets/mongodb.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":1757,"deployments_active":78,"is_public":true,"mine":false,"created":"2019-11-06T07:14:07","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\n## Mongo Settings\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction mongoinstall {\n apt-get install -y wget gnupg\n if [ $MONGOVERSION == \"5.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list\n elif [ $MONGOVERSION == \"4.4\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list\n elif [ $MONGOVERSION == \"4.2\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list\n elif [ $MONGOVERSION == \"4.0\" ]; then\n wget -qO - https://www.mongodb.org/static/pgp/server-4.0.asc | sudo apt-key add -\n echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list\n fi\n\n apt-get update -y\n apt-get install -y mongodb-org\n systemctl enable mongod.service\n systemctl start mongod.service\n}\n\nfunction createmongouser {\n echo \"Creating Mongo User\" & sleep 3\n mongo < /etc/mongod.conf\n# mongod.conf\n# for documentation of all options, see:\n# http://docs.mongodb.org/manual/reference/configuration-options/\n# Where and how to store data.\nstorage:\n dbPath: /var/lib/mongodb\n journal:\n enabled: true\n# engine:\n# wiredTiger:\n# where to write logging data.\nsystemLog:\n destination: file\n logAppend: true\n path: /var/log/mongodb/mongod.log\n# network interfaces\nnet:\n port: 27017\n bindIp: 127.0.0.1\n# how the process runs\nprocessManagement:\n timeZoneInfo: /usr/share/zoneinfo\nsecurity:\n authorization: enabled\n#operationProfiling:\n#replication:\n#sharding:\n## Enterprise-Only Options:\n#auditLog:\n#snmp:\nEOF\n service mongod restart\n}\n\nfunction main {\n mongoinstall\n createmongouser \n setauth\n}\n\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"db_password","label":"Mongo Password"},{"name":"mongoversion","label":"Mongo Version","oneof":"5.0,4.4,4.2,4.0","default":"5.0"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for soa record","default":""}]},{"id":1067004,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MongoDB Cluster One-Click","description":"MongoDB replica set","ordinal":69,"logo_url":"assets/mongodbmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":49,"deployments_active":0,"is_public":true,"mine":false,"created":"2022-09-29T18:32:36","updated":"2023-10-18T12:38:33","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_PAT=\"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\"\nexport GIT_REPO=\"https://linode-solutions:${GIT_PAT}@github.com/linode-solutions/mongodb-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/mongodb-cluster\" ]; then\n rm -rf /tmp/mongodb-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction destroy_linode {\n curl -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X DELETE \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction add_privateip {\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[+] Linode private IP present\"\n else\n echo \"[!] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # Rename Provisioner & add Private IP \n rename_provisioner\n configure_privateip \n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/mongodb-cluster\n cd /tmp/mongodb-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"cluster_name","label":"Domain Name"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Mongo CA"},{"name":"common_name","label":"Common Name","default":"Mongo Server"},{"name":"cluster_size","label":"MongoDB cluster size","default":"3","oneof":"3"}]},{"id":869127,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Moodle One-Click","description":"Moodle One-Click","ordinal":70,"logo_url":"assets/moodle.svg","images":["linode/ubuntu20.04"],"deployments_total":1304,"deployments_active":102,"is_public":true,"mine":false,"created":"2021-07-20T18:48:49","updated":"2023-12-12T02:13:31","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n## Moodle settings\n#\n#\n#\n#\n\n## Domain settings\n#\n#\n#\n\n## Linode/SSH Security Settings \n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# System Update\nsystem_update\n\n# Install dependencies \napt install -y apache2 mysql-client mysql-server php libapache2-mod-php git graphviz aspell ghostscript clamav php7.4-pspell php7.4-curl php7.4-gd php7.4-intl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-ldap php7.4-zip php7.4-soap php7.4-mbstring\n\n# Firewall\nufw allow http \nufw allow https\n\n# Secure MySQL\nrun_mysql_secure_installation_ubuntu20\n\n# Install Moodle\ncd /var/www/html\ngit clone git://git.moodle.org/moodle.git\ncd moodle\ngit branch --track MOODLE_39_STABLE origin/MOODLE_39_STABLE\ngit checkout MOODLE_39_STABLE\n\n# Configure Moodle\nmkdir /var/moodledata\nchmod -R 777 /var/moodledata \nchmod -R 755 /var/www/html/moodle \n\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"CREATE USER 'moodle'@'localhost' IDENTIFIED BY '$DB_PASSWORD';\";\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodle'@'localhost';\"\nmysql -uroot -p\"$DBROOT_PASSWORD\" -e \"FLUSH PRIVILEGES\";\n\ncat < /etc/apache2/sites-available/moodle.conf\n\n ServerAdmin admin@$FQDN\n DocumentRoot /var/www/html/moodle/\n ServerName $FQDN\n ServerAlias www.$FQDN \n \n Options +FollowSymlinks\n AllowOverride All\n Require all granted\n \n ErrorLog \\${APACHE_LOG_DIR}/error.log\n CustomLog \\${APACHE_LOG_DIR}/access.log combined\n\nEND\n\na2enmod rewrite\na2ensite moodle.conf\na2dissite 000-default.conf\nservice apache2 restart\n\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n/usr/bin/php admin/cli/install.php --chmod=777 --lang=en_us --wwwroot=https://$FQDN --dataroot=/var/moodledata/ --dbtype=mysqli --dbhost=localhost --dbname=moodle --dbuser=moodle --dbpass=$DB_PASSWORD --dbport=3306 --dbsocket=1 --prefix=mdl_ --fullname=moodle --shortname=moodle --summary=\"Moodle: Powered By Linode Marketplace\" --adminuser=moodle --adminpass=\"$ADMIN_PASSWORD\" --adminemail=$SOA_EMAIL_ADDRESS --upgradekey= --non-interactive --agree-license\n\nchown -R www-data: /var/www/html/moodle\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"admin_password","label":"Moodle Admin Password"},{"name":"soa_email_address","label":"Moodle Admin Email"},{"name":"dbroot_password","label":"MySQL Root Password"},{"name":"db_password","label":"Moodle database User password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":607026,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"MySQL/MariaDB One-Click","description":"MySql One Click","ordinal":71,"logo_url":"assets/mysql.svg","images":["linode/ubuntu20.04"],"deployments_total":4605,"deployments_active":335,"is_public":true,"mine":false,"created":"2019-10-29T19:03:33","updated":"2023-12-11T19:45:23","rev_note":"Initial import","script":"#!/usr/bin/env bash\n\n## MySQL Settings\n#\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 3306\nfail2ban_install\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\nif [[ \"$DATABASE\" == \"MySQL\" ]]; then\n # Install/configure MySQL\n apt install -y mysql-server\n # Secure MySQL install\n run_mysql_secure_installation_ubuntu20 \nelse \n # Install/configure MySQL\n apt install -y mariadb-server\n # Secure MySQL install\n run_mysql_secure_installation\nfi\n\nmysql -uroot -p$DBROOT_PASSWORD -e \"create database $DATABASE_NAME;\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"CREATE USER '$DBUSER' IDENTIFIED BY '$DBUSER_PASSWORD';\"\nmysql -uroot -p$DBROOT_PASSWORD -e \"GRANT ALL PRIVILEGES ON $DATABASE_NAME.* TO '$DBUSER'@'%' WITH GRANT OPTION;\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"database","label":"Would you like to install MySQL or MariaDB?","oneof":"MySQL,MariaDB"},{"name":"dbroot_password","label":"MySQL Root Password","example":"s3cur3_9a55w04d"},{"name":"dbuser","label":"MySQL User","example":"user1"},{"name":"dbuser_password","label":"MySQL User Password","example":"s3cur3_9a55w04d"},{"name":"database_name","label":"Create Database","example":"testdb"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970561,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NodeJS One-Click","description":"NodeJS One-Click","ordinal":72,"logo_url":"assets/nodejs.svg","images":["linode/ubuntu20.04"],"deployments_total":2158,"deployments_active":264,"is_public":true,"mine":false,"created":"2022-02-07T17:21:41","updated":"2023-12-12T10:17:05","rev_note":"","script":"#!/usr/bin/env bash\n\n## NodeJS Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction nodejs {\n if [ \"${detected_distro[distro]}\" = 'debian' ]; then \n curl -fsSL https://deb.nodesource.com/setup_16.x | bash -\n elif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\n curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -\n else \n echo \"Setting this up for the future incase we add more distros\"\n fi\n apt-get install -y nodejs\n \n mkdir -p /opt/nodejs\n cat < /opt/nodejs/hello.js\nconst http = require('http');\n\nconst hostname = 'localhost';\nconst port = 3000;\n\nconst server = http.createServer((req, res) => {\n res.statusCode = 200;\n res.setHeader('Content-Type', 'text/plain');\n res.end('Hello World Powered By Linode Marketplace');\n});\n\nserver.listen(port, hostname, () => {\n console.log(`Server running at http://localhost:3000/`);\n});\nEND\n}\n\nfunction pm2nodejs {\n npm install pm2@latest -g --no-audit\n cd /opt/nodejs/\n pm2 start hello.js\n sleep 5\n pm2 startup systemd\n sleep 5\n pm2 save\n}\n\nfunction nginxnodejs {\n apt-get install nginx -y \n cat < /etc/nginx/sites-available/$FQDN\nserver {\n server_name $FQDN www.$FQDN;\n\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host \\$host;\n proxy_cache_bypass \\$http_upgrade;\n }\n\n}\nEND\n ln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/\n unlink /etc/nginx/sites-enabled/default\n nginx -t\n systemctl reload nginx\n}\n\nfunction sslnodejs {\n apt install certbot python3-certbot-nginx -y\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction firewallnodejs {\n ufw allow http\n ufw allow https\n\n}\nfunction main {\n nodejs\n pm2nodejs\n firewallnodejs \n nginxnodejs \n sslnodejs \n}\n\n# Execute Script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This is the Email address for the LetsEncrypt SSL Certificate","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":869156,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"NirvaShare One-Click","description":"NirvaShare One-Click","ordinal":73,"logo_url":"assets/nirvashare.svg","images":["linode/ubuntu22.04"],"deployments_total":216,"deployments_active":3,"is_public":true,"mine":false,"created":"2021-07-20T19:08:35","updated":"2023-12-06T21:21:49","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Nirvashare Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-nirvashare\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # Nirvashare \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":971043,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Odoo One-Click","description":"Odoo One-Click","ordinal":74,"logo_url":"assets/odoo.svg","images":["linode/ubuntu22.04"],"deployments_total":1836,"deployments_active":90,"is_public":true,"mine":false,"created":"2022-02-08T16:21:37","updated":"2023-12-12T15:08:11","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## ODOO Settings \n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-odoo\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # ODOO vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":1102907,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ONLYOFFICE Docs One-Click","description":"ONLYOFFICE Docs One-Click app","ordinal":75,"logo_url":"assets/onlyoffice.svg","images":["linode/ubuntu22.04"],"deployments_total":291,"deployments_active":13,"is_public":true,"mine":false,"created":"2022-12-20T17:50:23","updated":"2023-12-02T15:29:24","rev_note":"","script":"#!/usr/bin/env bash\n# \n# \n# \n\n# SSL Settings\n# \n# \n# \n# \n\n# Enable Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n\n# Get and install docker\n# curl -fsSL get.docker.com | sudo sh\napt install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \napt update\napt install -y docker-ce\nsystemctl enable --now docker.service\n\nCONTAINER_NAME=\"onlyoffice-docs\"\n\n# Run ONLYOFFICE-Docs with SSL\nif [[ \"${SSL_ENABLED}\" == \"true\" ]]; then\n\tif [[ -z ${ABS_DOMAIN} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_DOMAIN parameter for correct SSL work\"\n\t\texit 1\n\tfi\n\tif [[ -z ${LETS_ENCRYPT_MAIL} ]]; then\n\t\techo \"Missing required LETS_ENCRYPT_MAIL parameter for correct SSL work\"\n\t\texit 1\n fi\n\tsudo docker run -i -t -d -p 80:80 -p 443:443 \\\n\t\t-e JWT_ENABLED=${JWT_ENABLED} \\\n \t\t-e JWT_SECRET=${JWT_SECRET} \\\n\t\t-e LETS_ENCRYPT_DOMAIN=${ABS_DOMAIN} \\\n -e LETS_ENCRYPT_MAIL=${LETS_ENCRYPT_MAIL} \\\n\t\t-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n\t\t-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n \t-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n \t-v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n \t-v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n \t-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n\t\t--name ${CONTAINER_NAME} \\\n\t\tonlyoffice/documentserver:${DOCS_VERSION}\n\telse \n# Run ONLYOFFICE-Docs without SSL\n\tsudo docker run -i -t -d -p 80:80 \\\n -e JWT_ENABLED=${JWT_ENABLED} \\\n -e JWT_SECRET=${JWT_SECRET} \\\n -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \\\n -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \\\n -v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \\\n -v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \\\n -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \\\n --name ${CONTAINER_NAME} \\\n onlyoffice/documentserver:${DOCS_VERSION}\nfi\n\n# Wait for run\nready_check() {\n echo -e \"\\e[0;32m Waiting for the launch of DocumentServer... \\e[0m\" \n for i in {1..30}; do\n echo \"Getting the DocumentServer status: ${i}\"\n OUTPUT=\"$(curl -Is http://localhost/healthcheck/ | head -1 | awk '{ print $2 }')\"\n if [ \"${OUTPUT}\" == \"200\" ]; then\n echo -e \"\\e[0;32m DocumentServer is ready \\e[0m\"\n local DS_READY\n DS_READY='yes'\n break\n else\n sleep 10\n fi\n done\n if [[ \"${DS_READY}\" != 'yes' ]]; then\n err \"\\e[0;31m Something goes wrong documentserver does not started, check logs with command --> docker logs -f ${CONTAINER_NAME} \\e[0m\"\n exit 1\n fi\n}\n\nready_check\n\n# Enable Docs-example\nsudo docker exec ${CONTAINER_NAME} supervisorctl start ds:example\n\n# Add Docs-example to autostart\nsudo docker exec ${CONTAINER_NAME} sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf\n\n# Add MOTD \ncat >/etc/motd < >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Django\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/djangosetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Reboot server\nreboot","user_defined_fields":[]},{"id":923031,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed NodeJS One-Click","description":"OpenLiteSpeed NodeJS One-Click","ordinal":77,"logo_url":"assets/openlitespeednodejs.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":500,"deployments_active":19,"is_public":true,"mine":false,"created":"2021-10-18T00:52:51","updated":"2023-12-08T12:05:05","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and NodeJS\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/nodejssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":923030,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed Rails One-Click","description":"OpenLiteSpeed Rails One-Click","ordinal":78,"logo_url":"assets/openlitespeedrails.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":51,"deployments_active":0,"is_public":true,"mine":false,"created":"2021-10-18T00:51:05","updated":"2023-12-09T06:40:57","rev_note":"","script":"#!/bin/bash\n### linode\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n### Install OpenLiteSpeed and Rails\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/railssetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )","user_defined_fields":[]},{"id":691622,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenLiteSpeed WordPress One-Click","description":"OpenLiteSpeed WordPress One-Click","ordinal":79,"logo_url":"assets/openlitespeedwordpress.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04","linode/debian11","linode/ubuntu22.04"],"deployments_total":7991,"deployments_active":633,"is_public":true,"mine":false,"created":"2020-11-30T21:25:01","updated":"2023-12-12T06:54:23","rev_note":"","script":"#!/bin/bash\n\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n### linode\n### Install OpenLiteSpeed and WordPress\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/wpimgsetup.sh )\n### Regenerate password for Web Admin, Database, setup Welcome Message\nbash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/per-instance.sh )\n### Clean up ls tmp folder\nsudo rm -rf /tmp/lshttpd/*","user_defined_fields":[]},{"id":401719,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"OpenVPN One-Click","description":"OpenVPN OCA Debian 11 & ubuntu 20","ordinal":80,"logo_url":"assets/OpenVPN.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":40352,"deployments_active":1664,"is_public":true,"mine":false,"created":"2019-03-09T03:02:02","updated":"2023-12-12T15:29:16","rev_note":"Install extra dependencies ","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Install OpenVPN dependencies\napt update && apt -y install ca-certificates wget net-tools gnupg\nif [ \"${detected_distro[distro]}\" = 'debian' ]; then \nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian bullseye main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelif [ \"${detected_distro[distro]}\" = 'ubuntu' ]; then\nwget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -\necho \"deb http://as-repository.openvpn.net/as/debian focal main\">/etc/apt/sources.list.d/openvpn-as-repo.list\nelse \necho \"Distro Not Supported\"\nfi\n\n## Apt Update & Install OpenVPN\napt update -y && apt -y install openvpn-as\n\n# UFW install\nufw_install\nufw allow 1194/udp\nsed -ie \"s/DEFAULT_FORWARD_POLICY=\\\"DROP\\\"/DEFAULT_FORWARD_POLICY=\\\"ACCEPT\\\"/g\" /etc/default/ufw\n\n# Cleanup\nstackscript_cleanup\n\n# Adding to display default password as last line in LISH console\nsleep 3\ncat /usr/local/openvpn_as/init.log | grep 'To login'; echo \"(password can be changed on Admin UI)\"","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""}]},{"id":804172,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Owncast One-Click","description":"Owncast One-Click","ordinal":81,"logo_url":"assets/owncast.svg","images":["linode/debian10"],"deployments_total":1801,"deployments_active":84,"is_public":true,"mine":false,"created":"2021-04-01T15:24:50","updated":"2023-12-12T02:12:06","rev_note":"","script":"#!/usr/bin/bash\n#\n#\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Add owncast user\nadduser owncast --disabled-password --gecos \"\"\n\n# Install dependencies\napt-get install -y libssl-dev unzip curl\n\n# Install Owncast\nmkdir -p /opt/owncast\ncd /opt/owncast || exit\n\ncurl -s https://owncast.online/install.sh | bash\nchown -R owncast:owncast /opt/owncast\n\n# Setup Owncast as a systemd service\ncat >/etc/systemd/system/owncast.service </etc/caddy/Caddyfile </etc/motd <\n#\n#\n## LAMP Stack Settings\n#\n#\n#\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n\n# This also sets some useful variables, like $IP and $FQDN\nsource \n\n## Update\napt_setup_update\n\n## Local Functions used by this StackScript\nfunction owncloud_install {\n system_install_package unzip php-gd php-json php-curl php-mbstring \\\n php-intl php-imagick php-xml php-zip\n PHP_VERSION=$(php -r \"echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;\")\n cd /var/www\n wget https://download.owncloud.com/server/stable/owncloud-complete-latest.zip\n unzip owncloud-complete-latest.zip\n chown -R www-data:www-data owncloud\n rm owncloud-complete-latest.zip\n local -a input_text=(\n \"Alias / \\\"/var/www/owncloud/\\\"\"\n \"\"\n \" Options +FollowSymlinks\"\n \" AllowOverride All\"\n \"\"\n \" Dav off\"\n \"\"\n \"SetEnv HOME /var/www/owncloud\"\n \"SetEnv HTTP_HOME /var/www/owncloud\"\n \"\"\n )\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n a2ensite owncloud\n a2enmod rewrite headers env dir mime\n sed -i '/^memory_limit =/s/=.*/= 512M/' /etc/php/$PHP_VERSION/apache2/php.ini\n systemctl restart apache2\n echo \"ownCloud is installed\"\n}\n\nfunction owncloud_vhost_configure {\n local -r fqdn=\"$1\"\n local -r soa_email_address=\"$2\"\n local -a input_text=(\n \"\"\n \" ServerName ${fqdn}\"\n \" ServerAdmin ${soa_email_address}\"\n \" DocumentRoot /var/www/owncloud\"\n \" \"\n \" Require all granted\"\n \" AllowOverride All\"\n \" Options FollowSymLinks MultiViews\"\n \" SetEnv HOME /var/www/owncloud\"\n \" SetEnv HTTP_HOME /var/www/owncloud\"\n \" \"\n \"\"\n )\n echo \"\" >> /etc/apache2/sites-available/owncloud.conf\n for i in \"${input_text[@]}\"; do\n echo \"$i\" >> /etc/apache2/sites-available/owncloud.conf\n done\n}\n\n## Main Script\n# Install and configure the LAMP Stack\nlamp_stack \"$DB_NAME\" \"$DB_ROOT_PASSWORD\" \"${DB_USERNAME:-owncloud}\" \"$DB_USER_PASSWORD\"\n\n# Install ownCloud to be accessed via domain and configure the VirtualHost\nowncloud_install \"$FQDN\"\nowncloud_vhost_configure \"$FQDN\" \"$SOA_EMAIL_ADDRESS\"\n\n# Configure ownCloud - This replaces the installer GUI that was in the previous version of this OCA\nsudo -u www-data php /var/www/owncloud/occ maintenance:install \\\n --database \"mysql\" \\\n --database-name \"$DB_NAME\" \\\n --database-user \"${DB_USERNAME:-owncloud}\" \\\n --database-pass \"$DB_USER_PASSWORD\" \\\n --admin-user \"$OC_ADMIN\" \\\n --admin-pass \"$OC_ADMIN_PASSWORD\"\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 1 --value=$FQDN\nsudo -u www-data php /var/www/owncloud/occ conf:sys:set trusted_domains 2 --value=$IP\necho \"Trusted Domain setting added\"\n\n# Open the needed firewall ports\nufw allow http\nufw allow https\napt install certbot python3-certbot-apache -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"oc_admin","label":"The name of the admin user for ownCloud"},{"name":"oc_admin_password","label":"The password for ownCloud's admin user"},{"name":"soa_email_address","label":"Admin Email for the ownCloud server"},{"name":"db_name","label":"The name of the database","default":"owncloud"},{"name":"db_root_password","label":"The root password for the database"},{"name":"db_username","label":"The name of the database user to create","default":"owncloud"},{"name":"db_user_password","label":"The password for the created database user"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is required for creating DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""}]},{"id":1102906,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Passky One-Click","description":"Passky One-Click app","ordinal":83,"logo_url":"assets/passky.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":184,"deployments_active":10,"is_public":true,"mine":false,"created":"2022-12-20T17:48:51","updated":"2023-12-07T09:51:25","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nInstalling...\nPlease logout and come back in few minutes.\nEOF\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\nDEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" install grub-pc\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n## Import the Bash StackScript Library\nsource \n\n# Install docker compose\nsystem_install_package docker-compose\n\n#\n# Passky Server\n#\nwget https://github.com/Rabbit-Company/Passky-Server/releases/latest/download/passky-server.tar.xz\ntar -xf passky-server.tar.xz\ncd passky-server\ncp .env.example .env\n\nSERVER_CORES=$(grep -c ^processor /proc/cpuinfo)\nIP_ADDRESS=$(system_primary_ip)\n\nsed -i \"s/SERVER_CORES=1/SERVER_CORES=$SERVER_CORES/g\" .env\nsed -i \"s/ADMIN_USERNAME=admin/ADMIN_USERNAME=$ADMINUSER/g\" .env\nsed -i \"s/ADMIN_PASSWORD=/ADMIN_PASSWORD=$ADMIN_PASSWORD/g\" .env\n\ndocker-compose up -d\n\napache_install\na2enmod proxy && a2enmod proxy_http && systemctl restart apache2\necho \"\" > /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPreserveHost On\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyRequests Off\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ServerName $WEBSITE\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPass / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \" ProxyPassReverse / http://localhost:8080/\" >> /etc/apache2/sites-available/$WEBSITE.conf\necho \"\" >> /etc/apache2/sites-available/$WEBSITE.conf\na2ensite \"$WEBSITE\"\nsystemctl restart apache2\n\n# Install SSL\nsystem_install_package python3-certbot-apache\ncat << EOF > /usr/local/bin/installCert\n#!/bin/bash\nif ! certbot -n --apache --agree-tos --redirect -d $WEBSITE -m $EMAIL; then\n echo \"There was a problem while installing SSL certificate. Make sure your A record for domain: $WEBSITE does redirect to IP: $IP_ADDRESS\"\nelse\n echo \"Certificate installed successfully.\"\nfi\nEOF\nchmod +x /usr/local/bin/installCert\n\n# Configure auto-renewal for the certificate\ncrontab -l > cron\necho \"0 4 * * * /usr/bin/certbot renew\" >> cron\ncrontab cron\nrm cron\n\nstackscript_cleanup\n\n# Motd\ncat << EOF > /etc/motd\n _____ _ \n | __ \\ | | \n | |__) |_ _ ___ ___| | ___ _ \n | ___/ _\\` / __/ __| |/ / | | |\n | | | (_| \\__ \\__ \\ <| |_| |\n |_| \\__,_|___/___/_|\\_\\\\__, |\n __/ |\n |___/ \nAdmin Panel:\n Link: http://$IP_ADDRESS (https://$WEBSITE)\n Username: $ADMINUSER\n Password: $ADMIN_PASSWORD\nTo install SSL certificate please run command: installCert\nEOF","user_defined_fields":[{"name":"website","label":"Website","example":"passky.domain.com"},{"name":"email","label":"Email Address","example":"info@rabbit-company.com"},{"name":"adminuser","label":"Admin Username"},{"name":"admin_password","label":"Admin Password"}]},{"id":804143,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Peppermint One-Click","description":"Peppermint One-Click","ordinal":84,"logo_url":"assets/peppermint.svg","images":["linode/ubuntu22.04"],"deployments_total":1879,"deployments_active":120,"is_public":true,"mine":false,"created":"2021-04-01T12:45:15","updated":"2023-12-12T04:11:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Peppermint setup\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-peppermint\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n \n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":644908,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Percona (PMM) One-Click","description":"Percona One-Click","ordinal":85,"logo_url":"assets/percona.svg","images":["linode/debian10"],"deployments_total":195,"deployments_active":7,"is_public":true,"mine":false,"created":"2020-04-30T14:49:38","updated":"2023-12-08T04:59:34","rev_note":"","script":"#!/bin/bash\n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Docker\napt -y install docker.io\nsystemctl enable docker.service\n\n#PMM \ndocker pull percona/pmm-server:2\ndocker create -v /srv --name pmm2-data percona/pmm-server:2 /bin/true\ndocker run -d -p 80:80 -p 443:443 \\\n --volumes-from pmm2-data \\\n --name pmm2-server \\\n --restart always percona/pmm-server:2\n\necho \"Waiting for PMM to initialize to set password...\"\n\nuntil [ \"`docker inspect -f {{.State.Health.Status}} pmm2-server`\" = \"healthy\" ]; do sleep 1; done\n\ndocker exec -t pmm2-server bash -c \"ln -s /srv/grafana /usr/share/grafana/data; grafana-cli --homepath /usr/share/grafana admin reset-admin-password $PMMPASSWORD\"\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"pmmpassword","label":"Admin Password","example":"Admin User Password for PMM Server"}]},{"id":609018,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"phpMyAdmin One-Click","description":"phpMyAdmin One-Click","ordinal":86,"logo_url":"assets/phpmyadmin.svg","images":["linode/debian11"],"deployments_total":2176,"deployments_active":112,"is_public":true,"mine":false,"created":"2019-11-05T00:28:33","updated":"2023-12-12T14:10:22","rev_note":"Initial import","script":"#!/bin/bash\n#\n#\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname\nset_hostname\n\n# Update system\napt_setup_update\n\n# Install/configure MySQL, Add Admin User\napt-get install -y mariadb-server\nsystemctl enable mariadb --now\nrun_mysql_secure_installation\nmysql -u root -e \"CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD'\"\nmysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost' WITH GRANT OPTION\"\nmysql -u root -e \"FLUSH PRIVILEGES\"\n\n# Install PHP\necho 'phpmyadmin phpmyadmin/dbconfig-install boolean true' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/mysql/admin-pass password $DBROOT_PASSWORD' | debconf-set-selections\necho 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | debconf-set-selections\napt-get install -y phpmyadmin libapache2-mod-php7.4\n\n# Configure ufw\nufw_install\nufw allow http\nufw reload\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"db_user","label":"phpMyAdmin/MySQL Admin User","example":"admin"},{"name":"dbuser_password","label":"phpMyAdmin/MySQL Admin Password"},{"name":"dbroot_password","label":"MySQL root Password"}]},{"id":970522,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Pi-hole One-Click","description":"Pi-hole One-Click","ordinal":87,"logo_url":"assets/pihole.svg","images":["linode/ubuntu20.04"],"deployments_total":3928,"deployments_active":263,"is_public":true,"mine":false,"created":"2022-02-07T16:04:53","updated":"2023-12-12T06:45:30","rev_note":"","script":"#!/usr/bin/env bash\n\n## PIHOLE Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nIPV4=$(ip a | awk '/inet / {print $2}'| sed -n '2 p')\nIPV6=$(ip -6 a | grep inet6 | awk '/global/{print $2}' | cut -d/ -f1)\nGENPIHOLEPASSWD=$(echo -n $PIHOLE_PASSWORD | sha256sum | awk '{printf \"%s\",$1 }' | sha256sum)\nPIHOLE_PASSWD=${GENPIHOLEPASSWD:0:-1}\n\nfunction firewall {\n ufw allow 80\n ufw allow 53\n ufw allow 67\n ufw allow 547\n ufw allow 4711\n}\n\nfunction config_pihole {\n mkdir -p /etc/pihole\n cat < /etc/pihole/setupVars.conf\nPIHOLE_INTERFACE=eth0\nIPV4_ADDRESS=$IPV4\nIPV6_ADDRESS=$IPV6\nPIHOLE_DNS_1=8.8.8.8\nPIHOLE_DNS_2=8.8.4.4\nQUERY_LOGGING=true\nINSTALL_WEB_SERVER=true\nINSTALL_WEB_INTERFACE=true\nLIGHTTPD_ENABLED=true\nCACHE_SIZE=10000\nDNS_FQDN_REQUIRED=true\nDNS_BOGUS_PRIV=true\nDNSMASQ_LISTENING=local\nWEBPASSWORD=$PIHOLE_PASSWD\nBLOCKING_ENABLED=true\nEND\n\ncurl -L https://install.pi-hole.net | bash /dev/stdin --unattended\n}\n\nfunction main {\n config_pihole\n firewall\n}\n\n# Execute script\napt_setup_update\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"pihole_password","label":"PIHOLE USER Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"This is the Email address for the SOA record","default":""}]},{"id":662119,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Plex One-Click","description":"Plex One-Click","ordinal":88,"logo_url":"assets/plex.svg","images":["linode/debian10"],"deployments_total":2940,"deployments_active":53,"is_public":true,"mine":false,"created":"2020-08-12T15:54:44","updated":"2023-12-11T02:34:49","rev_note":"","script":"#!/bin/bash\n# INPUT VARIABLES:\n# \n# \n# \n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Limited user setup if username is not \"root\"\nif [ \"$USERNAME\" != \"root\" ]; then\n \n# ensure sudo is installed and configure secure user\n apt -y install sudo\n adduser -uid 1000 $USERNAME --disabled-password --gecos \"\"\n echo \"$USERNAME:$PASSWORD\" | chpasswd\n usermod -aG sudo $USERNAME\n \n# Harden SSH Access\n sed -i -e 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config\n \n# set home directory\n HOME=/home/$USERNAME\n \n# configure ssh key for secure user if provided\n if [ \"$SSHKEY\" != \"\" ]; then\n SSHDIR=$HOME/.ssh\n mkdir $SSHDIR && echo \"$SSHKEY\" >> $SSHDIR/authorized_keys\n chmod -R 700 $SSHDIR && chmod 600 $SSHDIR/authorized_keys\n chown -R $USERNAME:$USERNAME $SSHDIR\n fi\n \n# Enable SSH hardening\n systemctl restart sshd\n \n# Create docker group, add limited user, and enable\n groupadd docker\n usermod -aG docker $USERNAME\nfi\n\n# Install and configure UFW for Plex\nufw_install\nufw allow 32400,3005,8324,32469/tcp\nufw allow 1900,32410,32412,32413,32414/udp\n\n# Install the dependencies & add Docker to the APT repository\napt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2\ncurl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n# Update & install Docker-CE\napt_setup_update\napt install -y docker-ce\n\n# Install plex as limited user\ndocker pull plexinc/pms-docker\ndocker run \\\n -d \\\n --name plex \\\n --restart always \\\n -p 32400:32400/tcp \\\n -p 3005:3005/tcp \\\n -p 8324:8324/tcp \\\n -p 32469:32469/tcp \\\n -p 1900:1900/udp \\\n -p 32410:32410/udp \\\n -p 32412:32412/udp \\\n -p 32413:32413/udp \\\n -p 32414:32414/udp \\\n -e ADVERTISE_IP=\"http://$IP:32400/\" \\\n -h \"Linode Plex Server\" \\\n -v $HOME/plex/config:/config \\\n -v $HOME/plex/media:/media \\\n -v $HOME/plex/transcode:/transcode \\\n plexinc/pms-docker\n\n# Recursively update ownership of Plex directories after delay\nsleep 1\nchown -R $USERNAME:$USERNAME $HOME/plex\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"USERNAME","label":"Limited User Name (not 'root')"},{"name":"PASSWORD","label":"Limited User Password"},{"name":"SSHKEY","label":"Limited User SSH Key","default":"","example":"Usually found in: ./ssh/id_rsa.pub"}]},{"id":611376,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL One-Click","description":"PostgreSQL One-Click","ordinal":89,"logo_url":"assets/postgresql.svg","images":["linode/debian11"],"deployments_total":2864,"deployments_active":219,"is_public":true,"mine":false,"created":"2019-11-13T06:05:28","updated":"2023-12-12T11:40:20","rev_note":"Initial import","script":"#!/bin/bash\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 22\nufw allow 5432\n\n# Install PostgreSQL\napt install -y postgresql postgresql-contrib\nsystemctl enable postgresql\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1068726,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"PostgreSQL Cluster One-Click","description":"PostgreSQL Cluster","ordinal":90,"logo_url":"assets/postgresqlmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":175,"deployments_active":8,"is_public":true,"mine":false,"created":"2022-10-03T20:11:59","updated":"2023-12-12T10:41:11","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n\n# set force apt non-interactive\nexport DEBIAN_FRONTEND=noninteractive\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/postgresql-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n# source script libraries\nsource \nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/postgresql-cluster\" ]; then\n rm -rf /tmp/postgresql-cluster\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[info] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[+] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\nfunction setup {\n # install dependancies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip\n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/postgresql-cluster\n cd /tmp/postgresql-cluster\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"cluster_name","label":"Domain Name"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"PostgeSQL cluster size","default":"3","oneof":"3"}]},{"id":985364,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus & Grafana One-Click","description":"Prometheus and Grafana","ordinal":91,"logo_url":"assets/prometheusgrafana.svg","images":["linode/ubuntu20.04","linode/ubuntu22.04"],"deployments_total":578,"deployments_active":60,"is_public":true,"mine":false,"created":"2022-03-08T17:03:20","updated":"2023-12-12T11:55:19","rev_note":"","script":"#!/usr/bin/env bash\n## Updated: 01-17-2023\n## Author: n0vabyte, Elvis Segura, esegura@linode.com\n\n#\n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\ncreds=\"/root/credentials.txt\"\nprometheus_htpasswd_file=\"/etc/nginx/.prometheus_htpasswd\"\n\nfunction add_firewalls {\n ufw allow http\n ufw allow https\n}\n\nfunction configure_nginx {\n apt-get install nginx apache2-utils -y\n cat << EOF > /etc/nginx/sites-available/$FQDN.conf\nserver {\n listen 80;\n server_name $FQDN;\n location / {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:3000;\n }\n location /prometheus/ {\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:9090;\n auth_basic \"Restricted Area\";\n auth_basic_user_file $prometheus_htpasswd_file;\n }\n# allow let's encrypt\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/html/.well-known;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-{available,enabled}/$FQDN.conf\n unlink /etc/nginx/sites-enabled/default\n systemctl reload nginx\n systemctl enable nginx\n}\n\nfunction install_node_exporter {\n groupadd --system prometheus\n useradd -s /sbin/nologin --system -g prometheus prometheus\n curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '\"' -f 4 | wget -qi - \n tar -xvf node_exporter*.tar.gz\n chmod +x node_exporter-*/node_exporter\n chown prometheus:prometheus node_exporter\n mv node_exporter-*/node_exporter /usr/local/bin\n rm -fr node_exporter-*\n cat < /etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n[Install]\nWantedBy=default.target\nEOF\n systemctl daemon-reload\n systemctl start node_exporter\n systemctl enable node_exporter\n}\n\nfunction configure_prometheus {\n latest_version=$(curl -s https://raw.githubusercontent.com/prometheus/prometheus/main/VERSION)\n prom_conf=\"/etc/prometheus/prometheus.yml\"\n file_sd_targets=\"/etc/prometheus/file_sd_targets\"\n prometheus_conf_dir=\"/etc/prometheus\"\n prometheus_data_dir=\"/var/lib/prometheus\"\n mkdir $prometheus_conf_dir $prometheus_conf_dir/file_sd_targets \\\n $prometheus_conf_dir/rules $prometheus_data_dir\n\n wget https://github.com/prometheus/prometheus/releases/download/v$latest_version/prometheus-$latest_version.linux-amd64.tar.gz\n tar xvf prometheus-$latest_version.linux-amd64.tar.gz\n mv prometheus-$latest_version.linux-amd64/* $prometheus_conf_dir\n chown -R prometheus:prometheus $prometheus_conf_dir $prometheus_data_dir\n mv $prometheus_conf_dir/{prometheus,promtool} /usr/local/bin\n ## cleanup\n rm prometheus-$latest_version.linux-amd64.tar.gz\n rmdir prometheus-$latest_version.linux-amd64\n\n ## backup config before updating\n cp $prom_conf{,.bak}\n sed -i -e '/- job_name: \"prometheus\"/ s/^/#/' $prom_conf\n sed -i -e '/- targets:/ s/^/#/' $prom_conf\n sed -i -e '/static_configs/ s/^/#/g' $prom_conf\n ## add our config\n cat << EOF >> $prom_conf\n#########################################\n## Local Prometheus Instance - This Box #\n#########################################\n - job_name: local_prometheus\n scrape_interval: 3s\n file_sd_configs:\n - files:\n - file_sd_targets/local_prometheus.yml\n honor_labels: true\n relabel_configs:\n - regex: (.*)\n replacement: \\${1}:9100\n source_labels:\n - __address__\n target_label: __address__\n - regex: (.+)\n replacement: \\${1}\n source_labels:\n - __instance\n target_label: instance\nEOF\n ## add to file_sd_targets\n cat << EOF >> $file_sd_targets/local_prometheus.yml\n- labels:\n __instance: prometheus\n cluster: local\n targets:\n - 127.0.0.1\nEOF\n cat << EOF > /etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=prometheus\nGroup=prometheus\nType=simple\nExecStart=/usr/local/bin/prometheus \\\n--config.file /etc/prometheus/prometheus.yml \\\n--storage.tsdb.path $prometheus_data_dir/ \\\n--web.console.templates=$prometheus_conf_dir/consoles \\\n--web.console.libraries=$prometheus_conf_dir/console_libraries \\\n--web.listen-address=127.0.0.1:9090 \\\n--web.external-url=https://$FQDN/prometheus \\\n--storage.tsdb.retention=60d\nRestart=always\nExecReload=/usr/bin/kill -HUP \\$MAINPID\nTimeoutStopSec=20s\nOOMScoreAdjust=-900\nSendSIGKILL=no\n[Install]\nWantedBy=multi-user.target\nEOF\n systemctl daemon-reload\n systemctl start prometheus\n systemctl enable prometheus\n\n ## protect with htpasswd\n prometheus_htpasswd=$(openssl rand -base64 32)\n htpasswd -cb $prometheus_htpasswd_file prometheus $prometheus_htpasswd\n ## log credentials locally\n cat << EOF >> $creds\n#################\n# Prometheus #\n#################\nLocation: https://$FQDN/prometheus\nUsername: prometheus\nPassword: $prometheus_htpasswd\nEOF\n ## sanity check\n function fallback {\n echo \"[FATAL] Creating custom configuration failed. Restoring old configuration\"\n cp $prom_conf{.bak,}\n systemctl restart prometheus\n sleep 2\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[CRITICAL] Encoutered unexpected error while configuring Prometheus. Please reach out to Support.\"\n exit 2\n fi\n }\n systemctl is-active prometheus\n if [ $? -ne 0 ]; then\n echo \"[ERROR] Prometheus is not running. Falling back to default config..\"\n fallback\n fi\n\n}\n\nfunction configure_grafana {\n echo \"[info] configuring Grafana - Installing Packages\"\n apt-get install -y apt-transport-https \\\n software-properties-common \\\n wget \\\n gnupg2 \\\n sqlite3\n\n wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key\n echo \"deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main\" | sudo tee -a /etc/apt/sources.list.d/grafana.list\n apt-get -y update\n apt-get -y install grafana\n\n ## reset Grafana admin password\n grafana_password=$(openssl rand -base64 32)\n\n echo \"[info] updating grafana config\"\n sed -i -e 's/;admin_user = admin/admin_user = admin/g' /etc/grafana/grafana.ini\n sed -i \"s|;admin_password = admin|admin_password = $grafana_password|g\" /etc/grafana/grafana.ini\n\n echo \"[info] starting grafana-server\"\n systemctl start grafana-server\n systemctl enable grafana-server\n\n ## log credentials locally\n cat << EOF >> $creds\n##############\n# Grafana #\n##############\nLocation: https://$FQDN/\nUsername: admin\nPassword: $grafana_password\nEOF\n}\n\nfunction ssl_grafana {\n apt install -y certbot python3-certbot-nginx\n certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n add_firewalls\n configure_nginx\n install_node_exporter\n configure_prometheus\n configure_grafana\n ssl_grafana\n}\n\n## execute script\nmain\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"This email is for the LetsEncrypt SSL certificate"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":607034,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Prometheus One-Click","description":"Prometheus One Click App","ordinal":92,"logo_url":"assets/prometheus.svg","images":["linode/debian10"],"deployments_total":356,"deployments_active":12,"is_public":true,"mine":false,"created":"2019-10-29T20:59:30","updated":"2023-12-10T13:40:45","rev_note":"Initial import","script":"#!/bin/bash\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Prometheus\ngroupadd --system prometheus\nuseradd -s /sbin/nologin --system -g prometheus prometheus\nmkdir /var/lib/prometheus\nfor i in rules rules.d files_sd; do mkdir -p /etc/prometheus/${i}; done\napt-get -y install wget\nmkdir -p /tmp/prometheus && cd /tmp/prometheus\ncurl -s https://api.github.com/repos/prometheus/prometheus/releases/latest \\\n | grep browser_download_url \\\n | grep linux-amd64 \\\n | cut -d '\"' -f 4 \\\n | wget -qi -\ntar xvf prometheus*.tar.gz\ncd prometheus*/\nmv prometheus promtool /usr/local/bin/\nmv prometheus.yml /etc/prometheus/prometheus.yml\nmv consoles/ console_libraries/ /etc/prometheus/\ncd ~/\nrm -rf /tmp/prometheus\n\n# Edit Prometheus config\nsudo tee /etc/prometheus/prometheus.yml</etc/systemd/system/prometheus.service\n[Unit]\nDescription=Prometheus\nDocumentation=https://prometheus.io/docs/introduction/overview/\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nType=simple\nUser=prometheus\nGroup=prometheus\nExecReload=/bin/kill -HUP $MAINPID\nExecStart=/usr/local/bin/prometheus \\\n --config.file=/etc/prometheus/prometheus.yml \\\n --storage.tsdb.path=/var/lib/prometheus \\\n --web.console.templates=/etc/prometheus/consoles \\\n --web.console.libraries=/etc/prometheus/console_libraries \\\n --web.listen-address=0.0.0.0:9090 \\\n --web.external-url=\n\nSyslogIdentifier=prometheus\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\nEND\n\nfor i in rules rules.d files_sd; do chown -R prometheus:prometheus /etc/prometheus/${i}; done\nfor i in rules rules.d files_sd; do chmod -R 775 /etc/prometheus/${i}; done\nchown -R prometheus:prometheus /var/lib/prometheus/\n\n# Add node_exporter & Enable services\ncurl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest \\\n| grep browser_download_url \\\n| grep linux-amd64 \\\n| cut -d '\"' -f 4 \\\n| wget -qi -\n\ntar -xvf node_exporter*.tar.gz\ncd node_exporter*/\ncp node_exporter /usr/local/bin\nnode_exporter --version\n\ncat </etc/systemd/system/node_exporter.service\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nExecStart=/usr/local/bin/node_exporter\n\n[Install]\nWantedBy=default.target\nEND\n\nsystemctl daemon-reload\nsystemctl start prometheus\nsystemctl enable prometheus\nsystemctl start node_exporter\nsystemctl enable node_exporter\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[]},{"id":688890,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"RabbitMQ One-Click","description":"RabbitMQ One-Click","ordinal":93,"logo_url":"assets/rabbitmq.svg","images":["linode/debian10"],"deployments_total":393,"deployments_active":48,"is_public":true,"mine":false,"created":"2020-11-17T20:53:00","updated":"2023-12-08T15:47:55","rev_note":"","script":"#!/bin/bash\n#\n#\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n## Install prerequisites\napt-get install curl gnupg -y\n\n## Get RabbitMQ \n$ curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -\nsudo apt-key adv --keyserver \"hkps://keys.openpgp.org\" --recv-keys \"0x0A9AF2115F4687BD29803A206B73A36E6026DFCA\"\n## Install apt HTTPS transport\napt-get install apt-transport-https\n\n## Add Bintray repositories that provision latest RabbitMQ and Erlang 23.x releases\ntee /etc/apt/sources.list.d/bintray.rabbitmq.list <\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# System Update\nset_hostname\napt_setup_update\n\nfunction install_redis {\n apt install -y redis-server\n systemctl enable redis-server\n}\n\nfunction redis_config {\n sed -ie \"s/supervised no/supervised systemd/g\" /etc/redis/redis.conf\n sed -ie \"s/appendonly no/appendonly yes/g\" /etc/redis/redis.conf\n systemctl restart redis-server\n}\n\nfunction main {\n install_redis\n redis_config\n}\nmain\n\n# cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1132204,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Marketplace App for Redis® Sentinel Cluster One-Click","description":"Redis Sentinel One-Click Cluster","ordinal":95,"logo_url":"assets/redissentinelmarketplaceocc.svg","images":["linode/ubuntu22.04"],"deployments_total":136,"deployments_active":7,"is_public":true,"mine":false,"created":"2023-02-27T20:05:44","updated":"2023-12-06T05:47:35","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Deployment Variables\n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n# \n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/redis-occ.git\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# source script libraries\nsource \n\nfunction cleanup {\n if [ \"$?\" != \"0\" ] || [ \"$SUCCESS\" == \"true\" ]; then\n #deactivate\n cd ${HOME}\n if [ -d \"/tmp/linode\" ]; then\n rm -rf /tmp/linode\n fi\n if [ -d \"/usr/local/bin/run\" ]; then\n rm /usr/local/bin/run\n fi\n stackscript_cleanup\n fi\n}\n\nfunction add_privateip {\n echo \"[info] Adding instance private IP\"\n curl -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X POST -d '{\n \"type\": \"ipv4\",\n \"public\": false\n }' \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips\n}\n\nfunction get_privateip {\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}/ips | \\\n jq -r '.ipv4.private[].address'\n}\n\nfunction configure_privateip {\n LINODE_IP=$(get_privateip)\n if [ ! -z \"${LINODE_IP}\" ]; then\n echo \"[info] Linode private IP present\"\n else\n echo \"[warn] No private IP found. Adding..\"\n add_privateip\n LINODE_IP=$(get_privateip)\n ip addr add ${LINODE_IP}/17 dev eth0 label eth0:1\n fi\n}\n\nfunction rename_provisioner {\n INSTANCE_PREFIX=$(curl -sH \"Authorization: Bearer ${TOKEN_PASSWORD}\" \"https://api.linode.com/v4/linode/instances/${LINODE_ID}\" | jq -r .label)\n export INSTANCE_PREFIX=\"${INSTANCE_PREFIX}\"\n echo \"[info] renaming the provisioner\"\n curl -s -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" \\\n -X PUT -d \"{\n \\\"label\\\": \\\"${INSTANCE_PREFIX}1\\\"\n }\" \\\n https://api.linode.com/v4/linode/instances/${LINODE_ID}\n}\n\nfunction setup {\n # install dependencies\n export DEBIAN_FRONTEND=non-interactive\n apt-get update && apt-get upgrade -y\n apt-get install -y jq git python3 python3-pip python3-dev build-essential firewalld\n # add private IP address\n rename_provisioner\n configure_privateip \n # write authorized_keys file\n if [ \"${ADD_SSH_KEYS}\" == \"yes\" ]; then\n if [ ! -d ~/.ssh ]; then \n mkdir ~/.ssh\n else \n echo \".ssh directory is already created\"\n fi\n curl -sH \"Content-Type: application/json\" -H \"Authorization: Bearer ${TOKEN_PASSWORD}\" https://api.linode.com/v4/profile/sshkeys | jq -r .data[].ssh_key > /root/.ssh/authorized_keys\n fi\n # clone repo and set up ansible environment\n git clone ${GIT_REPO} /tmp/linode\n cd /tmp/linode\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n # copy run script to path\n cp scripts/run.sh /usr/local/bin/run\n chmod +x /usr/local/bin/run\n}\n# main\nsetup\nrun ansible:build\nrun ansible:deploy && export SUCCESS=\"true\"","user_defined_fields":[{"name":"token_password","label":"Your Linode API token"},{"name":"sudo_username","label":"The limited sudo user to be created in the cluster"},{"name":"sslheader","label":"SSL Information","header":"Yes","default":"Yes","required":"Yes"},{"name":"country_name","label":"Details for self-signed SSL certificates: Country or Region","oneof":"AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"},{"name":"state_or_province_name","label":"State or Province","example":"Example: Pennsylvania"},{"name":"locality_name","label":"Locality","example":"Example: Philadelphia"},{"name":"organization_name","label":"Organization","example":"Example: Akamai Technologies"},{"name":"email_address","label":"Email Address","example":"Example: user@domain.tld"},{"name":"ca_common_name","label":"CA Common Name","default":"Redis CA"},{"name":"common_name","label":"Common Name","default":"Redis Server"},{"name":"clusterheader","label":"Cluster Settings","default":"Yes","header":"Yes"},{"name":"add_ssh_keys","label":"Add Account SSH Keys to All Nodes?","oneof":"yes,no","default":"yes"},{"name":"cluster_size","label":"Redis cluster size","default":"3","oneof":"3,5"}]},{"id":923036,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Restyaboard One-Click","description":"Restyaboard One-Click","ordinal":96,"logo_url":"assets/restyaboard.svg","images":["linode/centos7","linode/debian10","linode/ubuntu20.04"],"deployments_total":209,"deployments_active":2,"is_public":true,"mine":false,"created":"2021-10-18T01:07:09","updated":"2023-12-03T04:43:28","rev_note":"","script":"#!/bin/bash\n#\n# Install script for Restyaboard\n#\n# Usage: ./restyaboard.sh\n#\n# Copyright (c) 2014-2021 Restya.\n# Dual License (OSL 3.0 & Commercial License)\n{\n\tmain() {\n\t\tif [[ $EUID -ne 0 ]];\n\t\tthen\n\t\t\techo \"This script must be run as root\"\n\t\t\texit 1\n\t\tfi\n\t\tset -x\n\t\twhoami\n\t\t#\n\t\t# Checking the OS name and OS version\n\t\t#\n\t\tfind_release ()\n\t\t{\n\t\t\t# Checking the Ubuntu OS\n\t\t\tif [ -f /etc/lsb-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`grep DISTRIB_ID /etc/lsb-release`\"\n\t\t\t\tDISTRIB_ID='DISTRIB_ID='\n\t\t\t\tOS_NAME=$OS_REQUIREMENT$DISTRIB_ID\n\t\t\t\tarray=();\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" != \"$DISTRIB_ID\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_NAME ]]; do\n\t\t\t\t\tarray+=( \"${OS_NAME%%\"$DISTRIB_ID\"*}\" );\n\t\t\t\t\tOS_NAME=${OS_NAME#*\"$DISTRIB_ID\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_REQUIREMENT=${array[1]}\n\t\t\t\tfi\n\t\t\t\tOS_VERSION=\"`grep DISTRIB_RELEASE /etc/lsb-release`\"\n\t\t\t\tDISTRIB_RELEASE='DISTRIB_RELEASE='\n\t\t\t\tOS_Ver=$OS_VERSION$DISTRIB_RELEASE\n\t\t\t\tversion=();\n\t\t\t\tif ([ \"$OS_VERSION\" != \"$DISTRIB_RELEASE\" ])\n\t\t\t\tthen\n\t\t\t\t\twhile [[ $OS_Ver ]]; do\n\t\t\t\t\tversion+=( \"${OS_Ver%%\"$DISTRIB_RELEASE\"*}\" );\n\t\t\t\t\tOS_Ver=${OS_Ver#*\"$DISTRIB_RELEASE\"};\n\t\t\t\t\tdone;\n\t\t\t\t\tOS_VERSION=${version[1]}\n\t\t\t\tfi\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Redhat, Fedora, and Centos\n\t\t\tif [ -f /etc/redhat-release ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/redhat-release | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/redhat-release | cut -d ' ' -f 4 | cut -d '.' -f 1`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the Debian OS\n\t\t\tif [ -f /etc/issue ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/issue | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/issue | cut -d ' ' -f 3`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t\t# Checking the OpenBSD \n\t\t\tif [ -f /etc/motd ]; then\n\t\t\t\tOS_REQUIREMENT=\"`cat /etc/motd | head -1 | cut -d ' ' -f 1`\"\n\t\t\t\tOS_VERSION=\"`cat /etc/motd | head -1 | cut -d ' ' -f 2`\"\n\t\t\t\treturn\n\t\t\tfi\n\n\t\t}\n\t\tfindbin ()\n {\n ret=0\n newpath=`echo $PATH | tr : ' '`\n for i in ${newpath}; do\n\t\t\t\tif [ -x $i/$1 ]; then\n\t\t\t\t\tret=1\n\t\t\t\t\tbreak\n\t\t\t\tfi\n done\n echo $ret\n return \n }\n checkdeps()\n {\n pkginfo=\"dpkg rpm ipkg pkg_info\"\n for i in $pkginfo; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n\t\t\t\t\tpkginfo=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that for listing packages\"\n\t\t\t\t\tbreak\n fi\n done\n\n if [ ${pkginfo} = \"pkg_info\" ]; then\n # BSD needs PKG_PATH set to load anything over the net.\n if [ x${PKG_PATH} = x ]; then\n\t\t\t\t\techo \"Please set the environment variable PKG_PATH and try again.\"\n\t\t\t\t\texit 1\n fi\n fi\n \n \n pkg_name=\"yum apt-get ipkg pkg_add\"\n for i in ${pkg_name}; do\n ret=`findbin $i`\n if [ $ret -eq 1 ]; then\n pkg_name=$i\n\t\t\t\t\techo \"Yes, found $i, so we'll use that to install packages\"\n\t\t\t\t\tbreak\n fi\n done\n \n\n for i in ${genericdeps} ${gtkdeps} ${kdedeps}; do\n case $pkginfo in\n dpkg)\n deps=\"`dpkg -l \"*$i*\" | grep -- \"^ii\" | cut -d ' ' -f 3`\"\n ;;\n rpm)\n deps=\"`rpm -q $i`\"\n ;;\n pkg_info)\n deps=\"`pkg_info | grep \"$i\" | sed -e 's: .*$::'`\"\n ;;\n ipkg)\n deps=\"todo\"\n ;;\n *)\n echo \"ERROR: No package manager found!\"\n exit 1\n ;;\n esac\n found=`echo ${deps} | grep -v 'not installed' | grep -c \"${i}\" 2>&1`\n if [ $found -gt 0 ]; then\n \techo \"Yes, found $i\"\n else\n\t\t\t\t\techo \"Nope, $i appears to not be installed\"\n\t\t\t\t\tmissing=\"${missing} $i\"\n fi\n done\n\n if [ -n \"${missing}\" ]; then\n echo \"package(s)\\\"${missing}\\\" are missing!\"\n echo \"You will need sudo priviledges to install the packages\"\n if [ x$yes = xno ]; then\n \t$debug sudo ${pkgnet} install ${missing}\n else\n \t$debug sudo ${pkgnet} -y install ${missing}\n fi\n fi\n }\n\t\tinstall_nginx() \n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n apt install -y cron nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"nginx installation failed with error code ${error_code} (nginx installation failed with error code 2)\"\n return 2\n fi\n if [ -f \"/etc/nginx/conf.d/default\" ]; then\n rm -rf /etc/nginx/conf.d/default\n fi\n if [ -f \"/etc/nginx/sites-enabled/default\" ]; then\n rm -rf /etc/nginx/sites-enabled/default\n fi\n if [ -f \"/etc/nginx/sites-available/default\" ]; then\n rm -rf /etc/nginx/sites-available/default\n fi\n service nginx start\n fi\n\t\t\telse\t\t\t\t\n echo \"Checking nginx...\"\n if ! which nginx > /dev/null 2>&1; then\n echo \"nginx not installed!\"\n echo \"Installing nginx...\"\n rpm -Uvh \"http://nginx.org/packages/centos/${OS_VERSION}/noarch/RPMS/nginx-release-centos-${OS_VERSION}-0.el${OS_VERSION}.ngx.noarch.rpm\"\n yum install -y zip cronie nginx\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"cron nginx installation failed with error code ${error_code} cron nginx installation failed with error code 18\"\n return 18\n fi\n if [ -f \"/etc/nginx/conf.d/default.conf\" ]; then\n rm -rf /etc/nginx/conf.d/default.conf\n fi\n if [ -f \"/etc/nginx/sites-enabled/default.conf\" ]; then\n rm -rf /etc/nginx/sites-enabled/default.conf\n fi\n if [ -f \"/etc/nginx/sites-available/default.conf\" ]; then\n rm -rf /etc/nginx/sites-available/default.conf\n fi\n service nginx start\n chkconfig --levels 35 nginx on\n fi\n\t\t\tfi\n\t\t}\n\t\tinstall_php()\n\t\t{\n\t\t\tif ! hash php 2>&-; then\n\t\t\t\techo \"PHP is not installed!\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\t\t\t\t\t\t\t\n echo \"Installing PHP...\"\n apt install -y php7.4 php7.4-common --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"PHP installation failed with error code ${error_code} (PHP installation failed with error code 3)\"\n return 3\n fi\n else \n if ([ \"$pkg_name\" = \"yum\" ])\n then\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n echo \"Note: For the latest version of PHP, we're going to download https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm and https://rpms.remirepo.net/enterprise/remi-release-8.rpm.\"\n echo \"Installing PHP...\"\n dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm\n dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\n dnf module enable php:remi-7.4\n dnf -y install php php-cli php-common\n else\n yum install -y epel-release\n echo \"Note: For the latest version of PHP, we're going to download http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm.\"\n echo \"Installing PHP...\"\n rpm -Uvh \"http://rpms.famillecollet.com/enterprise/remi-release-${OS_VERSION}.rpm\"\n yum --enablerepo=remi-php74 install -y php\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"php installation failed with error code ${error_code} (php installation failed with error code 20)\"\n return 20\n fi\n fi\n fi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Installing PHP fpm and cli extension...\"\n\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\tthen\n\t\t\t\tapt install -y php7.4-fpm php7.4-cli --allow-unauthenticated\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"php7.4-cli installation failed with error code ${error_code} (php7.4-cli installation failed with error code 4)\"\n\t\t\t\tfi\n\t\t\t\tservice php7.4-fpm start\n\t\t\telse \n\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\tthen\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n \t\t\tthen\n\t\t\t\t\t\tdnf -y install php-fpm php-devel php-opcache\n\t\t\t\t\t\tdnf -y install php-json\n\t\t\t\t\telse\n\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-fpm php-devel php-cli php-opcache\n\t\t\t\t\tfi\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php-devel installation failed with error code ${error_code} (php-devel installation failed with error code 21)\"\n\t\t\t\t\t\treturn 21\n\t\t\t\t\tfi\t\t\t\t\t\n\t\t\t\t\tservice php-fpm start\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"....\"\n\t\t\telse\n\t\t\t\tchkconfig --levels 35 php-fpm on\t\t\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP curl extension...\"\n\t\t\tphp -m | grep curl\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-curl...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-curl --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-curl installation failed with error code ${error_code} (php7.4-curl installation failed with error code 5)\"\n\t\t\t\t\t\treturn 5\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-curl\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-curl\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-curl installation failed with error code ${error_code} (php-curl installation failed with error code 22)\"\n\t\t\t\t\t\t\treturn 22\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP pgsql extension...\"\n\t\t\tphp -m | grep pgsql\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-pgsql...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install libpq5\n\t\t\t\t\tapt install -y php7.4-pgsql --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-pgsql installation failed with error code ${error_code} (php7.4-pgsql installation failed with error code 6)\"\n\t\t\t\t\t\treturn 6\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pgsql\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pgsql\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-pgsql installation failed with error code ${error_code} (php-pgsql installation failed with error code 23)\"\n\t\t\t\t\t\t\treturn 23\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP mbstring extension...\"\n\t\t\tphp -m | grep mbstring\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-mbstring...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-mbstring --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-mbstring installation failed with error code ${error_code} (php7.4-mbstring installation failed with error code 7)\"\n\t\t\t\t\t\treturn 7\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-mbstring\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-mbstring\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-mbstring installation failed with error code ${error_code} (php-mbstring installation failed with error code 24)\"\n\t\t\t\t\t\t\treturn 24\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP ldap extension...\"\n\t\t\tphp -m | grep ldap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-ldap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-ldap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-ldap installation failed with error code ${error_code} (php7.4-ldap installation failed with error code 8)\"\n\t\t\t\t\t\treturn 8\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-ldap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-ldap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-ldap installation failed with error code ${error_code} (php-ldap installation failed with error code 25)\"\n\t\t\t\t\t\t\treturn 25\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imagick extension...\"\n\t\t\tphp -m | grep imagick\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php-imagick...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y gcc\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"gcc installation failed with error code ${error_code} (gcc installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y imagemagick\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"imagemagick installation failed with error code ${error_code} (imagemagick installation failed with error code 9)\"\n\t\t\t\t\t\treturn 9\n\t\t\t\t\tfi\n\t\t\t\t\tapt install -y php7.4-imagick --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imagick installation failed with error code ${error_code} (php7.4-imagick installation failed with error code 10)\"\n\t\t\t\t\t\treturn 10\n\t\t\t\t\tfi\n\t\t\t\telse \n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tyum install -y ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-pear\n\t\t\t\t\t\t\tdnf -y install php-gd\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-pear\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-gd\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"Installing php-imagick failed with error code ${error_code} (Installing php-imagick failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\n\t\t\t\t\t\tcd /usr/local/src\n\t\t\t\t\t\twget http://pecl.php.net/get/imagick-2.2.2.tgz\n\t\t\t\t\t\ttar zxvf ./imagick-2.2.2.tgz\n\t\t\t\t\t\tcd imagick-2.2.2\n\t\t\t\t\t\tphpize\n\t\t\t\t\t\t./configure\n\t\t\t\t\t\tmake\n\t\t\t\t\t\tmake test\n\t\t\t\t\t\tmake install\n\t\t\t\t\t\techo \"extension=imagick.so\" >> /etc/php.ini\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking PHP imap extension...\"\n\t\t\tphp -m | grep imap\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing php7.4-imap...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-imap --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-imap installation failed with error code ${error_code} (php7.4-imap installation failed with error code 11)\"\n\t\t\t\t\t\treturn 11\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-imap\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-imap\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"php-imap installation failed with error code ${error_code} (php-imap installation failed with error code 26)\"\n\t\t\t\t\t\t\treturn 26\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t\n\t\t\techo \"Checking xml...\"\n\t\t\tphp -m | grep xml\n\t\t\tif [ \"$?\" -gt 0 ]; then\n\t\t\t\techo \"Installing xml...\"\n\t\t\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n\t\t\t\tthen\n\t\t\t\t\tapt install php7.4-xml --allow-unauthenticated\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 56)\"\n\t\t\t\t\t\treturn 56\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install php-xml\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum --enablerepo=remi-php74 install -y php-xml\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"xml installation failed with error code ${error_code} (xml installation failed with error code 57)\"\n\t\t\t\t\t\t\treturn 57\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_timezone()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\ttimezone=$(cat /etc/timezone)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php/7.4/fpm/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php/7.4/fpm/php.ini\n\t\t\telse \n\t\t\t\tPHP_VERSION=$(php -v | grep \"PHP 5\" | sed 's/.*PHP \\([^-]*\\).*/\\1/' | cut -c 1-3)\n\t\t\t\techo \"Installed PHP version: '$PHP_VERSION'\"\n\t\t\t\ttimezone=$(cat /etc/sysconfig/clock | grep ZONE | cut -d\"\\\"\" -f2)\n\t\t\t\tsed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini\n\t\t\t\techo \"date.timezone = $timezone\" >> /etc/php.ini\n\t\t\tfi\n\t\t}\n\t\tinstall_postgresql()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tid -a postgres\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]; then\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n sh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n apt install wget ca-certificates\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n fi\n wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n apt-key add ACCC4CF8.asc\n apt update\n apt install -y postgresql --allow-unauthenticated\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n return 13\n fi\n\t\t\t\telse\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\t\tfi\n\t\t\t\t\tif [[ 1 -eq \"$(echo \"${PSQL_VERSION} < 9.3\" | bc)\" ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tsh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'\n\t\t\t\t\t\tapt install wget ca-certificates\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"ca-certificates installation failed with error code ${error_code} (ca-certificates installation failed with error code 12)\"\n\t\t\t\t\t\tfi\n\t\t\t\t\t\twget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc\n\t\t\t\t\t\tapt-key add ACCC4CF8.asc\n\t\t\t\t\t\tapt update\n\t\t\t\t\t\tapt upgrade\n\t\t\t\t\t\tapt install -y postgresql --allow-unauthenticated\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 13)\"\n\t\t\t\t\t\t\treturn 13\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}' | head -1)\n\t\t\t\tif [[ ${PSQL_VERSION} == \"\" ]]; then\n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^10\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=10\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^11\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=11\n\t\t\t\tfi\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^12\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=12\n\t\t\t\tfi\n\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf > /etc/postgresql/${PSQL_VERSION}/main/pg_hba.conf.1\n\t\t\t\tcd /etc/postgresql/${PSQL_VERSION}/main || exit\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tservice postgresql restart\n\t\t\telse\n\t\t\t\tif ! which psql > /dev/null 2>&1;\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL not installed!\"\n echo \"Installing PostgreSQL...\"\n if [ $(getconf LONG_BIT) = \"64\" ]; then\n if [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n dnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n else\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n then\n yum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n fi\n fi\n fi\n if ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n dnf module enable postgresql:13\n dnf -y install postgresql-server postgresql-contrib postgresql-libs\n else\n yum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\t\n fi\n error_code=$?\n if [ ${error_code} != 0 ]\n then\n echo \"postgresql13 installation failed with error code ${error_code} (postgresql13 installation failed with error code 29)\"\n return 29\n fi\n\t\t\t\telse \n\t\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\t\tif [[ $PSQL_VERSION < 9.3 ]]; then\n\t\t\t\t\t\tset +x\n\t\t\t\t\t\techo \"Restyaboard will not work in your PostgreSQL version (i.e. less than 9.3). So script going to update PostgreSQL version 9.6\"\n\t\t\t\t\t\tif [ $(getconf LONG_BIT) = \"64\" ]; then\n\t\t\t\t\t\t\tif [[ $OS_REQUIREMENT = \"Fedora\" ]]; then\n\t\t\t\t\t\t\t\tdnf install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" != \"8\" ])\n\t\t\t\t\t\t\t\tthen\n\t\t\t\t\t\t\t\t\tyum install -y \"https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf module enable postgresql:13\n\t\t\t\t\t\t\tdnf -y install postgresql-server postgresql-contrib postgresql-libs\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y postgresql13 postgresql13-server postgresql13-contrib postgresql13-libs\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"postgresql installation failed with error code ${error_code} (postgresql installation failed with error code 29)\"\n\t\t\t\t\t\t\treturn 29\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tPSQL_VERSION=$(psql --version | egrep -o '[0-9]{1,}\\.[0-9]{1,}')\n\t\t\t\tif [[ ${PSQL_VERSION} =~ ^13\\.[0-9]{1,}$ ]]; then\n\t\t\t\t\tPSQL_VERSION=13\n\t\t\t\tfi\n\t\t\t\tPSQL_FOLDER=$(echo ${PSQL_VERSION} | sed 's/\\.//')\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tpostgresql-setup --initdb\n\t\t\t\telse\n\t\t\t\t\t\"/usr/pgsql-${PSQL_VERSION}/bin/postgresql-${PSQL_VERSION}-setup\" initdb\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl enable postgresql\n\t\t\t\t\tsystemctl start postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl start \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\t\tsystemctl enable \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" start\n\t\t\t\t\t\tchkconfig --levels 35 \"postgresql-${PSQL_VERSION}\" on\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/data/pg_hba.conf\" > \"/var/lib/pgsql/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/data\" || exit\n\t\t\t\telse\n\t\t\t\t\tsed -e 's/peer/trust/g' -e 's/ident/trust/g' < \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf\" > \"/var/lib/pgsql/${PSQL_VERSION}/data/pg_hba.conf.1\"\n\t\t\t\t\tcd \"/var/lib/pgsql/${PSQL_VERSION}/data\" || exit\n\t\t\t\tfi\n\t\t\t\tmv pg_hba.conf pg_hba.conf_old\n\t\t\t\tmv pg_hba.conf.1 pg_hba.conf\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\tthen\n\t\t\t\t\tsystemctl restart postgresql\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\tsystemctl restart \"postgresql-${PSQL_VERSION}.service\"\n\t\t\t\t\telse\n\t\t\t\t\t\t\"/etc/init.d/postgresql-${PSQL_VERSION}\" restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_geoip()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tif ! hash GeoIP-devel 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tapt install -y php7.4-geoip php7.4-dev libgeoip-dev\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code ${error_code} (php7.4-geoip php7.4-dev libgeoip-dev installation failed with error code 50)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\t\techo \"extension=geoip.so\" >> /etc/php.ini\n\n\t\t\t\tmkdir -v /usr/share/GeoIP\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"GeoIP folder creation failed with error code ${error_code} (GeoIP folder creation failed with error code 52)\"\n\t\t\t\tfi\n\t\t\t\tget_geoip_data\n\t\t\telse\n\t\t\t\tif ! hash pecl/geoip 2>&-;\n\t\t\t\tthen\n\t\t\t\t\tpecl install geoip\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"pecl geoip installation failed with error code ${error_code} (pecl geoip installation failed with error code 47)\"\n\t\t\t\t\t\treturn 47\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tconfigure_restyaboard()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n echo \"Changing server_name in nginx configuration...\"\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\telse\n cp ${DOWNLOAD_DIR}/restyaboard.conf /etc/nginx/conf.d\n sed -i \"s/server_name.*$/server_name \\\"$IPADDR\\\";/\" /etc/nginx/conf.d/restyaboard.conf\n sed -i \"s|listen 80.*$|listen 80;|\" /etc/nginx/conf.d/restyaboard.conf\n mkdir -p \"$RESTYABOARD_DIR\"\n echo \"Changing root directory in nginx configuration...\"\n sed -i \"s|root.*html|root $RESTYABOARD_DIR|\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\tfi\n\t\t}\n\t\tinstall_postfix()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Installing postfix...\"\n\t\t\t\techo \"postfix postfix/mailname string $IPADDR\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\techo \"postfix postfix/main_mailer_type string 'Internet Site'\"\\\n\t\t\t\t| debconf-set-selections &&\\\n\t\t\t\tapt install -y postfix\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"postfix installation failed with error code ${error_code} (postfix installation failed with error code 16)\"\n\t\t\t\tfi\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/fpm/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/fpm/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php/${PHP_VERSION}/cli/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php/${PHP_VERSION}/cli/php.ini\n\t\t\t\tfi\n\t\t\t\tif [ -f \"/etc/php.ini\" ] \n\t\t\t\tthen\n\t\t\t\t\tsed -i \"s/;sendmail_path =/sendmail_path = \\\"\\/usr\\/sbin\\/sendmail -t -i\\\"/g\" /etc/php.ini\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tchange_permission()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/media/ $RESTYABOARD_DIR/tmp/cache/ $RESTYABOARD_DIR/client/img/\n\t\t\t\tchcon -Rv --type=httpd_t $RESTYABOARD_DIR/\n\t\t\tfi\n\t\t}\n\t\tpsql_connect()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 34)\"\n\t\t\t\t\treturn 34\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 35)\"\n\t\t\t\t\treturn 35\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 36)\"\n\t\t\t\t\treturn 36\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 37)\"\n\t\t\t\t\treturn 37\n\t\t\t\tfi\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 39)\"\n\t\t\t\t\t\treturn 39\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL Changing the permission failed with error code ${error_code} (PostgreSQL Changing the permission failed with error code 40)\"\n\t\t\t\t\treturn 40\n\t\t\t\tfi\t\t\t\n\t\t\t\tsleep 1\n\t\t\t\techo \"Creating PostgreSQL user and database...\"\n\t\t\t\tpsql -U postgres -c \"DROP USER IF EXISTS ${POSTGRES_DBUSER};CREATE USER ${POSTGRES_DBUSER} WITH ENCRYPTED PASSWORD '${POSTGRES_DBPASS}'\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL user creation failed with error code ${error_code} (PostgreSQL user creation failed with error code 41)\"\n\t\t\t\t\treturn 41\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE DATABASE ${POSTGRES_DBNAME} OWNER ${POSTGRES_DBUSER} ENCODING 'UTF8' TEMPLATE template0\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database creation failed with error code ${error_code} (PostgreSQL database creation failed with error code 42)\"\n\t\t\t\t\treturn 42\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\"\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL extension creation failed with error code ${error_code} (PostgreSQL extension creation failed with error code 43)\"\n\t\t\t\t\treturn 43\n\t\t\t\tfi\t\t\t\n\t\t\t\tpsql -U postgres -c \"COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\"\n\t\t\t\tif [ \"$?\" = 0 ];\n\t\t\t\tthen\n\t\t\t\t\techo \"Importing empty SQL...\"\n\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/restyaboard_with_empty_data.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\terror_code=$?\n\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"PostgreSQL Empty SQL importing failed with error code ${error_code} (PostgreSQL Empty SQL importing failed with error code 45)\"\n\t\t\t\t\t\treturn 45\n\t\t\t\t\tfi\t\n\t\t\t\tfi\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P allow_postfix_local_write_mail_spool 1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tphp_fpm_reset()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \".........\"\n\t\t\telse\n\t\t\t\techo \"Reset php-fpm (use unix socket mode)...\"\n\t\t\t\tif [ -f \"/run/php/php7.4-fpm.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php\\/php7.4-fpm.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\telif [ -f \"/run/php-fpm/www.sock\" ]; then\n\t\t\t\t\tsed -i \"s/listen = 127.0.0.1:9000/listen = \\/run\\/php-fpm\\/www.sock/g\" /etc/php-fpm.d/www.conf\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/unix:\\/run\\/php-fpm\\/www.sock/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\telse\n\t\t\t\t\tsed -i \"s/unix:\\/run\\/php\\/php7.4-fpm.sock/127.0.0.1:9000/g\" /etc/nginx/conf.d/restyaboard.conf\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tinstall_jq()\n\t\t{\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tapt install -y jq\n\t\t\t\terror_code=$?\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 53)\"\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tyum install -y jq\n\t\t\t\terror_code\n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"jq installation failed with error code ${error_code} (jq installation failed with error code 49)\"\n\t\t\t\t\treturn 49\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tset_db_connection()\n\t\t{\t\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\techo \"Starting services...\"\n\t\t\t\tservice cron restart\n\t\t\t\tservice php7.4-fpm restart\n\t\t\t\tservice nginx restart\n\t\t\t\tservice postfix restart\n\t\t\t\tapt install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\telse\n\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\telse\n\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\tfi\n\t\t\t\tyum install -y python-pip\n\t\t\t\tpip install virtualenv\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\t\tthen\n\t\t\t\t\tsetsebool -P httpd_can_network_connect_db=1\n\t\t\t\tfi\n\t\t\tfi\n\t\t}\n\t\tssl_connectivity()\n\t\t{\n\t\t\tif [[ $IPADDR =~ ^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$ ]]; then\n\t\t\t\techo \"SSL connectivity cannot be set for IP address\"\n\t\t\telse\n\t\t\t\tset +x\n\t\t\t\techo \"Do you want to set up SSL connectivity for your domain and your domain should be publicly accessible Restyaboard instance and your domain should be mappped to this Restyaboard Server, Note: If you're trying to set SSL for Non-publicly accessible instance, then your Restyaboard will not work (y/n)?\"\n\t\t\t\tread -r answer\n\t\t\t\tset -x\n\t\t\t\tcase \"${answer}\" in\n\t\t\t\t\t[Yy])\n\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\t\tthen\n\t\t\t\t\t\tapt install certbot python3-certbot-nginx -y\n\t\t\t\t\t\tservice nginx restart\n\t\t\t\t\t\tservice php7.4-fpm restart\n\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\telse\n\t\t\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tdnf -y install epel-release\n\t\t\t\t\t\t\tdnf -y install certbot python3-certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tyum install -y epel-release\n\t\t\t\t\t\t\tyum install certbot-nginx\n\t\t\t\t\t\t\tcertbot --nginx\n\t\t\t\t\t\tfi\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"SSL installation failed with error code ${error_code} (php installation failed with error code 20)\"\n\t\t\t\t\t\t\treturn 20\n\t\t\t\t\t\tfi\n\t\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tesac\n\t\t\tfi\n\t\t}\n\t\tfind_release\n\t\tcheckdeps\n\t\tif ([ \"$pkg_name\" = \"apt-get\" ])\n then\n\t\t\tapt update\n apt install -y net-tools\n\t\t\tapt install -y curl unzip\n\t\telse\n\t\t\tif ([ \"$pkg_name\" = \"yum\" ])\n \tthen\n yum install -y net-tools\n\t\t\t\tyum install -y curl unzip\n\t\t\tfi\n\t\tfi\n IFCONFIG_PATH=$(which ifconfig)\n IPADDR=$(${IFCONFIG_PATH} eth0 | awk '/inet / { print $2 }' | sed 's/addr://')\n\t\tRESTYABOARD_VERSION=$(curl --silent https://api.github.com/repos/RestyaPlatform/board/releases | grep tag_name -m 1 | awk '{print $2}' | sed -e 's/[^v0-9.]//g')\n\t\tPOSTGRES_DBHOST=localhost\n\t\tPOSTGRES_DBNAME=restyaboard\n\t\tPOSTGRES_DBUSER=restya\n\t\tPOSTGRES_DBPASS=hjVl2!rGd\n\t\tPOSTGRES_DBPORT=5432\n\t\tDOWNLOAD_DIR=/opt/restyaboard\n RESTYABOARD_DIR=/usr/share/nginx/html/restyaboard\n\t\t\n\t\tget_geoip_data () \n\t\t{\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIP.dat.gz\n\t\t\tgunzip GeoIP.dat.gz\n\t\t\tmv GeoIP.dat /usr/share/GeoIP/GeoIP.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz\n\t\t\tgunzip GeoIPv6.dat.gz\n\t\t\tmv GeoIPv6.dat /usr/share/GeoIP/GeoIPv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.xz\n\t\t\tunxz GeoLiteCity.dat.xz\n\t\t\tmv GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoLiteCityv6.dat.gz\n\t\t\tgunzip GeoLiteCityv6.dat.gz\n\t\t\tmv GeoLiteCityv6.dat /usr/share/GeoIP/GeoLiteCityv6.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNum.dat.gz\n\t\t\tgunzip GeoIPASNum.dat.gz\n\t\t\tmv GeoIPASNum.dat /usr/share/GeoIP/GeoIPASNum.dat\n\t\t\twget https://mirrors-cdn.liferay.com/geolite.maxmind.com/download/geoip/database/GeoIPASNumv6.dat.gz\n\t\t\tgunzip GeoIPASNumv6.dat.gz\n\t\t\tmv GeoIPASNumv6.dat /usr/share/GeoIP/GeoIPASNumv6.dat\n\t\t}\n\n\t\tupgrade-0.3-0.4()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.4-0.4.1()\n\t\t{\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/chat_activities.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/0 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/periodic_chat_email_notification.sh//\" /var/spool/cron/crontabs/root\n\t\t\tsed -i \"s/*\\/5 * * * * $RESTYABOARD_DIR\\/server\\/php\\/shell\\/indexing_to_elasticsearch.sh//\" /var/spool/cron/crontabs/root\n\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/chat_activities.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/indexing_to_elasticsearch.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.sh\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/periodic_chat_email_notification.php\n\t\t\trm $RESTYABOARD_DIR/server/php/shell/upgrade_v0.2.1_v0.3.php\n\n\t\t\trm -rf $RESTYABOARD_DIR/client/apps/\n\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/jaxl3/\n\t\t\trm -rf $RESTYABOARD_DIR/server/php/libs/vendors/xmpp-prebind-php/\n\t\t}\n\n\t\tupgrade-0.5.2-0.6()\n\t\t{\n\t\t\tsed -i \"s/rewrite ^\\/ical\\/.*/rewrite ^\\/ical\\/([0-9]*)\\/([0-9]*)\\/([a-z0-9]*).ics\\$ \\/server\\/php\\/ical.php?board_id=\\$1\\&user_id=\\$2\\&hash=\\$3 last;/\" /etc/nginx/conf.d/restyaboard.conf\n\t\t}\n\n\t\tupgrade-0.6.3-0.6.4()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_created_date\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_created_date/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.4-0.6.5()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_hide_card_id\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_hide_card_id/\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.2.zip\n\t\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.5-0.6.6()\n\t\t{\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.1.zip\n\t\t\t\tunzip /tmp/r_codenames-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t}\n\t\t\n\t\tupgrade-0.6.6-0.6.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_card_counter-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_card_counter-v0.1.1.zip\n\t\t\tunzip /tmp/r_card_counter-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.2.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_eu_gdpr-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_eu_gdpr-v0.1.2.zip\n\t\t\tunzip /tmp/r_eu_gdpr-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.1.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.1.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.1.zip -d \"$RESTYABOARD_DIR/client/apps\"\t\t\t\n\t\t\t\n\t\t\tcurl -v -L -G -o /tmp/r_hide_card_additional_informations-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.3.zip\n\t\t\tunzip /tmp/r_hide_card_additional_informations-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\t: > /var/spool/cron/crontabs/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n\t\t\telse\n\t\t\t\t: > /var/spool/cron/root\n\t\t\t\techo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n\t\t\tfi\n\t\t}\n\n\t\tupgrade-0.6.7-0.6.8(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.3.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.3.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.3.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\n\t\tupgrade-0.6.8-0.6.9(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.4.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.4.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.4.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\n find \"$RESTYABOARD_DIR/client/apps\" -type d -exec chmod 755 {} \\;\n find \"$RESTYABOARD_DIR/client/apps\" -type f -exec chmod 644 {} \\;\n chmod 0777 $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t}\n\t\tupgrade-0.6.9-1.7(){\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps/r_togetherjs\" ]; then\n\t\t\t\trm -rf $RESTYABOARD_DIR/client/apps/r_togetherjs/\n\t\t\tfi\n\t\t\tif [ -d \"$RESTYABOARD_DIR/client/apps\" ]; then\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\telse \n\t\t\t\tmkdir \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\tchmod -R go+w \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tfi\n\t\t\tcurl -v -L -G -o /tmp/r_codenames-v0.1.5.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_codenames-v0.1.5.zip\n\t\t\tunzip /tmp/r_codenames-v0.1.5.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tcurl -v -L -G -o /tmp/r_gmail_addon-v0.1.2.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_gmail_addon-v0.1.2.zip\n\t\t\tunzip /tmp/r_gmail_addon-v0.1.2.zip -d \"$RESTYABOARD_DIR/client/apps\"\n\t\t\t\n\t\t\techo \"Applying permission...\"\n\t\t\tuseradd restyaboard\n\t\t\tusermod --password 'hjVl2!rGd' restyaboard\n\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\tthen\n\t\t\t\tuser www-data;\n\t\t\t\tusermod -a -G restyaboard www-data\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf\n\t\t\telse\n\t\t\t\tuser nginx;\n\t\t\t\tusermod -a -G restyaboard nginx\n\t\t\t\tsed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\t\tsed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n\t\t\tfi\n\t\t\tchown -R restyaboard:restyaboard $RESTYABOARD_DIR\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n\t\t\tchmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n\t\t\tchown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= \"$RESTYABOARD_DIR/client/apps\"\n\t\t\tchmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ])\n\t\t\tthen\n\t\t\t\tchcon -R -t httpd_sys_rw_content_t $RESTYABOARD_DIR/client/apps/**/*.json\n\t\t\tfi\n\t\t}\n\n\t\tupdate_version()\n\t\t{\n\t\t\tset +x\n\t\t\techo -e \"A newer version ${RESTYABOARD_VERSION} of Restyaboard is available.\\n\\nImportant: Please note that upgrading will remove any commercial apps that were free in previous version.\\nFor more details about commercial apps, please visit https://restya.com/board/pricing\\n\\nDo you want to get it now y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tset +x\n\t\t\t\tset -x\n\t\t\t\t\n\t\t\t\techo \"Downloading files...\"\n\t\t\t\tcurl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n\t\t\t\tunzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n\t\t\t\t\n\t\t\t\techo \"Updating files...\"\n\t\t\t\tcp -r ${DOWNLOAD_DIR}/. \"$RESTYABOARD_DIR\"\n\t\t\t\t\n\t\t\t\techo \"Connecting database to run SQL changes...\"\n\t\t\t\tpsql -U postgres -c \"\\q\"\n\t\t\t\terror_code=$? \n\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\tthen\n\t\t\t\t\techo \"PostgreSQL database connection failed with error code ${error_code} (PostgreSQL database connection failed with error code 32)\"\n\t\t\t\t\treturn 32\n\t\t\t\tfi\n\t\t\t\tsleep 1\n\t\t\t\t\n\t\t\t\techo \"Changing PostgreSQL database name, user and password...\"\n\t\t\t\tsed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tsed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n\t\t\t\tPHP_VERSION=$(php --version | head -n 1 | cut -d \" \" -f 2 | grep --only-matching --perl-regexp \"^\\\\d\\.\\\\d+\")\n\t\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\t\tdeclare -a upgrade;\n\t\t\t\tif [[ $version < \"v0.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.3-0.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.4.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4-0.4.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.4.2-0.5\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.5.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.1-0.5.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.5.2-0.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.1\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6-0.6.1\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.2\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.1-0.6.2\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.3\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.2-0.6.3\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.4\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.3-0.6.4\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.5\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.4-0.6.5\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v0.6.6\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.5-0.6.6\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tset +x\n\t\t\t\t\techo \"Before updating make sure to remove duplicate username's and emails used by more than one user, otherwise unique indexing for users will be thrown an error But all other queries will be executed without any issue.\"\n\t\t\t\t\tread -r -s -p $'Press [Enter] key to continue...'\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.6-0.6.7\")\n\t\t\t\tfi\n\t\t\t\tif [[ $version < \"v0.6.8\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.7-0.6.8\")\n\t\t\t\tfi\t\t \n\t\t\t\tif [[ $version < \"v0.6.9\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.8-0.6.9\")\n\t\t\t\tfi\t\n\t\t\t\tif [[ $version < \"v1.7\" ]];\n\t\t\t\tthen\n\t\t\t\t\tupgrade+=(\"upgrade-0.6.9-1.7\")\n\t\t\t\tfi\n\t\t\t\t# use for loop to read all values and indexes\n\t\t\t\tfor i in \"${upgrade[@]}\"\n\t\t\t\tdo\n\t\t\t\t\tif [ \"$(type -t ${i})\" = function ];\n\t\t\t\t\tthen\n\t\t\t\t\t\teval ${i}\n\t\t\t\t\tfi\n\t\t\t\t\tif [ -f \"$RESTYABOARD_DIR/sql/${i}.sql\" ];\n\t\t\t\t\tthen\n\t\t\t\t\t\techo \"Updating SQL...\"\n\t\t\t\t\t\tpsql -d ${POSTGRES_DBNAME} -f \"$RESTYABOARD_DIR/sql/${i}.sql\" -U ${POSTGRES_DBUSER}\n\t\t\t\t\t\terror_code=$?\n\t\t\t\t\t\tif [ ${error_code} != 0 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\techo \"PostgreSQL updation of SQL failed with error code ${error_code} (PostgreSQL updation of SQL failed with error code 33)\"\n\t\t\t\t\t\t\treturn 33\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tdone\n\t\t\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\n\t\t\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\t\t\tthen\t\t\t\t \n service nginx restart\n\t\t\t\t\tservice php${PHP_VERSION}-fpm restart\n\t\t\t\telse\n\t\t\t\t\tif [ -f \"/bin/systemctl\" ]; then\n\t\t\t\t\t\techo \"Starting services with systemd...\"\n\t\t\t\t\t\tsystemctl restart nginx\n\t\t\t\t\t\tsystemctl restart php-fpm\n\t\t\t\t\telse\n\t\t\t\t\t\techo \"Starting services...\"\n\t\t\t\t\t\t/etc/init.d/php-fpm restart\n\t\t\t\t\t\t/etc/init.d/nginx restart\n\t\t\t\t\tfi\n\t\t\t\tfi\n\n\t\t\tesac\n\t\t}\n\n\t\tif [ -f \"$DOWNLOAD_DIR/release\" ];\n\t\tthen\n\t\t\tversion=$(cat ${DOWNLOAD_DIR}/release)\n\t\t\tif [[ $version < $RESTYABOARD_VERSION ]];\n\t\t\tthen\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\telse\n\t\t\t\techo \"No new version available\"\n\t\t\t\texit;\n\t\t\tfi\n\t\telse\n\t\t\tset +x\n\t\t\techo \"Is Restyaboard already installed and configured/working y/n?\"\n\t\t\tread -r answer\n\t\t\tset -x\n\t\t\tcase \"${answer}\" in\n\t\t\t\t[Yy])\n\t\t\t\tupdate_version\n\t\t\t\texit;\n\t\t\tesac\n\t\tfi\n\n if ([ \"$OS_REQUIREMENT\" = \"Debian\" ])\n then\n sed -i -e 's/deb cdrom/#deb cdrom/g' /etc/apt/sources.list\n sh -c 'echo \"deb http://ftp.de.debian.org/debian jessie main\" > /etc/apt/sources.list.d/debjessie.list'\n apt install apt-transport-https lsb-release ca-certificates -y\n wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg\n echo \"deb https://packages.sury.org/php/ $(lsb_release -sc) main\" | tee /etc/apt/sources.list.d/php.list\n fi\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n apt install debian-keyring debian-archive-keyring -y\n apt update -y\n apt upgrade -y\n apt install python-software-properties -y\n apt install software-properties-common -y\n if ! hash php 2>&-; then\n add-apt-repository -y ppa:ondrej/php\n apt update -y\n apt install libjpeg8 -y --allow-unauthenticated\n fi\n fi\n install_nginx\n \n echo \"Checking PHP...\"\n install_php\n\n echo \"Setting up timezone...\"\n set_timezone\n \n echo \"Checking PostgreSQL...\"\n install_postgresql\n\n install_geoip\n \n echo \"Downloading Restyaboard script...\"\n if ([ \"$pkg_name\" = \"apt-get\" ])\n then\n apt install -y curl\n fi\n mkdir ${DOWNLOAD_DIR}\n curl -v -L -G -d \"app=board&ver=${RESTYABOARD_VERSION}\" -o /tmp/restyaboard.zip -k https://restya.com/download.php\n unzip /tmp/restyaboard.zip -d ${DOWNLOAD_DIR}\n rm /tmp/restyaboard.zip\n\n configure_restyaboard\n \n \n echo \"Copying Restyaboard script to root directory...\"\n cp -r ${DOWNLOAD_DIR}/* \"$RESTYABOARD_DIR\"\n \n install_postfix\n \n echo \"Changing permission...\"\n useradd restyaboard\n usermod --password 'hjVl2!rGd' restyaboard\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n user www-data;\n usermod -a -G restyaboard www-data\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"s/user\\s*=\\s*www-data/user = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n sed -i \"0,/group\\s*=\\s*www-data/s//group = restyaboard/g\" /etc/php/7.4/fpm/pool.d/www.conf\n else\n user nginx;\n usermod -a -G restyaboard nginx\n sed -i \"s/\\[www\\]/[restyaboard] group=restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"s/user\\s*=\\s*apache/user = restyaboard/g\" /etc/php-fpm.d/www.conf\n sed -i \"0,/group\\s*=\\s*apache/s//group = restyaboard/g\" /etc/php-fpm.d/www.conf\n fi\n chown -R restyaboard:restyaboard $RESTYABOARD_DIR\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/media\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/media;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/client/img\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/client/img;\n chown -R restyaboard:restyaboard \"$RESTYABOARD_DIR/tmp/cache\"\n chmod -R u=rwX,g=rX,o= $RESTYABOARD_DIR/tmp/cache;\n chmod +x $RESTYABOARD_DIR/server/php/shell/main.sh\n change_permission\n\n psql_connect\n \n echo \"Changing PostgreSQL database name, user and password...\"\n sed -i \"s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${POSTGRES_DBNAME}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_DBUSER}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_DBPASS}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${POSTGRES_DBHOST}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n sed -i \"s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${POSTGRES_DBPORT}');/g\" \"$RESTYABOARD_DIR/server/php/config.inc.php\"\n \n echo \"Setting up cron for every 5 minutes..\"\n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/crontabs/root\n else\n echo \"*/5 * * * * $RESTYABOARD_DIR/server/php/shell/main.sh > /dev/null 2> /dev/null\" >> /var/spool/cron/root\n fi\n php_fpm_reset\n \n if ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n then\n service nginx restart\n service php7.4-fpm restart\n else\n if [ -f \"/bin/systemctl\" ]; then\n echo \"Starting services with systemd...\"\n systemctl restart nginx\n systemctl restart php-fpm\n else\n echo \"Starting services...\"\n /etc/init.d/php-fpm restart\n /etc/init.d/nginx restart\n fi\n fi\n set_db_connection\n\t\t/bin/echo \"$RESTYABOARD_VERSION\" > ${DOWNLOAD_DIR}/release\n\t\tif ([ \"$OS_REQUIREMENT\" = \"Ubuntu\" ] || [ \"$OS_REQUIREMENT\" = \"Debian\" ] || [ \"$OS_REQUIREMENT\" = \"LinuxMint\" ] || [ \"$OS_REQUIREMENT\" = \"Raspbian\" ])\n\t\tthen\n\t\t\tssl_connectivity\n\t\telse\n\t\t\tssl_connectivity\n\t\tfi\n\t\tif ([ \"$OS_REQUIREMENT\" = \"CentOS\" ] && [ \"$OS_VERSION\" = \"8\" ])\n then\n\t\t\tsemanage permissive -a httpd_t\n\t\tfi\n\t\tset +x\n\t\techo \"Checking Hosting...\"\n\t\tresponse=$(curl -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2017-04-02 --write-out %{http_code} --connect-timeout 10 --max-time 10 --silent --output /dev/null)\n\t\t\n\t\tif [ -f /etc/ImageMagick-6/policy.xml ]; then\n \t\tsed -i -e 's///g' /etc/ImageMagick-6/policy.xml\n\t\tfi\n\n\t\tif [ -f /etc/ImageMagick/policy.xml ]; then\n\t\t\tsed -i -e 's///g' /etc/ImageMagick/policy.xml\n\t\tfi\n\n\t\tif [ ${response} -eq 200 ];then\n\t\t\techo \"Note: PHP Mailer will not work in Azure. Kindly use external SMTP mail server.\"\n\t\tfi\n\t\tset +x\n\t\tcurl -v -L -G -d \"app=board&os=${os}&version=${version}\" -k \"https://restya.com/success_installation.php\"\n\t\techo \"Restyaboard URL : $IPADDR\"\n\n\t\techo \"Login with username admin and password restya\"\n\t\texit 1\n\t}\n\tmain\n\terror=$?\n\tos=$(lsb_release -i -s)\n\tcurl -v -L -G -d \"app=board&os=${os}&error=${error}\" -k \"https://restya.com/error_installation.php\"\n\techo \"If you're finding it difficult to install Restyaboard from your end, we do also offer installation support that you may consider https://restya.com/contact\"\n\texit 1\n} 2>&1 | tee -a /tmp/restyaboard_install.log","user_defined_fields":[]},{"id":912264,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rocket.Chat One-Click","description":"Rocket.Chat One-Click","ordinal":97,"logo_url":"assets/rocketchat.svg","images":["linode/ubuntu20.04"],"deployments_total":1810,"deployments_active":91,"is_public":true,"mine":false,"created":"2021-09-29T17:16:16","updated":"2023-12-11T15:12:25","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Update system & set hostname & basic security\nset_hostname\napt_setup_update\nufw_install\nufw allow 443\nufw allow 80\nufw allow 3000\nfail2ban_install\n\n# Snapd & rocketchat install\napt install snapd -y\nsnap install rocketchat-server\nsnap info rocketchat-server\n\n# Check DNS\ncheck_dns_propagation \"${FQDN}\" \"${IP}\"\n# SSL\nsnap set rocketchat-server siteurl=https://$FQDN\nsystemctl enable --now snap.rocketchat-server.rocketchat-caddy \nsnap restart rocketchat-server\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for the SOA","default":""}]},{"id":609048,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Ruby on Rails One-Click","description":"Ruby on Rails One-Click","ordinal":98,"logo_url":"assets/rubyonrails.svg","images":["linode/ubuntu20.04"],"deployments_total":459,"deployments_active":20,"is_public":true,"mine":false,"created":"2019-11-05T07:22:54","updated":"2023-12-09T10:22:03","rev_note":"Initial import","script":"#!/bin/bash\n#\n\nsource \nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Set hostname, configure apt and perform update/upgrade\nset_hostname\napt_setup_update\n\n# Install Ruby on Rails\napt install -y ruby rails\n\n# Configure rails Directory\nmkdir /home/railsapp\ncd /home/railsapp\nrails new $RAILSAPP\ncd $RAILSAPP\nrails s -b 0.0.0.0 &\n\n# Start rails app on reboot\ncrontab -l | { cat; echo \"@reboot cd /home/railsapp/app1/ && rails s -b 0.0.0.0 &\"; } | crontab -\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"railsapp","label":"Rails Application name","example":"railsapp"}]},{"id":401703,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Rust One-Click","description":"Rust - Latest One-Click","ordinal":99,"logo_url":"assets/Rust.svg","images":["linode/ubuntu20.04"],"deployments_total":2455,"deployments_active":8,"is_public":true,"mine":false,"created":"2019-03-08T21:09:34","updated":"2023-12-10T08:41:10","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \nsource \n\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\nGAMESERVER=\"rustserver\"\n\nset_hostname\napt_setup_update\n\n\nif [[ \"$RUSTHOSTNAME\" = \"\" ]]; then\n RUSTHOSTNAME=\"Linode Rust Server\"\nfi\n\nif [[ \"$LEVEL\" = \"Procedural Map\" ]]; then\n LEVEL=\"\"\nfi\n\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix curl \\\nwget file bzip2 gzip unzip bsdmainutils python \\\nutil-linux ca-certificates binutils bc jq tmux \\\nlib32gcc1 libstdc++6 libstdc++6:i386 lib32z1\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Rust\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\n#Game Config Options\n\ncp /home/rustserver/lgsm/config-lgsm/rustserver/_default.cfg /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nchown -R rustserver:rustserver /home/rustserver/\n\necho \"server.globalchat $GLOBALCHAT/\" > /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.pve $PVE\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.description \\\"$DESCRIPTION\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.maxplayers $MAXPLAYERS\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.seed \\\"$SEED\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.level $LEVEL\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.hostname \\\"$RUSTHOSTNAME\\\"\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\necho \"server.ip $IP\" >> /home/rustserver/serverfiles/server/rustserver/cfg/server.cfg\nsed -i \"s/rconpassword=\\\"CHANGE_ME\\\"/rconpassword=\\\"$RCONPASSWORD\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/worldsize=\\\"3000\\\"/worldsize=\\\"$WORLDSIZE\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\nsed -i \"s/maxplayers=\\\"50\\\"/maxplayers=\\\"$MAXPLAYERS\\\"/\" /home/rustserver/lgsm/config-lgsm/rustserver/common.cfg\n\n\n# Start the service and setup firewall\nufw allow 28015\nufw allow 28016\n\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"rusthostname","label":"Server Hostname","default":"Linode Rust Server"},{"name":"description","label":"Server Description","default":"Powered by Linode!"},{"name":"rconpassword","label":"RCON Password"},{"name":"maxplayers","label":"Maximum Players","oneof":"10,25,50,75,100","default":"50"},{"name":"level","label":"World","oneof":"Procedural Map,Barren,HapisIsland,SavasIsland_koth","default":"Procedural Map"},{"name":"worldsize","label":"World Size","oneof":"1000,3000,6000","default":"3000"},{"name":"seed","label":"Seed","default":"50000"},{"name":"globalchat","label":"Global Chat Enabled","oneof":"true,false","default":"true"},{"name":"pve","label":"PvE Enabled","oneof":"true,false","default":"false"}]},{"id":971042,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Saltcorn One-Click","description":"Saltcorn One-Click","ordinal":100,"logo_url":"assets/saltcorn.svg","images":["linode/ubuntu20.04","linode/debian11"],"deployments_total":304,"deployments_active":6,"is_public":true,"mine":false,"created":"2022-02-08T16:21:05","updated":"2023-12-02T23:13:46","rev_note":"","script":"#!/bin/bash\n## Saltcorn Settings\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\nfunction saltcorninstall {\n wget -qO - https://deb.nodesource.com/setup_14.x | sudo bash -\n apt-get install -qqy nodejs\n npx saltcorn-install -y\n systemctl enable saltcorn\n systemctl stop saltcorn\n cat < /lib/systemd/system/saltcorn.service\n[Unit]\nDescription=saltcorn\nDocumentation=https://saltcorn.com\nAfter=network.target\n\n[Service]\nType=notify\nWatchdogSec=5\nUser=saltcorn\nWorkingDirectory=/home/saltcorn\nExecStart=/home/saltcorn/.local/bin/saltcorn serve -p 8080\nRestart=always\nEnvironment=\"NODE_ENV=production\"\n\n[Install]\nWantedBy=multi-user.target\nEND\n systemctl daemon-reload\n systemctl start saltcorn\n}\n\nfunction firewallsaltcorn {\n ufw allow 22\n ufw allow 80\n ufw allow 443\n}\n\nfunction nginxreversesaltcorn {\n apt-get install nginx -y\n cat < /etc/nginx/conf.d/saltcorn.conf\nserver {\n listen 80;\n server_name $FQDN $IP;\n\n location / {\n proxy_set_header X-Forwarded-For \\$remote_addr;\n proxy_set_header Host \\$http_host;\n proxy_pass http://localhost:8080;\n }\n}\nEND\n nginx -t\n unlink /etc/nginx/sites-enabled/default\n systemctl restart nginx\n}\n\nfunction ssl_saltcorn {\napt install certbot python3-certbot-nginx -y\ncertbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'nginx'\n}\n\nfunction main {\n saltcorninstall\n nginxreversesaltcorn\n firewallsaltcorn\n ssl_saltcorn\n\n}\n# Execute\nmain \nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address for Letsencrypt SSL","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":774829,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"ServerWand One-Click","description":"ServerWand One-Click","ordinal":101,"logo_url":"assets/serverwand.svg","images":["linode/ubuntu22.04"],"deployments_total":1085,"deployments_active":11,"is_public":true,"mine":false,"created":"2021-02-19T17:28:16","updated":"2023-12-11T22:11:37","rev_note":"","script":"#!/bin/bash\n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# serverwand ssh key\nmkdir -p /root/.ssh/\nchmod 700 /root/.ssh/\ncurl https://serverwand.com/api/servers/connect > ~/.ssh/authorized_keys\nchmod 600 /root/.ssh/authorized_keys","user_defined_fields":[]},{"id":1177225,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Seatable One-Click","description":"Seatable One-Click App","ordinal":102,"logo_url":"assets/seatable.svg","images":["linode/debian11"],"deployments_total":44,"deployments_active":1,"is_public":true,"mine":false,"created":"2023-05-16T19:56:00","updated":"2023-12-04T16:58:01","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n\nsource \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION \n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Update and basic installs\nsystem_update\ndebian_upgrade\nenable_fail2ban\nsystem_install_package ufw ca-certificates curl gnupg lsb-release curl pwgen\n\n# Install docker\nmkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\necho \\\n \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \\\n $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nchmod a+r /etc/apt/keyrings/docker.gpg\napt-get -y update\napt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose\n\n# Pull current seatable container\ndocker pull seatable/seatable-enterprise:latest\nmkdir /opt/seatable\nwget -O \"/opt/seatable/docker-compose.yml\" \"https://manual.seatable.io/docker/Enterprise-Edition/docker-compose.yml\"\n\n# Prepare SeaTable\nMYSQL_PASSWORD=`pwgen -s 30 1`\nsed -i \"s|DB_ROOT_PASSWD=.*|DB_ROOT_PASSWD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|MYSQL_ROOT_PASSWORD=.*|MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_LETSENCRYPT=.*|SEATABLE_SERVER_LETSENCRYPT=${LE}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|SEATABLE_SERVER_HOSTNAME=.*|SEATABLE_SERVER_HOSTNAME=${URL}|\" /opt/seatable/docker-compose.yml\nsed -i \"s|TIME_ZONE=.*|TIME_ZONE=${TIMEZONE}|\" /opt/seatable/docker-compose.yml\n\n# Add a license\nmkdir -p /opt/seatable/seatable-data/seatable\ntouch /opt/seatable/seatable-data/seatable/seatable-license.txt\ncat << EOF > /opt/seatable/seatable-data/seatable/seatable-license.txt\n#SeaTable server licence\nName = \"Cloud Trial\"\nLicencetype = \"User\"\nLicenceKEY = \"1672935702\"\nProductID = \"SeaTable server\"\nExpiration = \"2024-01-31\"\nMaxUsers = \"3\"\nMode = \"subscription\"\nHash = \"045af708265d7d549cad51fc2b678272a1d15ab8cbfbf05734e371504bb72b388f4441493c7bfeccce7c19ac9c6877cb8f3aecc3beebe685db007832e1c0231728a92772d45dc1c08facbc225d90776f86d34cb4154bafe7c983b6767ffb31a74b133de61edf15c170564fcefb6e457012f63b95ed4aaf6fd2e1e1cfc2ad93a682cfab2fe86f427f7d93ae9b69cbaf02a7565074a95a8c1176402f250d2e815ab206a6b65009c65d94259772ab31a00c11e5c6b57fda0fbb1b22a69734c10214594a5d7b4c88a995eaeb3a65f9aa5d163d9e5c09f73105a4ef760a8421fb66d1982da739c42808fded9a95e456090747e494b0a1aee2a40f388d9f1146051754\"\nEOF\n\n# firewall\nufw limit ssh\nufw allow 80\nufw allow 443\nufw --force enable\n\n# Message of the day\ncat << EOF > /etc/motd\n#############################\n#############################\nSeaTable Enterprise Server\n\nTo finish the installation, change to the directory /opt/seatable and follow our deployment instructions at https://manual.seatable.io/docker/Enterprise-Edition/Deploy%20SeaTable-EE%20with%20Docker/.\nYou can skip the beginning and start directly with the adjustment of the docker-compose.yml file.\n\nPlease visit https://forum.seatable.io for SeaTable community support.\n#############################\n#############################\n\nEOF\n\necho \"Installation complete\"\nall_set\nstackscript_cleanup","user_defined_fields":[{"name":"url","label":"The domain/subdomain for SeaTable Server","example":"https://seatable.example.org"},{"name":"le","label":"Get a Let's Encrypt certificate","default":"True","oneof":"True,False"},{"name":"timezone","label":"Choose your timezone (e.g Europe/Berlin)","example":"Choices can be found here: http://en.wikipedia.org/wiki/List_of_tz_zones_by_name","default":"Etc/UTC"}]},{"id":604068,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Shadowsocks One-Click","description":"Shadowsocks One-Click","ordinal":103,"logo_url":"assets/shadowsocks.svg","images":["linode/ubuntu20.04"],"deployments_total":9287,"deployments_active":352,"is_public":true,"mine":false,"created":"2019-10-22T16:11:39","updated":"2023-12-12T14:27:20","rev_note":"final edit","script":"#!/usr/bin/env bash\n\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n## Import the Bash StackScript Library\nsource \n\n## Import the DNS/API Functions Library\nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# Install & configure shadowsocks\nfunction install_shadowsocks {\n apt-get install shadowsocks-libev -y\n cat </etc/shadowsocks-libev/config.json\n{\n\"server\":\"$IP\",\n\"server_port\":8000,\n\"local_port\":1080,\n\"password\":\"$SHADOWPASSWORD\",\n\"timeout\":60,\n\"method\":\"aes-256-gcm\"\n}\nEND\n systemctl start shadowsocks-libev\n systemctl enable shadowsocks-libev\n systemctl restart shadowsocks-libev\n}\n\nfunction shadowsocks_firewall {\n ufw allow 8000\n}\n\nfunction main {\n install_shadowsocks\n shadowsocks_firewall\n stackscript_cleanup\n}\n\n# Execute function\nmain","user_defined_fields":[{"name":"shadowpassword","label":"Shadowsocks Password","example":"Password"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address for SOA Recorf","default":""}]},{"id":1243780,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"SimpleX Chat One-Click","description":"SimpleX Chat","ordinal":104,"logo_url":"assets/simplexchat.svg","images":["linode/ubuntu22.04"],"deployments_total":61,"deployments_active":8,"is_public":true,"mine":false,"created":"2023-09-28T15:20:59","updated":"2023-12-11T10:24:43","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Simplex Settings\n# \n# \n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-simplex-chat\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n # Simplex variables\n \n if [[ -n ${TOKEN_PASSWORD} ]]; then\n if [[ -n ${DOMAIN} && -n ${SUBDOMAIN} ]]; then\n echo \"addr: ${SUBDOMAIN}.${DOMAIN}\" >> ${group_vars}\n elif [[ -n ${DOMAIN} ]]; then\n echo \"addr: ${DOMAIN}\" >> ${group_vars}\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n else\n echo \"addr: $(hostname -I | awk '{print $1}')\" >> ${group_vars}\n fi\n\n if [[ -n ${SMP_PASSWORD} ]]; then\n echo \"smp_password: ${SMP_PASSWORD}\" >> ${group_vars};\n fi\n\n if [[ -n ${XFTP_QUOTA} ]]; then\n case ${XFTP_QUOTA} in\n *gb) echo \"xftp_quota: ${XFTP_QUOTA}\" >> ${group_vars} ;;\n *) echo \"xftp_quota: ${XFTP_QUOTA}gb\" >> ${group_vars} ;;\n esac\n fi\n\n # Linode variables\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n else echo \"No email entered\";\n fi\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"smp_password","label":"Set password for smp-server.","example":"123qwe","default":""},{"name":"xftp_quota","label":"Set xftp-server file storage quota in GB.","example":"1/5/10/100gb","default":"10gb"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"SOA Email","example":"user@domain.tld","default":""}]},{"id":869153,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Splunk One-Click","description":"Splunk One-Click","ordinal":105,"logo_url":"assets/splunk.svg","images":["linode/debian10","linode/ubuntu20.04"],"deployments_total":961,"deployments_active":94,"is_public":true,"mine":false,"created":"2021-07-20T19:04:43","updated":"2023-12-11T14:21:26","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Splunk settings\n#\n#\n\n## Domain settings\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -xo pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and OCA Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n# Configure Splunk\nwget https://download.splunk.com/products/splunk/releases/8.2.0/linux/splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz\nwget \ntar zxvf splunk-8.2.0-e053ef3c985f-Linux-x86_64.tgz -C /opt/\nuseradd splunk --system --shell=/usr/sbin/nologin\nchown -R splunk:splunk /opt/splunk\n\napt install -y expect\n SPLUNK_INSTALL=$(expect -c \"\n set timeout 10\n spawn /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 1 --accept-license\n expect \\\"Please enter an administrator username:\\\"\n send \\\"$SPLUNK_USER\\r\\\"\n expect \\\"Please enter a new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect \\\"Please confirm new password:\\\"\n send \\\"$SPLUNK_PASSWORD\\r\\\"\n expect eof\n \")\n\n# Start daemon\nsystemctl start Splunkd\nsystemctl status Splunkd\n\n# Firewall\nufw allow 22 \nufw allow 8000\nufw allow 8089\nufw allow 9997\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"splunk_user","label":"Splunk Admin User"},{"name":"splunk_password","label":"Splunk Admin password"},{"name":"token_password","label":"Your Linode API token. This is required in order to create DNS records.","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token)","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"user1","default":""},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd","default":""},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":1102904,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Superinsight One-Click","description":"Superinsight One-Click app","ordinal":106,"logo_url":"assets/superinsight.svg","images":["linode/ubuntu22.04"],"deployments_total":29,"deployments_active":1,"is_public":true,"mine":false,"created":"2022-12-20T17:43:01","updated":"2023-12-03T07:53:56","rev_note":"","script":"#!/usr/bin/bash\n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n# System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Install docker\ncurl -fsSL get.docker.com | sudo sh\n\n# Creating Password\necho \"Superinsight setting up password....\"\nADMIN_PASSWORD=$(openssl rand -hex 12)\nNODE_IP=$(hostname -I | cut -f1 -d' ')\necho \"Downloading and Installing Superinsight instance......\"\n\n# Install Superinsight\ndocker run \\\n--detach \\\n--name superinsight-db-standalone \\\n--restart always \\\n-p 5432:5432 \\\n-v vol-superinsight:/db \\\n-e SUPERINSIGHT_USER=admin \\\n-e SUPERINSIGHT_PASSWORD=\"${ADMIN_PASSWORD}\" \\\nsuperinsight/superinsight-db-standalone:latest\n\n\n# Print instructions\ncat << EOF > /etc/motd\n\n################################################################################################################################################\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSUPERINSIGHT\n################################################################################################################################################\n\nSuperinsight created the user admin with password: ${ADMIN_PASSWORD}\nYou can can connect using a database client with the following connection string postgres://admin:${ADMIN_PASSWORD}@${NODE_IP}:5432/superinsight\nFor complete source code and information, visit: https://github.com/superinsight/superinsight-db\n\n################################################################################################################################################\nEOF","user_defined_fields":[]},{"id":401705,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Terraria One-Click","description":"Terraria One-Click","ordinal":107,"logo_url":"assets/Terraria.svg","images":["linode/ubuntu20.04"],"deployments_total":705,"deployments_active":5,"is_public":true,"mine":false,"created":"2019-03-08T21:10:49","updated":"2023-12-06T13:35:55","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n\n#Game config options\n\n#\n#\n#\n#\n#\n#\n#\n\n\n#Non-MVP config options\n#name=\"autocreate\" label=\"autocreate\" default=\"1\"/>\n#name=\"worldpath\" label=\"worldpath\" default=\"~/.local/share/Terraria/Worlds/\"/>\n#name=\"banlist\" label=\"banlist\" default=\"banlist.txt\"/>\n#name=\"priority\" label=\"priority\" default=\"1\"/>\n#name=\"upnp\" label=\"upnp\" default=\"1\"/>\n#name=\"npcstream\" label=\"npcstream\" default=\"60\"/>\n#name=\"secure\" label=\"secure\" default=\"1\"/>\n#name=\"language\" label=\"language\" default=\"en-US\"/>\n\n\nsource \nsource \nsource \nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -xo pipefail\n\nGAMESERVER=\"terrariaserver\"\n\n### UDF to config\n\nif [[ \"$DIFFICULTY\" = \"Normal\" ]]; then\n DIFFICULTY=\"0\"\nelif [[ \"$DIFFICULTY\" = \"Expert\" ]]; then\n DIFFICULTY=\"1\"\nfi\n\nset_hostname\napt_setup_update\n\n\n# Terraria specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\nsudo apt -q -y install mailutils postfix \\\ncurl wget file bzip2 gzip unzip bsdmainutils \\\npython util-linux ca-certificates binutils bc \\\njq tmux lib32gcc1 libstdc++6 libstdc++6:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\necho Requires Steam username and password to install\nsu - $GAMESERVER -c \"mkdir -p /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER\"\nsu - $GAMESERVER -c \"touch /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steamuser=\\\"$STEAMUSER\\\" >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\nsu - $GAMESERVER -c \"echo steampass=\\''$STEAMPASSWORD'\\' >> /home/$GAMESERVER/lgsm/config-lgsm/$GAMESERVER/common.cfg\"\n\n# Install Terraria\ngame_install\n\nsed -i s/#seed=AwesomeSeed/seed=\"$SEED\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/worldname=world1/worldname=\"$WORLDNAME\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/difficulty=0/difficulty=\"$DIFFICULTY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/maxplayers=20/maxplayers=\"$MAXPLAYERS\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/port=7777/port=\"$PORT\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/password=/password=\"$PASSWORD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\nsed -i s/motd=.*/motd=\"$MOTD\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n#Non-MVP config options\n# sed -i s/autocreate=1/autocreate=\"$AUTOCREATE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/worldpath=\\~\\/\\.local\\/share\\/Terraria\\/Worlds\\//worldpath=\"$WORLDPATH\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/banlist=banlist.txt/banlist=\"$BANLIST\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/\\#priority=1/priority=\"$PRIORITY\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#npcstream=60/npcstream=\"$NPCSTREAM\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/#upnp=1/upnp=\"$UPNP\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/secure=1/secure=\"$SECURE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n#sed -i s/language=en\\-US/language=\"$LANGUAGE\"/ home/\"$GAMESERVER\"/serverfiles/\"$GAMESERVER\".txt\n\n# Setup crons and create systemd service file\nservice_config\n\n# Start the service and setup firewall\nufw_install\nufw allow \"$PORT\"/tcp\nufw allow \"$PORT\"/udp\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"steamuser","label":"Steam Username","example":"username"},{"name":"steampassword","label":"Steam Password, must have Steam Guard turned off for deployment","example":"YourSteamPassword"},{"name":"worldname","label":"World Name","default":"world1"},{"name":"password","label":"Server Password","default":""},{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"difficulty","label":"Difficulty Level","oneof":"Normal,Expert","default":"Normal"},{"name":"maxplayers","label":"Maximum Players","oneof":"1,10,20,50,100,200,255,","default":"20"},{"name":"port","label":"Port","default":"7777"},{"name":"seed","label":"Seed","default":"AwesomeSeed"}]},{"id":401704,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"TF2 One-Click","description":"TF2 One-Click","ordinal":108,"logo_url":"assets/TF2.svg","images":["linode/debian11"],"deployments_total":354,"deployments_active":2,"is_public":true,"mine":false,"created":"2019-03-08T21:10:23","updated":"2023-12-12T02:02:35","rev_note":"Remove SSH Pubkey UDF","script":"#!/bin/bash\n#\n#\n#\n#\n#\n#\n#\n#\n#\n\nsource \nsource \nsource \nsource \n\nGAMESERVER=\"tf2server\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### UDF to config\n\n#Autoteambalance\nif [[ \"$AUTOTEAMBALANCE\" = \"Enabled\" ]]; then\n AUTOTEAMBALANCE=1\nelif [[ \"$AUTOTEAMBALANCE\" = \"Disabled\" ]]; then\n AUTOTEAMBALANCE=0\nfi\n\nif [[ \"$SERVERNAME\" = \"\" ]]; then\n SERVERNAME=\"Linode TF2 Server\"\nfi\n\n\n# Server config\nset_hostname\napt_setup_update\n\n\n# Teamfortress2 specific dependencies\ndebconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No Configuration'\"\ndebconf-set-selections <<< \"postfix postfix/mailname string `hostname`\"\ndpkg --add-architecture i386\napt update\napt -q -y install mailutils postfix curl wget file \\\nbzip2 gzip unzip bsdmainutils python util-linux \\\nca-certificates binutils bc jq tmux lib32gcc-s1 libstdc++6 \\\nlibstdc++6:i386 libcurl4-gnutls-dev:i386 libtcmalloc-minimal4:i386\n\n# Install linuxGSM\nlinuxgsm_install\n\n# Install Teamfortress2\ngame_install\n\n# Setup crons and create systemd service file\nservice_config\n\ncp /home/tf2server/lgsm/config-lgsm/tf2server/_default.cfg /home/tf2server/lgsm/config-lgsm/tf2server/common.cfg\n\n# Custom game configs\n> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\ncat <> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\nlog on\nsv_logbans 1\nsv_logecho 1\nsv_logfile 1\nsv_log_onefile\nEND\n\necho \"hostname $SERVERNAME\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_autoteambalance $AUTOTEAMBALANCE\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_maxrounds $MAXROUNDS\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"mp_timelimit $TIMELIMIT\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"rcon_password \\\"$RCONPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"sv_password \\\"$SVPASSWORD\\\"\" >> /home/tf2server/serverfiles/tf/cfg/tf2server.cfg\necho \"\\\"$MOTD\\\"\" > /home/tf2server/serverfiles/tf/cfg/motd_default.txt\n\n\n# Start the service and setup firewall\nufw_install\nufw allow 27014:27050/tcp\nufw allow 3478:4380/udp\nufw allow 27000:27030/udp\nufw allow 26901\nufw enable\nfail2ban_install\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\nstackscript_cleanup","user_defined_fields":[{"name":"motd","label":"Message of the Day","default":"Powered by Linode!"},{"name":"servername","label":"Server Name","default":"Linode TF2 Server"},{"name":"svpassword","label":"Server Password","default":""},{"name":"gslt","label":"Game Server Login Token","example":"Steam gameserver token. Needed to list as public server","default":""},{"name":"autoteambalance","label":"Team Balance Enabled","oneof":"Enabled,Disabled","default":"Enabled"},{"name":"maxrounds","label":"Maximum Rounds","oneof":"1,3,5,10,15,20","default":"5"},{"name":"timelimit","label":"Round Time Limit","oneof":"10,15,35,45,60","default":"35"},{"name":"rconpassword","label":"RCON password"}]},{"id":1051711,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UniFi Network Application One-Click","description":"UniFi Network Application One-Click","ordinal":109,"logo_url":"assets/unifi.svg","images":["linode/debian10"],"deployments_total":493,"deployments_active":23,"is_public":true,"mine":false,"created":"2022-09-01T15:41:39","updated":"2023-10-18T12:38:34","rev_note":"","script":"#!/bin/bash\n#\n# Script to install UniFi Controller on Linode\n# \n## Linode/SSH Security Settings\n#\n#\n#\n#\n## Domain Settings\n#\n#\n#\n## Enable logging\n\nset -x\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Register default rDNS \nexport DEFAULT_RDNS=$(dnsdomainname -A | awk '{print $1}')\n\n#set absolute domain if any, otherwise use DEFAULT_RDNS\nif [[ $DOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DEFAULT_RDNS\"\nelif [[ $SUBDOMAIN = \"\" ]]; then\n readonly ABS_DOMAIN=\"$DOMAIN\"\nelse\n readonly ABS_DOMAIN=\"$SUBDOMAIN.$DOMAIN\"\nfi\n\ncreate_a_record $SUBDOMAIN $IP $DOMAIN\n\n## install depends \nexport DEBIAN_FRONTEND=noninteractive\napt-get install apt-transport-https ca-certificates wget dirmngr gpg software-properties-common multiarch-support libcommons-daemon-java jsvc openjdk-11-jre-headless -y \n\n# install mongodb req libssl1\nwget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\ndpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb\n\n# install mongodb-3.4\nwget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | apt-key add -\necho \"deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main\" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list\napt update && apt upgrade -y\napt install mongodb-org -y \n \n# install latest UniFi Controller \necho 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list\nsudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg \napt update && apt install unifi -yq \n\n## install nginx reverse-proxy \napt install nginx -y \n\n#configure nginx reverse proxy\nrm /etc/nginx/sites-enabled/default\ntouch /etc/nginx/sites-available/reverse-proxy.conf\ncat < /etc/nginx/sites-available/reverse-proxy.conf\nserver {\n listen 80;\n listen [::]:80;\n server_name ${ABS_DOMAIN};\n\n access_log /var/log/nginx/reverse-access.log;\n error_log /var/log/nginx/reverse-error.log;\n location /wss/ {\n proxy_pass https://localhost:8443;\n proxy_http_version 1.1;\n proxy_buffering off;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection \"Upgrade\";\n proxy_read_timeout 86400;\n }\n location / {\n proxy_pass https://localhost:8443;\n proxy_set_header Host \\$host;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forward-For \\$proxy_add_x_forwarded_for;\n }\n}\nEND\nln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf\n\n#enable and start nginx\nsystemctl enable nginx\nsystemctl restart nginx \n\n## UFW rules \nufw allow http\nufw allow https\nufw allow 53\nufw allow 3479/udp\nufw allow 5514/udp\nufw allow 8080/tcp\nufw allow 8443/tcp\nufw allow 8880/tcp\nufw allow 8843/tcp\nufw allow 27117/tcp\nufw allow 5656:5699/udp\nufw allow 10001/udp \nufw allow 1900/udp\nufw allow 123/udp\nufw enable \n\nsleep 60 \n\n## install SSL certs. required \napt install python3-certbot-nginx -y \ncertbot run --non-interactive --nginx --agree-tos --redirect -d ${ABS_DOMAIN} -m ${SOA_EMAIL_ADDRESS} -w /var/www/html/\n \n## add some details \ncat << EOF > /etc/motd\n###################\n\n The installation is now complete, and you can access the UniFi Network Controller GUI from https://${ABS_DOMAIN}\n We recommend using the GUI to complete your configurations of the service\n\n################### \nEOF\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode.","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":970523,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Uptime Kuma One-Click","description":"Uptime Kuma One-Click","ordinal":110,"logo_url":"assets/uptimekuma.svg","images":["linode/ubuntu22.04"],"deployments_total":2284,"deployments_active":398,"is_public":true,"mine":false,"created":"2022-02-07T16:06:08","updated":"2023-12-12T11:49:54","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n## KUMA Settings \n#\n\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-uptimekuma\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n # Uptimekuma vars\n \n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n \n\n # populate group_vars\n udf\n # run playbooks\n for playbook in site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"}]},{"id":925530,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"UTunnel VPN One-Click","description":"UTunnel VPN One-Click","ordinal":111,"logo_url":"assets/utunnel.svg","images":["linode/ubuntu20.04"],"deployments_total":1194,"deployments_active":17,"is_public":true,"mine":false,"created":"2021-10-25T18:55:37","updated":"2023-12-11T18:05:44","rev_note":"","script":"#!/bin/bash\n# Update the packages on the system from the distribution repositories.\t\napt-get update\nDEBIAN_FRONTEND=noninteractive apt-get upgrade -y\n\n# Install pre-requisites for docker-ce\n\nDEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common\n\n#Add Docker official GPG key\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\n#Add repository\n\nadd-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n\n# Download and install utnservice\n\nmkdir /utunnel\n\ncd /utunnel \n\nwget https://files.utunnel.io/production/deploy/install_bundle_20.tar\n\ntar -xf install_bundle_20.tar\n\nrm -f install_bundle_20.tar","user_defined_fields":[]},{"id":781317,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Valheim One-Click","description":"Valheim One-Click","ordinal":112,"logo_url":"assets/valheim.svg","images":["linode/debian10"],"deployments_total":2427,"deployments_active":52,"is_public":true,"mine":false,"created":"2021-03-01T13:26:36","updated":"2023-12-10T21:30:59","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables\n\n## Valheim Server Settings - Required\n#\n#\n\n## Linode/SSH Security Settings - Required\n#\n#\n\n## Linode/SSH Settings - Optional\n#\n#\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nset -o pipefail\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Linode Bash StackScript, API, and LinuxGSM Helper libraries\nsource \nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\n[ ! $USERNAME ] && USERNAME='lgsmuser'\nsource \n\n\n# Download and install dependencies\ndpkg --add-architecture i386\nsystem_update\nsystem_install_package curl wget file tar expect bzip2 gzip unzip \\\n bsdmainutils python util-linux ca-certificates \\\n binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 \\\n libc6-dev libsdl2-2.0-0:i386\n\n\n# Open the needed firewall ports\nufw allow 2456:2458/udp\nufw allow 4380/udp\nufw allow 27000:27030/udp\n\n# Install linuxGSM\nGAMESERVER='vhserver'\nv_linuxgsm_oneclick_install \"$GAMESERVER\" \"$USERNAME\"\n\n# Set the Valheim dedicated server's name and password\ncat /home/$USERNAME/lgsm/config-lgsm/vhserver/_default.cfg >> /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/servername=\\\"Valheim Server\\\"/servername=\\\"$SERVER_NAME\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\nsed -i \"s/serverpassword=\\\"\\\"/serverpassword=\\\"$SERVER_PASSWORD\\\"/\" /home/$USERNAME/lgsm/config-lgsm/vhserver/vhserver.cfg\n\n# Start and enable the Valheim services\nsystemctl start \"$GAMESERVER\".service\nsystemctl enable \"$GAMESERVER\".service\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"server_name","label":"The name of the Valheim dedicated server"},{"name":"server_password","label":"The password for the Valheim dedicated server","example":"S3cuReP@s$w0rd"},{"name":"username","label":"The username for the Linode's admin/SSH user (Please ensure that the username entered does not contain any uppercase characters)","example":"lgsmuser"},{"name":"password","label":"The password for the Linode's admin/SSH user","example":"S3cuReP@s$w0rd"},{"name":"pubkey","label":"The SSH Public Key used to securely access the Linode via SSH","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":954759,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VictoriaMetrics Single One-Click","description":"VictoriaMetrics Single","ordinal":113,"logo_url":"assets/victoriametricssingle.svg","images":["linode/ubuntu20.04"],"deployments_total":40,"deployments_active":4,"is_public":true,"mine":false,"created":"2022-01-06T18:53:56","updated":"2023-12-07T22:56:22","rev_note":"","script":"#!/bin/bash\n# \nsource \nsystem_set_hostname \"$HOSTNAME\"\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=noninteractive\napt update && apt upgrade -y && apt install -y curl wget net-tools traceroute jq\n# Generate files\nmkdir -p /etc/victoriametrics/single\nmkdir -p /var/lib/victoria-metrics-data\nmkdir -p /var/lib/cloud/scripts/per-instance\n# Create victoriametrics user\ngroupadd -r victoriametrics\nuseradd -g victoriametrics -d /var/lib/victoria-metrics-data -s /sbin/nologin --system victoriametrics\nchown -R victoriametrics:victoriametrics /var/lib/victoria-metrics-data\n# Install VictoriaMetrics Single\nVM_VERSION=`curl -sg \"https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/tags\" | jq -r '.[0].name'`\nwget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/${VM_VERSION}/victoria-metrics-linux-amd64-${VM_VERSION}.tar.gz -O /tmp/victoria-metrics.tar.gz\ntar xvf /tmp/victoria-metrics.tar.gz -C /usr/bin\nchmod +x /usr/bin/victoria-metrics-prod\nchown root:root /usr/bin/victoria-metrics-prod\ntouch /etc/victoriametrics/single/scrape.yml\nchown root:root /etc/victoriametrics/single/scrape.yml\ncat </etc/systemd/system/vmsingle.service\n[Unit]\nDescription=VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database.\n# https://docs.victoriametrics.com\nAfter=network.target\n[Service]\nType=simple\nUser=victoriametrics\nGroup=victoriametrics\nWorkingDirectory=/var/lib/victoria-metrics-data\nStartLimitBurst=5\nStartLimitInterval=0\nRestart=on-failure\nRestartSec=5\nEnvironmentFile=-/etc/victoriametrics/single/victoriametrics.conf\nExecStart=/usr/bin/victoria-metrics-prod \\$ARGS\nExecStop=/bin/kill -s SIGTERM \\$MAINPID\nExecReload=/bin/kill -HUP \\$MAINPID\n# See docs https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#tuning\nProtectSystem=full\nLimitNOFILE=1048576\nLimitNPROC=1048576\nLimitCORE=infinity\nStandardOutput=syslog\nStandardError=syslog\nSyslogIdentifier=vmsingle\n[Install]\nWantedBy=multi-user.target\nEND\ncat </etc/victoriametrics/single/victoriametrics.conf\n# See https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#list-of-command-line-flags to get more information about supported command-line flags\n# \n# If you use IPv6 pleas add \"-enableTCP6\" to args line\nARGS=\"-promscrape.config=/etc/victoriametrics/single/scrape.yml -storageDataPath=/var/lib/victoria-metrics-data -retentionPeriod=12 -httpListenAddr=:8428 -graphiteListenAddr=:2003 -opentsdbListenAddr=:4242 -influxListenAddr=:8089 -enableTCP6\"\nEND\ncat < /etc/profile.d/victoriametrics_welcome.sh\n#!/bin/sh\n#\nmyip=$(hostname -I | awk '{print$1}')\n******************************************************************************** \nWelcome to VictoriaMetrics Single.\nTo keep this server secure, the UFW firewall is enabled.\nAll ports are BLOCKED except 22 (SSH), 80 (HTTP), and 443 (HTTPS), 8428 (VictoriaMetrics HTTP), 8089 (VictoriaMetrics Influx),\n4242 (VictoriaMetrics OpenTSDB), 2003 (VictoriaMetrics Graphite)\nIn a web browser, you can view:\n * The VictoriaMetrics Quickstart guide: https://kutt.it/1click-quickstart\nOn the server:\n * The default VictoriaMetrics root is located at /var/lib/victoria-metrics-data\n * VictoriaMetrics is running on ports: 8428, 8089, 4242, 2003 and they are bound to the local interface.\n********************************************************************************\n # This image includes version v1.74.0 of VictoriaMetrics. \n # See Release notes https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.70.0\n # Welcome to VictoriaMetrics droplet!\n # Website: https://victoriametrics.com\n # Documentation: https://docs.victoriametrics.com\n # VictoriaMetrics Github : https://github.com/VictoriaMetrics/VictoriaMetrics\n # VictoriaMetrics Slack Community: https://slack.victoriametrics.com\n # VictoriaMetrics Telegram Community: https://t.me/VictoriaMetrics_en\n # VictoriaMetrics config: /etc/victoriametrics/single/victoriametrics.conf\n # VictoriaMetrics scrape config: /etc/victoriametrics/single/scrape.yml\n # VictoriaMetrics UI accessable on: http://your_droplet_public_ipv4:8428/vmui/\nEND\n# Enable UFW and add some rules to it\nsed -e 's|DEFAULT_FORWARD_POLICY=.*|DEFAULT_FORWARD_POLICY=\"ACCEPT\"|g' \\\n -i /etc/default/ufw\nufw allow ssh comment \"SSH port\"\nufw allow http comment \"HTTP port\"\nufw allow https comment \"HTTPS port\"\nufw allow 8428 comment \"VictoriaMetrics Single HTTP port\"\nufw allow 8089/tcp comment \"TCP Influx Listen port for VictoriaMetrics\"\nufw allow 8089/udp comment \"UDP Influx Listen port for VictoriaMetrics\"\nufw allow 2003/tcp comment \"TCP Graphite Listen port for VictoriaMetrics\"\nufw allow 2003/udp comment \"UDP Graphite Listen port for VictoriaMetrics\"\nufw allow 4242 comment \"OpenTSDB Listen port for VictoriaMetrics\"\nufw --force enable\n# Cleaning up\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n# Start VictoriaMetrics\nsystemctl enable vmsingle.service\nsystemctl start vmsingle.service\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]},{"id":662117,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Virtualmin One-Click","description":"Virtualmin One-Click","ordinal":114,"logo_url":"assets/virtualmin.svg","images":["linode/debian10","linode/ubuntu22.04"],"deployments_total":2204,"deployments_active":140,"is_public":true,"mine":false,"created":"2020-08-12T15:46:13","updated":"2023-12-12T15:29:25","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nIFS=$'\\n\\t'\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n# Import the OCA Helper Functions\nsource \n\nfunction install_virtualmin {\n if [ $(cat /etc/os-release | grep -i 'ubuntu' )]; then\n if [ ! $(cat /etc/os-release | grep -i 'lts') ]; then\n printf \"Virtualmin only works with LTS versions of Ubuntu\\n\"\n exit 1;\n fi\n else\n wget http://software.virtualmin.com/gpl/scripts/virtualmin-install.sh -O /root/virtualmin-install.sh && {\n chmod +x /root/virtualmin-install.sh\n /bin/sh /root/virtualmin-install.sh -f -v\n }\n fi\n}\n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n## Configure firewall and install Fail2Ban\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\nfail2ban_install\n\n# Install Webmin and Virtualmin\nsource \ninstall_virtualmin\n\n# Disable SSL so that everything works\nsed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n# Restart Webmin\nsystemctl restart webmin\n\n# Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated intrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688903,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"VS Code Server One-Click","description":"Visual Studio Code One-Click","ordinal":115,"logo_url":"assets/vscodeserver.svg","images":["linode/debian10"],"deployments_total":5267,"deployments_active":123,"is_public":true,"mine":false,"created":"2020-11-17T21:10:25","updated":"2023-12-12T15:29:28","rev_note":"","script":"#!/usr/bin/env bash\n\n## VS Code Server OCA Script\n\n### UDF Variables\n\n## VS Code Web Password\n#\n#\n\n## User and SSH Security\n#\n#\n#\n#\n\n## Domain\n#\n#\n#\n#\n\n## Let's Encrypt SSL\n#\n\n\n### Logging and other debugging helpers\n\n# Enable logging for the StackScript\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Source the Bash StackScript Library and the API functions for DNS\nsource \nsource \n\n# Source and run the New Linode Setup script for DNS/SSH configuration\nsource \n\n\nfunction get_code_server {\n local -r username=\"$1\" vs_code_ver=\"$2\"\n\n cd \"/home/$username\"\n\n wget \"https://github.com/cdr/code-server/releases/download/v${vs_code_ver}/code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n tar -xf \"code-server-${vs_code_ver}-linux-amd64.tar.gz\"\n mv code-server-*/ bin/\n\n chown -R \"${username}:${username}\" bin/\n chmod +x bin/code-server\n mkdir data/\n chown -R \"${username}:${username}\" data/\n\n cd /root/\n}\n\nfunction enable_code_service {\n local -r vs_code_password=\"$1\" username=\"$2\"\n\n # Set the password in /etc/systemd/system/code-server.service\n cat << EOF > /etc/systemd/system/code-server.service\n[Unit]\nDescription=code-server\nAfter=nginx.service\n[Service]\nUser=$username\nWorkingDirectory=/home/$username\nEnvironment=PASSWORD=$vs_code_password\nExecStart=/home/${username}/bin/code-server --host 127.0.0.1 --user-data-dir /home/${username}/data --auth password\nRestart=always\n[Install]\nWantedBy=multi-user.target\nEOF\n\n # Enable code-server as a service\n systemctl daemon-reload\n systemctl start code-server\n systemctl enable code-server\n}\n\nfunction certbot_standalone {\n local -r email_address=\"$1\" ssl_domain=\"$2\"\n\n # Get an SSL certificate from CertBot\n system_install_package \"certbot\"\n certbot -n certonly --standalone --agree-tos -m \"$email_address\" -d \"$ssl_domain\"\n}\n\nfunction nginx_reverse_proxy {\n local -r ssl_domain=\"$1\"\n\n ## Setup a reverse proxy with Nginx\n system_install_package \"nginx\"\n\n cat << EOF > /etc/nginx/sites-available/code-server\nserver {\n listen 80;\n server_name $ssl_domain;\n # enforce https\n return 301 https://\\$server_name:443\\$request_uri;\n}\nserver {\n listen 443 ssl http2;\n server_name $ssl_domain;\n ssl_certificate /etc/letsencrypt/live/${ssl_domain}/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/${ssl_domain}/privkey.pem;\n location / {\n proxy_pass http://127.0.0.1:8080/;\n proxy_set_header Host \\$host;\n proxy_set_header Upgrade \\$http_upgrade;\n proxy_set_header Connection upgrade;\n proxy_set_header Accept-Encoding gzip;\n }\n}\nEOF\n\n ln -s /etc/nginx/sites-available/code-server /etc/nginx/sites-enabled\n nginx -t\n systemctl restart nginx\n}\n\n### Install UFW and open the needed firewall ports\nufw allow 80,443/tcp\n\n### Install and configure VS Code Server\nget_code_server \"$USERNAME\" \"$VS_CODE_VER\"\nenable_code_service \"$VS_CODE_PASSWORD\" \"$USERNAME\"\ncheck_dns_propagation \"$FQDN\" \"$IP\"\ncertbot_standalone \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\nnginx_reverse_proxy \"$FQDN\"\n\n### Clean up\nstackscript_cleanup","user_defined_fields":[{"name":"vs_code_password","label":"The password to login to the VS Code Web UI"},{"name":"vs_code_ver","label":"The version of VS Code Server you'd like installed","default":"3.10.2"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"disable_root","label":"Would you like to disable root login over SSH? (Recommended)","oneof":"Yes,No","default":"Yes"},{"name":"token_password","label":"Your Linode API token - This is required for creating DNS records","default":""},{"name":"domain","label":"The domain for the Linode's DNS record (Requires API token)","default":""},{"name":"subdomain","label":"The subdomain for the Linode's DNS record (Requires API token and domain)","default":""},{"name":"soa_email_address","label":"Your email address for your VirtualHost configuration, DNS records (If Required), and SSL certificates (If Required)."},{"name":"ssl","label":"Would you like to use a free Let's Encrypt SSL certificate? (Uses the Linode's default rDNS if no domain is specified above","oneof":"Yes,No","default":"No"}]},{"id":923037,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WarpSpeed One-Click","description":"WarpSpeed One-Click","ordinal":116,"logo_url":"assets/warpspeed.svg","images":["linode/ubuntu20.04"],"deployments_total":880,"deployments_active":17,"is_public":true,"mine":false,"created":"2021-10-18T01:12:49","updated":"2023-12-06T00:07:58","rev_note":"","script":"#!/bin/bash\nset -o errexit\nset -o nounset\nset -o pipefail\nset -o xtrace\n\n# \n# \n# \n# \n\n## REQUIRED IN EVERY MARKETPLACE SUBMISSION\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nexport DEBIAN_FRONTEND=\"noninteractive\"\napt-get \\\n -o 'Acquire::ForceIPv4=true' \\\n --yes \\\n update\n\napt-get \\\n -o 'DPkg::options::=--force-confdef' \\\n -o 'DPkg::options::=--force-confold' \\\n --yes \\\n install grub-pc\n\napt-get \\\n -o Acquire::ForceIPv4=true \\\n --yes \\\n update\n# # END OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Handle the arguments.\nWIRESPEED_ADMIN_EMAIL=\"$(echo -e \"${WIRESPEED_ADMIN_EMAIL}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"$(echo -e \"${WIRESPEED_HTTP_HOST}\" | tr --delete '[:space:]')\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//\\//}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//https:/}\"\nWIRESPEED_HTTP_HOST=\"${WIRESPEED_HTTP_HOST//http:/}\"\n\nif [[ -z \"${WIRESPEED_ADMIN_EMAIL}\" ]]; then\n echo \"Missing required parameter: admin email\"\n exit 101\nfi\n\nif [[ -z \"${WIRESPEED_HTTP_HOST}\" ]]; then\n echo \"Missing required parameter: http host\"\n exit 102\nfi\n\nif [[ -z \"${WIRESPEED_DATA_DIR}\" ]]; then\n WIRESPEED_DATA_DIR=\"/wirespeed\"\nfi\n\n# Set hostname\nIP=\"$(hostname --all-ip-addresses | awk '{ print $1 }')\"\nhostnamectl set-hostname \"${WIRESPEED_HTTP_HOST}\"\necho \"${IP} ${WIRESPEED_HTTP_HOST}\" >>/etc/hosts\n\nwget https://bunker.services/wirespeed-installer.sh\nchmod +x wirespeed-installer.sh\n./wirespeed-installer.sh \\\n \"${WIRESPEED_HTTP_HOST}\" \\\n \"${WIRESPEED_DATA_DIR}\" \\\n \"${WIRESPEED_ADMIN_EMAIL}\" \\\n \"${WIRESPEED_ADMIN_PASSWORD}\" \\\n --non-interactive\n\n# Force IPv4 and noninteractive upgrade after script runs to prevent breaking nf_conntrack for UFW\necho 'Acquire::ForceIPv4 \"true\";' >/etc/apt/apt.conf.d/99force-ipv4\napt-get upgrade --yes\n\nfor file in /root/StackScript /root/ssinclude* /root/wirespeed-installer.sh; do\n rm \"${file}\"\ndone\n\necho 'WireSpeed Installation complete!'","user_defined_fields":[{"name":"wirespeed_admin_email","label":"Admin Email","default":"","example":"it@example.com"},{"name":"wirespeed_admin_password","label":"Admin Password","default":"","example":"Password"},{"name":"wirespeed_http_host","label":"DNS Name","default":"","example":"vpn.example.com"},{"name":"wirespeed_data_dir","label":"Data Directory","default":"/wirespeed","example":"/wirespeed"}]},{"id":913276,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Wazuh One-Click","description":"Wazuh One-Click","ordinal":117,"logo_url":"assets/wazuh.svg","images":["linode/ubuntu22.04"],"deployments_total":5412,"deployments_active":830,"is_public":true,"mine":false,"created":"2021-09-30T18:27:36","updated":"2023-12-12T15:54:43","rev_note":"","script":"#!/bin/bash\n\n# #\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings \n#\n#\n#\n\n## Enable logging\n# set -o pipefail\nset -x\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n## Import the Bash StackScript Library\nsource \n## Import the DNS/API Functions Library\nsource \n## Import the OCA Helper Functions\nsource \n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\n# UFW https://documentation.wazuh.com/current/getting-started/architecture.html\nufw allow 1514\nufw allow 1515\nufw allow 1516\nufw allow 514\nufw allow 55000\nufw allow 443\nufw allow 80\nufw allow 9200\nufw allow 9300\n\n# NGINX\napt install git nginx certbot python3-certbot-nginx -y\n\nmkdir -p /var/www/certs/.well-known\nchown -R www-data:www-data /var/www/certs/\ncat < /etc/nginx/sites-available/$FQDN\nserver {\n listen 80;\n listen [::]:80;\n server_name $FQDN;\n root /var/www/certs;\n location / {\n try_files \\$uri \\$uri/ =404;\n }\n# allow .well-known\n location ^~ /.well-known {\n allow all;\n auth_basic off;\n alias /var/www/certs/.well-known;\n }\n}\nEOF\nln -s /etc/nginx/sites-available/$FQDN /etc/nginx/sites-enabled/$FQDN\nunlink /etc/nginx/sites-enabled/default\nsystemctl restart nginx\n\n# SSL Certbot\n#certbot certonly --agree-tos --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n\nfunction get_cert {\n if [ \"$1\" == \"dry_run\" ]; then\n certbot certonly --dry-run --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n elif [ \"$1\" == \"run\" ]; then\n certbot certonly --agree-tos --non-interactive --no-eff-email --webroot --webroot-path=/var/www/certs -d $FQDN -m $SOA_EMAIL_ADDRESS\n return $?\n fi\n}\n\nfunction propagate {\n while [[ $count -le $retries ]]; do\n echo \"[Info] Let's Encrypt validation failed. Retrying...\"\n sleep 5\n count=$(( $count + 1 ))\n get_cert dry_run\n\n if [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful..\"\n get_cert run\n return 0\n \n fi\n\n # no more retries left. Exit\n if [[ $count -eq $retries ]]; then\n echo \"[Error] Unable to get Let's Encrypt certificate for $FQDN\"\n return 1\n fi\n done\n}\n\ncount=1\nretries=24\nget_cert dry_run\nif [ $? -eq 0 ]; then\n echo \"[Info] Dry run successful. Getting certificate\"\n get_cert run\nelse\n propagate\nfi\n\n# reorder Wazuh script\ncurl -sO https://packages.wazuh.com/4.4/wazuh-install.sh && sudo bash ./wazuh-install.sh -a \ntar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt >> .deployment-secrets.txt\n\n# Set Variables\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\n\n# Place certificates in /etc/wazuh-dashboard/certs/\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\n\n# Restart Kibana\nservice wazuh-dashboard restart\n\n# Create Cert renewal cron script\ncat </root/certbot-renewal.sh\n#!/bin/bash\n#\n# Script to handle Certbot renewal & Kibana\n# Debug\n# set -xo pipefail\nexport WAZUH_FULL=/etc/wazuh-dashboard/certs/wazuh-dashboard.pem\nexport WAZUH_PRIVKEY=/etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem\nexport FULLCHAIN=/etc/letsencrypt/live/$FQDN/fullchain.pem\nexport PRIVKEY=/etc/letsencrypt/live/$FQDN/privkey.pem\ncertbot renew\ncat $FULLCHAIN > $WAZUH_FULL\ncat $PRIVKEY > $WAZUH_PRIVKEY\nservice wazuh-dashboard restart\nEND\n\nchmod +x /root/certbot-renewal.sh\n\n# Setup Cron\ncrontab -l > cron\necho \"* 1 * * 1 bash /root/certbot-renewal.sh\" >> cron\ncrontab cron\nrm cron\n\n# Cleanup\nstackscript_cleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your WordPress server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":662116,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webmin One-Click","description":"Webmin One-Click","ordinal":118,"logo_url":"assets/webmin.svg","images":["linode/debian10"],"deployments_total":1190,"deployments_active":34,"is_public":true,"mine":false,"created":"2020-08-12T15:41:21","updated":"2023-12-11T22:40:34","rev_note":"","script":"#!/usr/bin/env bash\n\n### UDF Variables for the StackScript\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n#\n#\n\n#Check if the script is being sourced by another script\n[[ $_ != $0 ]] && readonly SOURCED=1\n\n## Enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n## Import the Bash StackScript and API/DNS Libraries\nsource \nsource \n\n## Import the OCA Helper Functions\nsource \n\n## Run initial configuration tasks (DNS/SSH stuff, etc...)\nsource \n\nfunction webmin_install {\n # Install webmin\n echo \"deb http://download.webmin.com/download/repository sarge contrib\" >> /etc/apt/sources.list\n wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add\n system_update\n system_install_package \"webmin\"\n}\n\nfunction webmin_configure {\n local -r email_address=\"$1\"\n local -r fqdn=\"$2\"\n\n # Configure the Virtual Host\n cat < /etc/apache2/sites-available/\"${fqdn}.conf\"\n\n ServerAdmin ${email_address}\n ServerName ${fqdn}\n ProxyPass / http://localhost:10000/\n ProxyPassReverse / http://localhost:10000/\n\nEOF\n # Disable SSL in Webmin so Apache can handle it instead\n sed -i 's/^ssl=1/ssl=0/g' /etc/webmin/miniserv.conf\n\n # Add FQDN to the list of allowed domains\n echo \"referers=${fqdn}\" >> /etc/webmin/config\n\n # Restart Webmin\n systemctl restart webmin\n\n # Enable proxy_http module\n a2enmod proxy_http\n systemctl restart apache2\n\n # Enable the Virtual Host\n a2ensite \"${fqdn}\"\n systemctl reload apache2\n}\n\n\n# Open the needed firewall ports\nufw_install\nufw allow http\nufw allow https\nufw allow 10000\n\n# Make sure unzip is installed, or else the webmin install will fail\n[ ! -x /usr/bin/unzip ] && system_install_package \"unzip\"\n\n# \"${package_list[@]}\" contains a list of packages to be installed on the system\npackage_list=(\n \"gnupg1\" \\\n \"python\" \\\n \"apt-show-versions\" \\\n \"libapt-pkg-perl\" \\\n \"libauthen-pam-perl\" \\\n \"libio-pty-perl\" \\\n \"libnet-ssleay-perl\"\n)\n\n# Install all of the packages specified in ${package_list[@]}\nsystem_install_package \"${package_list[@]}\"\n\n# Intall Webmin\nwebmin_install\napache_install\nwebmin_configure \"$SOA_EMAIL_ADDRESS\" \"$FQDN\"\n\n# Install SSL Certificate - NOT READY YET\n#certbot_ssl \"$FQDN\" \"$SOA_EMAIL_ADDRESS\" 'apache'\n\n## Cleanup before exiting\nif [ \"$SOURCED\" -ne 1 ]; then\n stackscript_cleanup\nfi","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"pwless_sudo","label":"Enable passwordless sudo access for the limited user?","oneof":"Yes,No","default":"No"},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"auto_updates","label":"Configure automatic security updates?","oneof":"Yes,No","default":"No"},{"name":"fail2ban","label":"Use fail2ban to prevent automated instrusion attempts?","oneof":"Yes,No","default":"No"},{"name":"token_password","label":"Your Linode API token. This is needed to create your DNS records","default":""},{"name":"subdomain","label":"The subdomain for your server","default":""},{"name":"domain","label":"Your domain","default":""},{"name":"soa_email_address","label":"Admin Email for the server","default":""},{"name":"mx","label":"Do you need an MX record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"},{"name":"spf","label":"Do you need an SPF record for this domain? (Yes if sending mail from this Linode)","oneof":"Yes,No","default":"No"}]},{"id":688902,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Webuzo One-Click","description":"Webuzo One-Click","ordinal":119,"logo_url":"assets/webuzo.svg","images":["linode/ubuntu20.04"],"deployments_total":907,"deployments_active":21,"is_public":true,"mine":false,"created":"2020-11-17T21:04:21","updated":"2023-12-10T23:22:04","rev_note":"","script":"#!/usr/bin/env bash\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n# Source the Bash StackScript Library & Helpers\nsource \nsource \nsource \nsource \n\n# Logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n# Set hostname, configure apt and perform update/upgrade\napt_setup_update\n\n# Install Prereq's & Services\napt install -y wget\nwget -N http://files.webuzo.com/install.sh\nchmod +x install.sh\n./install.sh\nsleep 2\nsystemctl start webuzo.service\n\n# firewall\nufw allow 25\nufw allow 53\nufw allow 587\nufw allow 2002\nufw allow 2003\nufw allow 2004\nufw allow 2005\n\n# Cleanup \nstackscript_cleanup\nreboot","user_defined_fields":[{"name":"username","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","default":""},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"}]},{"id":401706,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WireGuard® One-Click","description":"WireGuard One-Click","ordinal":120,"logo_url":"assets/Wireguard.svg","images":["linode/ubuntu22.04"],"deployments_total":9394,"deployments_active":292,"is_public":true,"mine":false,"created":"2019-03-08T21:11:36","updated":"2023-12-12T13:28:24","rev_note":"","script":"#!/bin/bash\n\n# \n# \n# \n# \n# \n\nsource \n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\nset -o pipefail\n\n### Set hostname, Apt configuration and update/upgrade\n\nset_hostname\napt_setup_update\n\napt install wireguard wireguard-tools linux-headers-$(uname -r) -y\n\nif [[ \"$PORT\" != \"51820\" ]]; then\n PORT=\"$PORT\"\nfi\n\n# Wireguard\n\nwg genkey | tee ~/wg-private.key | wg pubkey > ~/wg-public.key\n\nPRIVATEKEY=`cat ~/wg-private.key`\n\ncat </etc/wireguard/wg0.conf\n[Interface]\nPrivateKey = $PRIVATEKEY\nAddress = $PRIVATEIP\nListenPort = $PORT\nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -A FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; \\\niptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; \\\nip6tables -D FORWARD -i wg0 -j ACCEPT; \\\nip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\nSaveConfig = true\n[Peer]\nPublicKey = $PEERPUBKEY\nAllowedIPs = $PRIVATEIP_CLIENT\nEndpoint = $ENDPOINT:$PORT\nEND\n\n### Enable Port Forwarding\nsed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf\nsysctl -p /etc/sysctl.conf\nsysctl --system\n\n### Services\n\n# wg-quick up wg0. #### Removed to let systemctl manage the service\nsystemctl enable wg-quick@wg0\nsystemctl start wg-quick@wg0\nwg show\nufw_install\nufw allow \"$PORT\"/udp\nufw enable\n\nsystemctl restart wg-quick@wg0\n\nstackscript_cleanup","user_defined_fields":[{"name":"port","label":"Port","example":"51820","default":"51820"},{"name":"privateip","label":"Tunnel IP","example":"10.0.0.1/24, 172.16.0.1/24, 192.168.1.1/24, etc","default":"10.0.1.1/24"},{"name":"peerpubkey","label":"WireGuard Public Key (Client)","default":""},{"name":"privateip_client","label":"Tunnel IP (Client)","example":"10.0.0.2/24, 172.16.0.2/24, 192.168.1.2/24 etc","default":"10.0.1.2/24"},{"name":"endpoint","label":"Endpoint IP (Client)","default":""}]},{"id":401708,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"WooCommerce One-Click","description":"WooCommerce One-Click","ordinal":121,"logo_url":"assets/WooCommerce.svg","images":["linode/ubuntu22.04"],"deployments_total":4330,"deployments_active":213,"is_public":true,"mine":false,"created":"2019-03-08T21:12:57","updated":"2023-12-12T09:55:21","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n## Wordpress Settings\n#\n#\n\n#\n#\n#\n#\n\n## Linode/SSH Security Settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\"\nexport MARKETPLACE_APP=\"apps/linode-marketplace-woocommerce\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n local web_stack=$(echo ${WEBSERVER_STACK} | tr [:upper:] [:lower:])\n sed 's/ //g' < ${group_vars}\n\n # deployment vars\n soa_email_address: ${SOA_EMAIL_ADDRESS}\n webserver_stack: ${web_stack}\n site_title: ${SITE_TITLE}\n wp_admin_user: ${WP_ADMIN_USER}\n wp_db_user: ${WP_DB_USER}\n wp_db_name: ${WP_DB_NAME}\nEOF\n\n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n #else echo \"No domain entered\";\n else echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n}\n\nfunction installation_complete {\n # dumping credentials\n egrep \"(*^wp_|*mysql)\" ${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars | awk {'print $1 $2'} > /root/.linode_credentials.txt\n cat << EOF\n#########################\n# INSTALLATION COMPLETE #\n############################################\n# The Mysql root password can be found at: #\n# - /root/.linode_credentials.txt #\n# #\n# * Hugs are worth more than handshakes * #\n############################################\nEOF\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"webserver_stack","label":"The stack you are looking to deploy Wordpress on","oneof":"LAMP,LEMP"},{"name":"site_title","label":"Website title","example":"My Blog"},{"name":"wp_admin_user","label":"Admin username","example":"admin"},{"name":"wp_db_user","label":"Wordpress database user","example":"wordpress"},{"name":"wp_db_name","label":"Wordpress database name","example":"wordpress"},{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your Linode's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record. `www` will be entered if no subdomain is supplied (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""}]},{"id":741207,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Yacht One-Click","description":"Yacht One-Click","ordinal":122,"logo_url":"assets/yacht.svg","images":["linode/debian11","linode/ubuntu22.04"],"deployments_total":972,"deployments_active":16,"is_public":true,"mine":false,"created":"2021-01-26T21:52:26","updated":"2023-12-12T15:36:16","rev_note":"","script":"#!/bin/bash\nset -e\ntrap \"cleanup $? $LINENO\" EXIT\n\n##Linode/SSH security settings\n#\n#\n#\n#\n\n## Domain Settings\n#\n#\n#\n#\n\n## Yacht Settings \n#\n#\n#\n\n# git repo\nexport GIT_REPO=\"https://github.com/akamai-compute-marketplace/marketplace-apps.git\"\nexport WORK_DIR=\"/tmp/marketplace-apps\" \nexport MARKETPLACE_APP=\"apps/linode-marketplace-yacht\"\n\n# enable logging\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\nfunction cleanup {\n if [ -d \"${WORK_DIR}\" ]; then\n rm -rf ${WORK_DIR}\n fi\n\n}\n\nfunction udf {\n local group_vars=\"${WORK_DIR}/${MARKETPLACE_APP}/group_vars/linode/vars\"\n echo \"webserver_stack: lemp\" >> ${group_vars};\n \n if [[ -n ${USER_NAME} ]]; then\n echo \"username: ${USER_NAME}\" >> ${group_vars};\n else echo \"No username entered\";\n fi\n\n if [ \"$DISABLE_ROOT\" = \"Yes\" ]; then\n echo \"disable_root: yes\" >> ${group_vars};\n else echo \"Leaving root login enabled\";\n fi\n\n if [[ -n ${PASSWORD} ]]; then\n echo \"password: ${PASSWORD}\" >> ${group_vars};\n else echo \"No password entered\";\n fi\n\n if [[ -n ${PUBKEY} ]]; then\n echo \"pubkey: ${PUBKEY}\" >> ${group_vars};\n else echo \"No pubkey entered\";\n fi\n\n # yacht vars\n \n if [[ -n ${YEMAIL} ]]; then\n echo \"yemail: ${YEMAIL}\" >> ${group_vars};\n fi\n\n if [[ -n ${COMPOSE_SUPPORT} ]]; then\n echo \"compose_support: ${COMPOSE_SUPPORT}\" >> ${group_vars};\n fi\n\n if [[ -n ${YTHEME} ]]; then\n echo \"yacht_theme: ${YTHEME}\" >> ${group_vars};\n fi\n\n if [[ -n ${SOA_EMAIL_ADDRESS} ]]; then\n echo \"soa_email_address: ${SOA_EMAIL_ADDRESS}\" >> ${group_vars};\n fi\n\n if [[ -n ${DOMAIN} ]]; then\n echo \"domain: ${DOMAIN}\" >> ${group_vars};\n else\n echo \"default_dns: $(hostname -I | awk '{print $1}'| tr '.' '-' | awk {'print $1 \".ip.linodeusercontent.com\"'})\" >> ${group_vars};\n fi\n\n if [[ -n ${SUBDOMAIN} ]]; then\n echo \"subdomain: ${SUBDOMAIN}\" >> ${group_vars};\n else echo \"subdomain: www\" >> ${group_vars};\n fi\n\n if [[ -n ${TOKEN_PASSWORD} ]]; then\n echo \"token_password: ${TOKEN_PASSWORD}\" >> ${group_vars};\n else echo \"No API token entered\";\n fi\n}\n\nfunction run {\n # install dependancies\n apt-get update\n apt-get install -y git python3 python3-pip\n\n # clone repo and set up ansible environment\n git -C /tmp clone ${GIT_REPO}\n # for a single testing branch\n # git -C /tmp clone -b ${BRANCH} ${GIT_REPO}\n\n # venv\n cd ${WORK_DIR}/${MARKETPLACE_APP}\n pip3 install virtualenv\n python3 -m virtualenv env\n source env/bin/activate\n pip install pip --upgrade\n pip install -r requirements.txt\n ansible-galaxy install -r collections.yml\n\n # populate group_vars\n udf\n # run playbooks\n for playbook in provision.yml site.yml; do ansible-playbook -v $playbook; done\n \n}\n\nfunction installation_complete {\n echo \"Installation Complete\"\n}\n# main\nrun && installation_complete\ncleanup","user_defined_fields":[{"name":"user_name","label":"The limited sudo user to be created for the Linode","default":""},{"name":"password","label":"The password for the limited sudo user","example":"an0th3r_s3cure_p4ssw0rd","default":""},{"name":"disable_root","label":"Disable root access over SSH?","oneof":"Yes,No","default":"No"},{"name":"pubkey","label":"The SSH Public Key that will be used to access the Linode (Recommended)","default":""},{"name":"token_password","label":"Your Linode API token. This is needed to create your server's DNS records","default":""},{"name":"subdomain","label":"Subdomain","example":"The subdomain for the DNS record: www (Requires Domain)","default":""},{"name":"domain","label":"Domain","example":"The domain for the DNS record: example.com (Requires API token)","default":""},{"name":"soa_email_address","label":"Email address (for the Let's Encrypt SSL certificate)","example":"user@domain.tld"},{"name":"yemail","label":"Yacht Email","example":"admin@yacht.local","default":"admin@yacht.local"},{"name":"compose_support","label":"Yacht Compose Support","example":"Yes","default":"Yes","oneof":"Yes,No"},{"name":"ytheme","label":"Yacht Theme","example":"Default","default":"Default","oneof":"Default,RED,OMV"}]},{"id":741208,"username":"linode","user_gravatar_id":"9d4d301385af69ceb7ad658aad09c142","label":"Zabbix One-Click","description":"Zabbix One-Click","ordinal":123,"logo_url":"assets/zabbix.svg","images":["linode/centos-stream8"],"deployments_total":1793,"deployments_active":81,"is_public":true,"mine":false,"created":"2021-01-26T21:56:54","updated":"2023-12-12T12:47:10","rev_note":"","script":"#!/bin/bash\n\n# \n\nsource \n\nsystem_set_hostname \"$HOSTNAME\"\n\nexec > >(tee /dev/ttyS0 /var/log/stackscript.log) 2>&1\n\n# Generate files\nmkdir -p /etc/my.cnf.d/\nmkdir -p /etc/nginx/conf.d/\nmkdir -p /etc/php-fpm.d/\nmkdir -p /etc/php.d/\n# mkdir -p /etc/profile.d/\nmkdir -p /etc/motd.d/\nmkdir -p /etc/zabbix/web/\nmkdir -p /var/lib/cloud/scripts/per-instance\n\ncat </etc/my.cnf.d/zabbix.cnf\n[mysqld]\nuser = mysql\nlocal_infile = 0\n\ndatadir = /var/lib/mysql/\n\ndefault-storage-engine = InnoDB\nskip-name-resolve\nkey_buffer_size = 32M\nmax_allowed_packet = 128M\ntable_open_cache = 1024\ntable_definition_cache = 1024\nmax_connections = 2000\njoin_buffer_size = 1M\nsort_buffer_size = 2M\nread_buffer_size = 256K\nread_rnd_buffer_size = 256K\nmyisam_sort_buffer_size = 1M\nthread_cache_size = 512\nopen_files_limit = 10000\nwait_timeout = 86400\n\noptimizer_switch=index_condition_pushdown=off\n\ntmp_table_size = 32M\nmax_heap_table_size = 32M\n\nbinlog_format=mixed\nbinlog_cache_size = 32M\nmax_binlog_size = 256M\nbinlog_expire_logs_seconds = 259200\n\n# innodb_page_size = 32K\ninnodb_buffer_pool_size = 512M\ninnodb_log_file_size = 256M\ninnodb_log_buffer_size = 64M\ninnodb_file_per_table = 1\ninnodb_flush_method = O_DIRECT\ninnodb_buffer_pool_instances = 4\ninnodb_write_io_threads = 4\ninnodb_read_io_threads = 4\ninnodb_adaptive_flushing = 1\ninnodb_lock_wait_timeout = 50\n\ninnodb_flush_log_at_trx_commit = 1\n\ninnodb_io_capacity = 300\ninnodb_io_capacity_max = 400\ninnodb_flush_neighbors = 0\n\ninnodb_doublewrite = 1\ninnodb_thread_concurrency = 0\n\ninnodb_purge_threads = 1\n\nserver_id = 1\nbinlog_checksum = crc32\n\ninnodb_lru_scan_depth = 512\n\ninnodb_stats_on_metadata = 0\n\nEND\n\ncat </etc/nginx/conf.d/zabbix_ssl.conf\nserver {\n listen 0.0.0.0:443 ssl http2;\n # server_name ;\n index index.php;\n\n root \\$webroot;\n charset utf8;\n set \\$webroot '/usr/share/zabbix';\n\n access_log /var/log/nginx/zabbix_access_ssl.log main;\n error_log /var/log/nginx/zabbix_error_ssl.log error;\n\n ssl_stapling on;\n ssl_stapling_verify on;\n\n #resolver 192.168.13.160 192.168.10.24;\n\n ssl_certificate /etc/ssl/certs/zabbix_example.crt;\n ssl_certificate_key /etc/ssl/private/zabbix_example.key;\n\n ssl_dhparam /etc/ssl/private/zabbix_dhparam.pem;\n\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_verify_depth 3;\n #ssl_ciphers HIGH:!aNULL:!MD5;\n ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;\n #ssl_session_cache shared:SSL:10m;\n ssl_session_cache shared:MozSSL:10m;\n ssl_session_timeout 1d;\n ssl_prefer_server_ciphers off;\n ssl_session_tickets off;\n\n add_header Strict-Transport-Security \"max-age=63072000\" always;\n add_header Content-Security-Policy-Report-Only \"default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report\";\n\n location = /favicon.ico {\n log_not_found off;\n }\n\n location / {\n index index.php;\n try_files \\$uri \\$uri/ =404;\n }\n\n location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {\n access_log off;\n expires 10d;\n }\n\n location ~ /\\.ht {\n deny all;\n }\n\n location ~ /(api\\/|conf[^\\.]|include|locale) {\n deny all;\n return 404;\n }\n\n location ~ [^/]\\.php(/|$) {\n fastcgi_pass unix:/run/php-fpm/zabbix.sock;\n fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n fastcgi_index index.php;\n\n fastcgi_param DOCUMENT_ROOT /usr/share/zabbix;\n fastcgi_param SCRIPT_FILENAME /usr/share/zabbix\\$fastcgi_script_name;\n fastcgi_param PATH_TRANSLATED /usr/share/zabbix\\$fastcgi_script_name;\n\n include fastcgi_params;\n fastcgi_param QUERY_STRING \\$query_string;\n fastcgi_param REQUEST_METHOD \\$request_method;\n fastcgi_param CONTENT_TYPE \\$content_type;\n fastcgi_param CONTENT_LENGTH \\$content_length;\n\n fastcgi_intercept_errors on;\n fastcgi_ignore_client_abort off;\n fastcgi_connect_timeout 60;\n fastcgi_send_timeout 180;\n fastcgi_read_timeout 180;\n fastcgi_buffer_size 128k;\n fastcgi_buffers 4 256k;\n fastcgi_busy_buffers_size 256k;\n fastcgi_temp_file_write_size 256k;\n }\n}\n\nEND\n\ncat </etc/nginx/conf.d/zabbix.conf\nserver {\n listen 0.0.0.0:80;\n # server_name zabbix;\n\n return 301 https://\\$host\\$request_uri;\n}\n\nEND\n\ncat </etc/nginx/nginx.conf\n# For more information on configuration, see:\n# * Official English Documentation: http://nginx.org/en/docs/\n# * Official Russian Documentation: http://nginx.org/ru/docs/\n\nuser nginx;\nworker_processes auto;\nworker_priority -5;\nworker_rlimit_nofile 256000;\n\nerror_log /var/log/nginx/error.log;\n\npid /run/nginx.pid;\n\n# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.\ninclude /usr/share/nginx/modules/*.conf;\n\nevents {\n worker_connections 5120;\n use epoll;\n multi_accept on;\n}\n\n\nhttp {\n include /etc/nginx/mime.types;\n default_type application/octet-stream;\n\n log_format main\n '\\$http_x_forwarded_for - \\$remote_user [\\$time_local] '\n '\"\\$request\" \\$status \\$bytes_sent '\n '\"\\$http_referer\" \"\\$http_user_agent\" '\n '\"\\$gzip_ratio\"';\n\n access_log /var/log/nginx/access.log main;\n\n open_file_cache max=200000 inactive=20s;\n open_file_cache_valid 30s;\n open_file_cache_min_uses 2;\n open_file_cache_errors on;\n\n limit_conn_zone \\$binary_remote_addr zone=perip:10m;\n limit_conn_zone \\$server_name zone=perserver:10m;\n\n client_header_timeout 5m;\n client_body_timeout 5m;\n send_timeout 5m;\n\n connection_pool_size 4096;\n client_header_buffer_size 4k;\n large_client_header_buffers 4 4k;\n request_pool_size 4k;\n\n reset_timedout_connection on;\n\n\n gzip on;\n gzip_min_length 100;\n gzip_buffers 4 8k;\n gzip_comp_level 5;\n gzip_types text/plain text/css text/xml application/x-javascript application/xml application/xhtml+xml;\n\n types_hash_max_size 2048;\n\n output_buffers 128 512k;\n postpone_output 1460;\n aio on;\n directio 512;\n\n sendfile on;\n client_max_body_size 8m;\n fastcgi_intercept_errors on;\n\n tcp_nopush on;\n tcp_nodelay on;\n\n keepalive_timeout 75 20;\n\n ignore_invalid_headers on;\n\n index index.php;\n server_tokens off;\n\n # Load modular configuration files from the /etc/nginx/conf.d directory.\n # See http://nginx.org/en/docs/ngx_core_module.html#include\n # for more information.\n include /etc/nginx/conf.d/*.conf;\n}\n\nEND\n\ncat </etc/php-fpm.d/zabbix.conf\n[zabbix]\nuser = apache\ngroup = apache\n\nlisten = /run/php-fpm/zabbix.sock\nlisten.acl_users = apache,nginx\nlisten.allowed_clients = 127.0.0.1\n\npm = dynamic\npm.max_children = 50\npm.start_servers = 5\npm.min_spare_servers = 5\npm.max_spare_servers = 35\n\nphp_value[session.save_handler] = files\nphp_value[session.save_path] = /var/lib/php/session\n\nphp_value[max_execution_time] = 300\nphp_value[memory_limit] = 128M\nphp_value[post_max_size] = 16M\nphp_value[upload_max_filesize] = 2M\nphp_value[max_input_time] = 300\nphp_value[max_input_vars] = 10000\n; php_value[date.timezone] = Europe/Riga\nEND\n\n# cat </etc/php.d/99-zabbix.ini\n# max_execution_time=300\n# memory_limit=128M\n# post_max_size=16M\n# upload_max_filesize=2M\n# max_input_time=300\n# always_populate_raw_post_data=-1\n# max_input_vars=10000\n# date.timezone=UTC\n# session.save_path=/var/lib/php/\n# END\n\n# cat </etc/profile.d/zabbix_welcome.sh\n# #!/bin/sh\n# #\n# myip=\\$(hostname -I | awk '{print\\$1}')\n# cat </etc/motd.d/zabbix\n********************************************************************************\n\nZabbix frontend credentials:\n\nUsername: Admin\n\nPassword: replace_password\n\n\nTo learn about available professional services, including technical suppport and training, please visit https://www.zabbix.com/services\n\nOfficial Zabbix documentation available at https://www.zabbix.com/documentation/current/\n\n\n********************************************************************************\nEND\n\n# cat </etc/systemd/system/zabbix-instance-init.service\n# [Unit]\n# After=mariadb.service\n\n# [Service]\n# ExecStart=/var/lib/cloud/scripts/per-instance/001-zabbix\n\n# [Install]\n# WantedBy=multi-user.target\n# END\n\n# cat </etc/yum.repos.d/MariaDB.repo\n# # MariaDB 10.3 CentOS repository list - created 2019-03-28 10:57 UTC\n# # http://downloads.mariadb.org/mariadb/repositories/\n# [mariadb]\n# name = MariaDB\n# baseurl = http://yum.mariadb.org/10.2/centos7-amd64\n# gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB\n# gpgcheck=1\n# END\n\ncat </etc/yum.repos.d/Nginx.repo\n[nginx-stable]\nname=nginx stable repo\nbaseurl=http://nginx.org/packages/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=1\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\n\n[nginx-mainline]\nname=nginx mainline repo\nbaseurl=http://nginx.org/packages/mainline/centos/\\$releasever/\\$basearch/\ngpgcheck=1\nenabled=0\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\nEND\n\ncat </etc/zabbix/web/zabbix.conf.php\n 'http://localhost:9200',\n//\t'text' => 'http://localhost:9200'\n//];\n// Value types stored in Elasticsearch.\n//\\$HISTORY['types'] = ['uint', 'text'];\n\n// Used for SAML authentication.\n// Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings.\n//\\$SSO['SP_KEY']\t\t\t= 'conf/certs/sp.key';\n//\\$SSO['SP_CERT']\t\t\t= 'conf/certs/sp.crt';\n//\\$SSO['IDP_CERT']\t\t= 'conf/certs/idp.crt';\n//\\$SSO['SETTINGS']\t\t= [];\nEND\n\ncat </tmp/zabbix_server_custom.te\nmodule zabbix_server_custom 1.2;\nrequire {\n type zabbix_var_run_t;\n type tmp_t;\n type zabbix_t;\n class sock_file { create unlink write };\n class unix_stream_socket connectto;\n class process setrlimit;\n class capability dac_override;\n}\n#============= zabbix_t ==============\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:process setrlimit;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:unix_stream_socket connectto;\n#!!!! This avc is allowed in the current policy\nallow zabbix_t tmp_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t zabbix_var_run_t:sock_file { create unlink write };\n#!!!! This avc is allowed in the current policy\nallow zabbix_t self:capability dac_override;\nEND\n\n# Installing RPM packages\nyum makecache\nyum -y upgrade\nyum -y install wget\nwget https://dev.mysql.com/get/mysql80-community-release-el8-3.noarch.rpm\ndnf -y install mysql80-community-release-el8-3.noarch.rpm\ndnf -y module disable mysql\ndnf -y install https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm\ndnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm\ndnf -y install epel-release\ndnf -y module enable php:remi-8.1\nyum -y install cloud-init cloud-utils-growpart firewalld nginx php-fpm mysql-community-client mysql-community-server java-1.8.0-openjdk-headless zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent zabbix-get zabbix-sender zabbix-java-gateway zabbix-js\n\n\n# Configure firewalld\nsystemctl enable firewalld\nsystemctl start firewalld\nfirewall-cmd --permanent --add-service=ssh --zone=public\nfirewall-cmd --permanent --add-service=http --zone=public\nfirewall-cmd --permanent --add-service=https --zone=public\nfirewall-cmd --permanent --add-port=10051/tcp --zone=public\nfirewall-cmd --reload\n\n# Configure SELinux\nrm -rf /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.pp\ncheckmodule -M -m -o /tmp/zabbix_server_custom.mod /tmp/zabbix_server_custom.te\nsemodule_package -o /tmp/zabbix_server_custom.pp -m /tmp/zabbix_server_custom.mod\nsemodule -i /tmp/zabbix_server_custom.pp\n\nsetsebool -P httpd_can_connect_zabbix=1\nsetsebool -P zabbix_can_network=1\n\n# Generate SSL certificate\nmkdir -p /etc/ssl/private\nopenssl dhparam -out /etc/ssl/private/zabbix_dhparam.pem 2048\n\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/zabbix_example.key \\\n -out /etc/ssl/certs/zabbix_example.crt -subj \"/C=LV/ST=Riga/L=Riga/O=Global Security/OU=IT Department/CN=example.zabbix.com\"\n\n# Configure Zabbix instance\nsystemctl enable mysqld\nsystemctl disable nginx\nsystemctl disable php-fpm\nsystemctl disable zabbix-server\nsystemctl enable zabbix-agent\nsystemctl enable zabbix-java-gateway\n\nsystemctl stop nginx php-fpm\n\necho \"Requires=multi-user.target\" >> /usr/lib/systemd/system/cloud-init.target\n\nsystemctl set-default cloud-init.target\n\nchown -R apache:apache /var/lib/php/\n\nchmod g+r /etc/zabbix/zabbix_server.conf\nchmod o+w /run/zabbix/\n\nchmod 755 /etc/my.cnf\nchmod -R 755 /etc/my.cnf.d/\n\nsed -i 's/^#PrintMotd yes/&\\nPrintMotd no/g' /etc/ssh/sshd_config\n\nsed -i '/^; php_value\\[date.timezone\\] /s/^; //' /etc/php-fpm.d/zabbix.conf\n\nsed -i 's/^# JavaGateway=.*/&\\nJavaGateway=127.0.0.1/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# StartJavaPollers=.*/&\\nStartJavaPollers=5/g' /etc/zabbix/zabbix_server.conf\nsed -i 's/^# LISTEN_IP=.*/&\\nLISTEN_IP=\"127.0.0.1\"/g' /etc/zabbix/zabbix_java_gateway.conf\n\nescape_spec_char() {\n local var_value=$1\n\n var_value=\"${var_value//\\\\/\\\\\\\\}\"\n var_value=\"${var_value//[$'\\n']/}\"\n var_value=\"${var_value//\\//\\\\/}\"\n var_value=\"${var_value//./\\\\.}\"\n var_value=\"${var_value//\\*/\\\\*}\"\n var_value=\"${var_value//^/\\\\^}\"\n var_value=\"${var_value//\\$/\\\\$}\"\n var_value=\"${var_value//\\&/\\\\&}\"\n var_value=\"${var_value//\\[/\\\\[}\"\n var_value=\"${var_value//\\]/\\\\]}\"\n\n echo \"$var_value\"\n}\n\nsystemctl start mysqld\nsystemctl enable mysqld\nsystemctl enable nginx\nsystemctl enable php-fpm\nsystemctl enable zabbix-server\n\nDB_ROOT_TMP_PASS=$(grep 'temporary password' /var/log/mysqld.log | awk '{print $13}' | tail -1)\nWEB_PASS=$(openssl rand -base64 14)\nWEB_PASS=${WEB_PASS%?}\nINST_NAME=$(hostname)\n\nrm -f /root/.my.cnf\n\nDB_ROOT_PASS=$(MYSQL_PWD=\"$DB_ROOT_TMP_PASS\" mysql --connect-expired-password -s -N -e \"SET PASSWORD FOR root@localhost TO RANDOM;\" | awk '{print $3}')\nDB_ZBX_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_srv'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\nDB_ZBXWEB_PASS=$(MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -s -N -e \"CREATE USER 'zabbix_web'@'localhost' IDENTIFIED WITH mysql_native_password BY RANDOM PASSWORD\" | awk '{print $3}')\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"CREATE DATABASE zabbix CHARACTER SET 'utf8' COLLATE 'utf8_bin'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP, ALTER, INDEX, REFERENCES ON zabbix.* TO 'zabbix_srv'@'localhost'\"\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"GRANT SELECT, UPDATE, DELETE, INSERT, CREATE, DROP ON zabbix.* TO 'zabbix_web'@'localhost'\"\n\ncat > /root/.my.cnf << EOF\n[client]\npassword=\"$DB_ROOT_PASS\"\nEOF\n\nzcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | MYSQL_PWD=\"$DB_ROOT_PASS\" mysql -uroot zabbix\n\nMYSQL_PWD=\"$DB_ROOT_PASS\" mysql -u root -e \"UPDATE users SET passwd = MD5('$WEB_PASS') WHERE username = 'Admin'\" zabbix\n\nWEB_PASS=$(escape_spec_char \"$WEB_PASS\")\nsed -i \"s/replace_password/$WEB_PASS/g\" /etc/motd.d/zabbix\n\nsed -i \"s/replace_name/$INST_NAME/g\" /etc/zabbix/web/zabbix.conf.php\n\nDB_ZBX_PASS=$(escape_spec_char \"$DB_ZBX_PASS\")\nDB_ZBXWEB_PASS=$(escape_spec_char \"$DB_ZBXWEB_PASS\")\n\nsed -i \"s/^DBUser=.*/DBUser=zabbix_srv/g\" /etc/zabbix/zabbix_server.conf\nsed -i -e \"/^[#;] DBPassword=/s/.*/&\\nDBPassword=$DB_ZBX_PASS/\" /etc/zabbix/zabbix_server.conf\nsed -i \"s/replace_password/$DB_ZBXWEB_PASS/g\" /etc/zabbix/web/zabbix.conf.php\nsed -i \"s/replace_user/zabbix_web/g\" /etc/zabbix/web/zabbix.conf.php\n\n# Cleaning up remote machine\nrm -rf /etc/nginx/conf.d/default.conf\nrm -rf /tmp/* /var/tmp/*\nhistory -c\ncat /dev/null > /root/.bash_history\nunset HISTFILE\nfind /var/log -mtime -1 -type f ! -name 'stackscript.log' -exec truncate -s 0 {} \\;\n\n\n\nsystemctl start zabbix-server zabbix-agent zabbix-java-gateway\nsystemctl start nginx php-fpm\n\necho \"Installation complete!\"","user_defined_fields":[{"name":"hostname","label":"Hostname"}]}],"page":1,"pages":1,"results":129} \ No newline at end of file diff --git a/packages/manager/src/cachedData/regions.json b/packages/manager/src/cachedData/regions.json index 7aad2b37b8f..3becff548ed 100644 --- a/packages/manager/src/cachedData/regions.json +++ b/packages/manager/src/cachedData/regions.json @@ -1 +1 @@ -{"data":[{"id":"ap-west","label":"Mumbai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.34.5, 172.105.35.5, 172.105.36.5, 172.105.37.5, 172.105.38.5, 172.105.39.5, 172.105.40.5, 172.105.41.5, 172.105.42.5, 172.105.43.5","ipv6":"2400:8904::f03c:91ff:fea5:659, 2400:8904::f03c:91ff:fea5:9282, 2400:8904::f03c:91ff:fea5:b9b3, 2400:8904::f03c:91ff:fea5:925a, 2400:8904::f03c:91ff:fea5:22cb, 2400:8904::f03c:91ff:fea5:227a, 2400:8904::f03c:91ff:fea5:924c, 2400:8904::f03c:91ff:fea5:f7e2, 2400:8904::f03c:91ff:fea5:2205, 2400:8904::f03c:91ff:fea5:9207"}},{"id":"ca-central","label":"Toronto, CA","country":"ca","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.0.5, 172.105.3.5, 172.105.4.5, 172.105.5.5, 172.105.6.5, 172.105.7.5, 172.105.8.5, 172.105.9.5, 172.105.10.5, 172.105.11.5","ipv6":"2600:3c04::f03c:91ff:fea9:f63, 2600:3c04::f03c:91ff:fea9:f6d, 2600:3c04::f03c:91ff:fea9:f80, 2600:3c04::f03c:91ff:fea9:f0f, 2600:3c04::f03c:91ff:fea9:f99, 2600:3c04::f03c:91ff:fea9:fbd, 2600:3c04::f03c:91ff:fea9:fdd, 2600:3c04::f03c:91ff:fea9:fe2, 2600:3c04::f03c:91ff:fea9:f68, 2600:3c04::f03c:91ff:fea9:f4a"}},{"id":"ap-southeast","label":"Sydney, AU","country":"au","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.166.5, 172.105.169.5, 172.105.168.5, 172.105.172.5, 172.105.162.5, 172.105.170.5, 172.105.167.5, 172.105.171.5, 172.105.181.5, 172.105.161.5","ipv6":"2400:8907::f03c:92ff:fe6e:ec8, 2400:8907::f03c:92ff:fe6e:98e4, 2400:8907::f03c:92ff:fe6e:1c58, 2400:8907::f03c:92ff:fe6e:c299, 2400:8907::f03c:92ff:fe6e:c210, 2400:8907::f03c:92ff:fe6e:c219, 2400:8907::f03c:92ff:fe6e:1c5c, 2400:8907::f03c:92ff:fe6e:c24e, 2400:8907::f03c:92ff:fe6e:e6b, 2400:8907::f03c:92ff:fe6e:e3d"}},{"id":"us-iad","label":"Washington, DC","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"139.144.192.62, 139.144.192.60, 139.144.192.61, 139.144.192.53, 139.144.192.54, 139.144.192.67, 139.144.192.69, 139.144.192.66, 139.144.192.52, 139.144.192.68","ipv6":"2600:3c05::f03c:93ff:feb6:43b6, 2600:3c05::f03c:93ff:feb6:4365, 2600:3c05::f03c:93ff:feb6:43c2, 2600:3c05::f03c:93ff:feb6:e441, 2600:3c05::f03c:93ff:feb6:94ef, 2600:3c05::f03c:93ff:feb6:94ba, 2600:3c05::f03c:93ff:feb6:94a8, 2600:3c05::f03c:93ff:feb6:9413, 2600:3c05::f03c:93ff:feb6:9443, 2600:3c05::f03c:93ff:feb6:94e0"}},{"id":"us-ord","label":"Chicago, IL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.0.17, 172.232.0.16, 172.232.0.21, 172.232.0.13, 172.232.0.22, 172.232.0.9, 172.232.0.19, 172.232.0.20, 172.232.0.15, 172.232.0.18","ipv6":"2600:3c06::f03c:93ff:fed0:e5fc, 2600:3c06::f03c:93ff:fed0:e54b, 2600:3c06::f03c:93ff:fed0:e572, 2600:3c06::f03c:93ff:fed0:e530, 2600:3c06::f03c:93ff:fed0:e597, 2600:3c06::f03c:93ff:fed0:e511, 2600:3c06::f03c:93ff:fed0:e5f2, 2600:3c06::f03c:93ff:fed0:e5bf, 2600:3c06::f03c:93ff:fed0:e529, 2600:3c06::f03c:93ff:fed0:e5a3"}},{"id":"fr-par","label":"Paris, FR","country":"fr","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.32.21, 172.232.32.23, 172.232.32.17, 172.232.32.18, 172.232.32.16, 172.232.32.22, 172.232.32.20, 172.232.32.14, 172.232.32.11, 172.232.32.12","ipv6":"2600:3c07::f03c:93ff:fef2:2e63, 2600:3c07::f03c:93ff:fef2:2ec7, 2600:3c07::f03c:93ff:fef2:0dee, 2600:3c07::f03c:93ff:fef2:0d25, 2600:3c07::f03c:93ff:fef2:0de0, 2600:3c07::f03c:93ff:fef2:2e29, 2600:3c07::f03c:93ff:fef2:0dda, 2600:3c07::f03c:93ff:fef2:0d82, 2600:3c07::f03c:93ff:fef2:b3ac, 2600:3c07::f03c:93ff:fef2:b3a8"}},{"id":"us-sea","label":"Seattle, WA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.160.19, 172.232.160.21, 172.232.160.17, 172.232.160.15, 172.232.160.18, 172.232.160.8, 172.232.160.12, 172.232.160.11, 172.232.160.14, 172.232.160.16","ipv6":"2600:3c0a::f03c:93ff:fe54:c6da, 2600:3c0a::f03c:93ff:fe54:c691, 2600:3c0a::f03c:93ff:fe54:c68d, 2600:3c0a::f03c:93ff:fe54:c61e, 2600:3c0a::f03c:93ff:fe54:c653, 2600:3c0a::f03c:93ff:fe54:c64c, 2600:3c0a::f03c:93ff:fe54:c68a, 2600:3c0a::f03c:93ff:fe54:c697, 2600:3c0a::f03c:93ff:fe54:c60f, 2600:3c0a::f03c:93ff:fe54:c6a0"}},{"id":"br-gru","label":"Sao Paulo, BR","country":"br","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.0.4, 172.233.0.9, 172.233.0.7, 172.233.0.12, 172.233.0.5, 172.233.0.13, 172.233.0.10, 172.233.0.6, 172.233.0.8, 172.233.0.11","ipv6":"2600:3c0d::f03c:93ff:fe3d:51cb, 2600:3c0d::f03c:93ff:fe3d:51a7, 2600:3c0d::f03c:93ff:fe3d:51a9, 2600:3c0d::f03c:93ff:fe3d:5119, 2600:3c0d::f03c:93ff:fe3d:51fe, 2600:3c0d::f03c:93ff:fe3d:517c, 2600:3c0d::f03c:93ff:fe3d:5144, 2600:3c0d::f03c:93ff:fe3d:5170, 2600:3c0d::f03c:93ff:fe3d:51cc, 2600:3c0d::f03c:93ff:fe3d:516c"}},{"id":"nl-ams","label":"Amsterdam, NL","country":"nl","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.33.36, 172.233.33.38, 172.233.33.35, 172.233.33.39, 172.233.33.34, 172.233.33.33, 172.233.33.31, 172.233.33.30, 172.233.33.37, 172.233.33.32","ipv6":"2600:3c0e::f03c:93ff:fe9d:2d10, 2600:3c0e::f03c:93ff:fe9d:2d89, 2600:3c0e::f03c:93ff:fe9d:2d79, 2600:3c0e::f03c:93ff:fe9d:2d96, 2600:3c0e::f03c:93ff:fe9d:2da5, 2600:3c0e::f03c:93ff:fe9d:2d34, 2600:3c0e::f03c:93ff:fe9d:2d68, 2600:3c0e::f03c:93ff:fe9d:2d17, 2600:3c0e::f03c:93ff:fe9d:2d45, 2600:3c0e::f03c:93ff:fe9d:2d5c"}},{"id":"se-sto","label":"Stockholm, SE","country":"se","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.128.24, 172.232.128.26, 172.232.128.20, 172.232.128.22, 172.232.128.25, 172.232.128.19, 172.232.128.23, 172.232.128.18, 172.232.128.21, 172.232.128.27","ipv6":"2600:3c09::f03c:93ff:fea9:4dbe, 2600:3c09::f03c:93ff:fea9:4d63, 2600:3c09::f03c:93ff:fea9:4dce, 2600:3c09::f03c:93ff:fea9:4dbb, 2600:3c09::f03c:93ff:fea9:4d99, 2600:3c09::f03c:93ff:fea9:4d26, 2600:3c09::f03c:93ff:fea9:4de0, 2600:3c09::f03c:93ff:fea9:4d69, 2600:3c09::f03c:93ff:fea9:4dbf, 2600:3c09::f03c:93ff:fea9:4da6"}},{"id":"in-maa","label":"Chennai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.96.17, 172.232.96.26, 172.232.96.19, 172.232.96.20, 172.232.96.25, 172.232.96.21, 172.232.96.18, 172.232.96.22, 172.232.96.23, 172.232.96.24","ipv6":"2600:3c08::f03c:93ff:fe7c:1135, 2600:3c08::f03c:93ff:fe7c:11f8, 2600:3c08::f03c:93ff:fe7c:11d2, 2600:3c08::f03c:93ff:fe7c:11a7, 2600:3c08::f03c:93ff:fe7c:11ad, 2600:3c08::f03c:93ff:fe7c:110a, 2600:3c08::f03c:93ff:fe7c:11f9, 2600:3c08::f03c:93ff:fe7c:1137, 2600:3c08::f03c:93ff:fe7c:11db, 2600:3c08::f03c:93ff:fe7c:1164"}},{"id":"jp-osa","label":"Osaka, JP","country":"jp","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.64.44, 172.233.64.43, 172.233.64.37, 172.233.64.40, 172.233.64.46, 172.233.64.41, 172.233.64.39, 172.233.64.42, 172.233.64.45, 172.233.64.38","ipv6":"2400:8905::f03c:93ff:fe9d:b085, 2400:8905::f03c:93ff:fe9d:b012, 2400:8905::f03c:93ff:fe9d:b09b, 2400:8905::f03c:93ff:fe9d:b0d8, 2400:8905::f03c:93ff:fe9d:259f, 2400:8905::f03c:93ff:fe9d:b006, 2400:8905::f03c:93ff:fe9d:b084, 2400:8905::f03c:93ff:fe9d:b0ce, 2400:8905::f03c:93ff:fe9d:25ea, 2400:8905::f03c:93ff:fe9d:b086"}},{"id":"it-mil","label":"Milan, IT","country":"it","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.192.19, 172.232.192.18, 172.232.192.16, 172.232.192.20, 172.232.192.24, 172.232.192.21, 172.232.192.22, 172.232.192.17, 172.232.192.15, 172.232.192.23","ipv6":"2600:3c0b::f03c:93ff:feba:d513, 2600:3c0b::f03c:93ff:feba:d5c3, 2600:3c0b::f03c:93ff:feba:d597, 2600:3c0b::f03c:93ff:feba:d5fb, 2600:3c0b::f03c:93ff:feba:d51f, 2600:3c0b::f03c:93ff:feba:d58e, 2600:3c0b::f03c:93ff:feba:d5d5, 2600:3c0b::f03c:93ff:feba:d534, 2600:3c0b::f03c:93ff:feba:d57c, 2600:3c0b::f03c:93ff:feba:d529"}},{"id":"us-mia","label":"Miami, FL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.160.34, 172.233.160.27, 172.233.160.30, 172.233.160.29, 172.233.160.32, 172.233.160.28, 172.233.160.33, 172.233.160.26, 172.233.160.25, 172.233.160.31","ipv6":"2a01:7e04::f03c:93ff:fead:d31f, 2a01:7e04::f03c:93ff:fead:d37f, 2a01:7e04::f03c:93ff:fead:d30c, 2a01:7e04::f03c:93ff:fead:d318, 2a01:7e04::f03c:93ff:fead:d316, 2a01:7e04::f03c:93ff:fead:d339, 2a01:7e04::f03c:93ff:fead:d367, 2a01:7e04::f03c:93ff:fead:d395, 2a01:7e04::f03c:93ff:fead:d3d0, 2a01:7e04::f03c:93ff:fead:d38e"}},{"id":"id-cgk","label":"Jakarta, ID","country":"id","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.224.23, 172.232.224.32, 172.232.224.26, 172.232.224.27, 172.232.224.21, 172.232.224.24, 172.232.224.22, 172.232.224.20, 172.232.224.31, 172.232.224.28","ipv6":"2600:3c0c::f03c:93ff:feed:a90b, 2600:3c0c::f03c:93ff:feed:a9a5, 2600:3c0c::f03c:93ff:feed:a935, 2600:3c0c::f03c:93ff:feed:a930, 2600:3c0c::f03c:93ff:feed:a95c, 2600:3c0c::f03c:93ff:feed:a9ad, 2600:3c0c::f03c:93ff:feed:a9f2, 2600:3c0c::f03c:93ff:feed:a9ff, 2600:3c0c::f03c:93ff:feed:a9c8, 2600:3c0c::f03c:93ff:feed:a96b"}},{"id":"us-lax","label":"Los Angeles, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.128.45, 172.233.128.38, 172.233.128.53, 172.233.128.37, 172.233.128.34, 172.233.128.36, 172.233.128.33, 172.233.128.39, 172.233.128.43, 172.233.128.44","ipv6":"2a01:7e03::f03c:93ff:feb1:b789, 2a01:7e03::f03c:93ff:feb1:b717, 2a01:7e03::f03c:93ff:feb1:b707, 2a01:7e03::f03c:93ff:feb1:b7ab, 2a01:7e03::f03c:93ff:feb1:b7e2, 2a01:7e03::f03c:93ff:feb1:b709, 2a01:7e03::f03c:93ff:feb1:b7a6, 2a01:7e03::f03c:93ff:feb1:b750, 2a01:7e03::f03c:93ff:feb1:b76e, 2a01:7e03::f03c:93ff:feb1:b7a2"}},{"id":"us-central","label":"Dallas, TX","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"72.14.179.5, 72.14.188.5, 173.255.199.5, 66.228.53.5, 96.126.122.5, 96.126.124.5, 96.126.127.5, 198.58.107.5, 198.58.111.5, 23.239.24.5","ipv6":"2600:3c00::2, 2600:3c00::9, 2600:3c00::7, 2600:3c00::5, 2600:3c00::3, 2600:3c00::8, 2600:3c00::6, 2600:3c00::4, 2600:3c00::c, 2600:3c00::b"}},{"id":"us-west","label":"Fremont, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"173.230.145.5, 173.230.147.5, 173.230.155.5, 173.255.212.5, 173.255.219.5, 173.255.241.5, 173.255.243.5, 173.255.244.5, 74.207.241.5, 74.207.242.5","ipv6":"2600:3c01::2, 2600:3c01::9, 2600:3c01::5, 2600:3c01::7, 2600:3c01::3, 2600:3c01::8, 2600:3c01::4, 2600:3c01::b, 2600:3c01::c, 2600:3c01::6"}},{"id":"us-southeast","label":"Atlanta, GA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"74.207.231.5, 173.230.128.5, 173.230.129.5, 173.230.136.5, 173.230.140.5, 66.228.59.5, 66.228.62.5, 50.116.35.5, 50.116.41.5, 23.239.18.5","ipv6":"2600:3c02::3, 2600:3c02::5, 2600:3c02::4, 2600:3c02::6, 2600:3c02::c, 2600:3c02::7, 2600:3c02::2, 2600:3c02::9, 2600:3c02::8, 2600:3c02::b"}},{"id":"us-east","label":"Newark, NJ","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Bare Metal","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"66.228.42.5, 96.126.106.5, 50.116.53.5, 50.116.58.5, 50.116.61.5, 50.116.62.5, 66.175.211.5, 97.107.133.4, 207.192.69.4, 207.192.69.5","ipv6":"2600:3c03::7, 2600:3c03::4, 2600:3c03::9, 2600:3c03::6, 2600:3c03::3, 2600:3c03::c, 2600:3c03::5, 2600:3c03::b, 2600:3c03::2, 2600:3c03::8"}},{"id":"eu-west","label":"London, UK","country":"gb","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"178.79.182.5, 176.58.107.5, 176.58.116.5, 176.58.121.5, 151.236.220.5, 212.71.252.5, 212.71.253.5, 109.74.192.20, 109.74.193.20, 109.74.194.20","ipv6":"2a01:7e00::9, 2a01:7e00::3, 2a01:7e00::c, 2a01:7e00::5, 2a01:7e00::6, 2a01:7e00::8, 2a01:7e00::b, 2a01:7e00::4, 2a01:7e00::7, 2a01:7e00::2"}},{"id":"ap-south","label":"Singapore, SG","country":"sg","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.11.5, 139.162.13.5, 139.162.14.5, 139.162.15.5, 139.162.16.5, 139.162.21.5, 139.162.27.5, 103.3.60.18, 103.3.60.19, 103.3.60.20","ipv6":"2400:8901::5, 2400:8901::4, 2400:8901::b, 2400:8901::3, 2400:8901::9, 2400:8901::2, 2400:8901::8, 2400:8901::7, 2400:8901::c, 2400:8901::6"}},{"id":"eu-central","label":"Frankfurt, DE","country":"de","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.130.5, 139.162.131.5, 139.162.132.5, 139.162.133.5, 139.162.134.5, 139.162.135.5, 139.162.136.5, 139.162.137.5, 139.162.138.5, 139.162.139.5","ipv6":"2a01:7e01::5, 2a01:7e01::9, 2a01:7e01::7, 2a01:7e01::c, 2a01:7e01::2, 2a01:7e01::4, 2a01:7e01::3, 2a01:7e01::6, 2a01:7e01::b, 2a01:7e01::8"}},{"id":"ap-northeast","label":"Tokyo, JP","country":"jp","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.66.5, 139.162.67.5, 139.162.68.5, 139.162.69.5, 139.162.70.5, 139.162.71.5, 139.162.72.5, 139.162.73.5, 139.162.74.5, 139.162.75.5","ipv6":"2400:8902::3, 2400:8902::6, 2400:8902::c, 2400:8902::4, 2400:8902::2, 2400:8902::8, 2400:8902::7, 2400:8902::5, 2400:8902::b, 2400:8902::9"}}],"page":1,"pages":1,"results":24} \ No newline at end of file +{"data":[{"id":"ap-west","label":"Mumbai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.34.5, 172.105.35.5, 172.105.36.5, 172.105.37.5, 172.105.38.5, 172.105.39.5, 172.105.40.5, 172.105.41.5, 172.105.42.5, 172.105.43.5","ipv6":"2400:8904::f03c:91ff:fea5:659, 2400:8904::f03c:91ff:fea5:9282, 2400:8904::f03c:91ff:fea5:b9b3, 2400:8904::f03c:91ff:fea5:925a, 2400:8904::f03c:91ff:fea5:22cb, 2400:8904::f03c:91ff:fea5:227a, 2400:8904::f03c:91ff:fea5:924c, 2400:8904::f03c:91ff:fea5:f7e2, 2400:8904::f03c:91ff:fea5:2205, 2400:8904::f03c:91ff:fea5:9207"}},{"id":"ca-central","label":"Toronto, CA","country":"ca","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.0.5, 172.105.3.5, 172.105.4.5, 172.105.5.5, 172.105.6.5, 172.105.7.5, 172.105.8.5, 172.105.9.5, 172.105.10.5, 172.105.11.5","ipv6":"2600:3c04::f03c:91ff:fea9:f63, 2600:3c04::f03c:91ff:fea9:f6d, 2600:3c04::f03c:91ff:fea9:f80, 2600:3c04::f03c:91ff:fea9:f0f, 2600:3c04::f03c:91ff:fea9:f99, 2600:3c04::f03c:91ff:fea9:fbd, 2600:3c04::f03c:91ff:fea9:fdd, 2600:3c04::f03c:91ff:fea9:fe2, 2600:3c04::f03c:91ff:fea9:f68, 2600:3c04::f03c:91ff:fea9:f4a"}},{"id":"ap-southeast","label":"Sydney, AU","country":"au","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"172.105.166.5, 172.105.169.5, 172.105.168.5, 172.105.172.5, 172.105.162.5, 172.105.170.5, 172.105.167.5, 172.105.171.5, 172.105.181.5, 172.105.161.5","ipv6":"2400:8907::f03c:92ff:fe6e:ec8, 2400:8907::f03c:92ff:fe6e:98e4, 2400:8907::f03c:92ff:fe6e:1c58, 2400:8907::f03c:92ff:fe6e:c299, 2400:8907::f03c:92ff:fe6e:c210, 2400:8907::f03c:92ff:fe6e:c219, 2400:8907::f03c:92ff:fe6e:1c5c, 2400:8907::f03c:92ff:fe6e:c24e, 2400:8907::f03c:92ff:fe6e:e6b, 2400:8907::f03c:92ff:fe6e:e3d"}},{"id":"us-iad","label":"Washington, DC","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"139.144.192.62, 139.144.192.60, 139.144.192.61, 139.144.192.53, 139.144.192.54, 139.144.192.67, 139.144.192.69, 139.144.192.66, 139.144.192.52, 139.144.192.68","ipv6":"2600:3c05::f03c:93ff:feb6:43b6, 2600:3c05::f03c:93ff:feb6:4365, 2600:3c05::f03c:93ff:feb6:43c2, 2600:3c05::f03c:93ff:feb6:e441, 2600:3c05::f03c:93ff:feb6:94ef, 2600:3c05::f03c:93ff:feb6:94ba, 2600:3c05::f03c:93ff:feb6:94a8, 2600:3c05::f03c:93ff:feb6:9413, 2600:3c05::f03c:93ff:feb6:9443, 2600:3c05::f03c:93ff:feb6:94e0"}},{"id":"us-ord","label":"Chicago, IL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.0.17, 172.232.0.16, 172.232.0.21, 172.232.0.13, 172.232.0.22, 172.232.0.9, 172.232.0.19, 172.232.0.20, 172.232.0.15, 172.232.0.18","ipv6":"2600:3c06::f03c:93ff:fed0:e5fc, 2600:3c06::f03c:93ff:fed0:e54b, 2600:3c06::f03c:93ff:fed0:e572, 2600:3c06::f03c:93ff:fed0:e530, 2600:3c06::f03c:93ff:fed0:e597, 2600:3c06::f03c:93ff:fed0:e511, 2600:3c06::f03c:93ff:fed0:e5f2, 2600:3c06::f03c:93ff:fed0:e5bf, 2600:3c06::f03c:93ff:fed0:e529, 2600:3c06::f03c:93ff:fed0:e5a3"}},{"id":"fr-par","label":"Paris, FR","country":"fr","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Managed Databases","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.32.21, 172.232.32.23, 172.232.32.17, 172.232.32.18, 172.232.32.16, 172.232.32.22, 172.232.32.20, 172.232.32.14, 172.232.32.11, 172.232.32.12","ipv6":"2600:3c07::f03c:93ff:fef2:2e63, 2600:3c07::f03c:93ff:fef2:2ec7, 2600:3c07::f03c:93ff:fef2:0dee, 2600:3c07::f03c:93ff:fef2:0d25, 2600:3c07::f03c:93ff:fef2:0de0, 2600:3c07::f03c:93ff:fef2:2e29, 2600:3c07::f03c:93ff:fef2:0dda, 2600:3c07::f03c:93ff:fef2:0d82, 2600:3c07::f03c:93ff:fef2:b3ac, 2600:3c07::f03c:93ff:fef2:b3a8"}},{"id":"us-sea","label":"Seattle, WA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.160.19, 172.232.160.21, 172.232.160.17, 172.232.160.15, 172.232.160.18, 172.232.160.8, 172.232.160.12, 172.232.160.11, 172.232.160.14, 172.232.160.16","ipv6":"2600:3c0a::f03c:93ff:fe54:c6da, 2600:3c0a::f03c:93ff:fe54:c691, 2600:3c0a::f03c:93ff:fe54:c68d, 2600:3c0a::f03c:93ff:fe54:c61e, 2600:3c0a::f03c:93ff:fe54:c653, 2600:3c0a::f03c:93ff:fe54:c64c, 2600:3c0a::f03c:93ff:fe54:c68a, 2600:3c0a::f03c:93ff:fe54:c697, 2600:3c0a::f03c:93ff:fe54:c60f, 2600:3c0a::f03c:93ff:fe54:c6a0"}},{"id":"br-gru","label":"Sao Paulo, BR","country":"br","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.0.4, 172.233.0.9, 172.233.0.7, 172.233.0.12, 172.233.0.5, 172.233.0.13, 172.233.0.10, 172.233.0.6, 172.233.0.8, 172.233.0.11","ipv6":"2600:3c0d::f03c:93ff:fe3d:51cb, 2600:3c0d::f03c:93ff:fe3d:51a7, 2600:3c0d::f03c:93ff:fe3d:51a9, 2600:3c0d::f03c:93ff:fe3d:5119, 2600:3c0d::f03c:93ff:fe3d:51fe, 2600:3c0d::f03c:93ff:fe3d:517c, 2600:3c0d::f03c:93ff:fe3d:5144, 2600:3c0d::f03c:93ff:fe3d:5170, 2600:3c0d::f03c:93ff:fe3d:51cc, 2600:3c0d::f03c:93ff:fe3d:516c"}},{"id":"nl-ams","label":"Amsterdam, NL","country":"nl","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.33.36, 172.233.33.38, 172.233.33.35, 172.233.33.39, 172.233.33.34, 172.233.33.33, 172.233.33.31, 172.233.33.30, 172.233.33.37, 172.233.33.32","ipv6":"2600:3c0e::f03c:93ff:fe9d:2d10, 2600:3c0e::f03c:93ff:fe9d:2d89, 2600:3c0e::f03c:93ff:fe9d:2d79, 2600:3c0e::f03c:93ff:fe9d:2d96, 2600:3c0e::f03c:93ff:fe9d:2da5, 2600:3c0e::f03c:93ff:fe9d:2d34, 2600:3c0e::f03c:93ff:fe9d:2d68, 2600:3c0e::f03c:93ff:fe9d:2d17, 2600:3c0e::f03c:93ff:fe9d:2d45, 2600:3c0e::f03c:93ff:fe9d:2d5c"}},{"id":"se-sto","label":"Stockholm, SE","country":"se","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.128.24, 172.232.128.26, 172.232.128.20, 172.232.128.22, 172.232.128.25, 172.232.128.19, 172.232.128.23, 172.232.128.18, 172.232.128.21, 172.232.128.27","ipv6":"2600:3c09::f03c:93ff:fea9:4dbe, 2600:3c09::f03c:93ff:fea9:4d63, 2600:3c09::f03c:93ff:fea9:4dce, 2600:3c09::f03c:93ff:fea9:4dbb, 2600:3c09::f03c:93ff:fea9:4d99, 2600:3c09::f03c:93ff:fea9:4d26, 2600:3c09::f03c:93ff:fea9:4de0, 2600:3c09::f03c:93ff:fea9:4d69, 2600:3c09::f03c:93ff:fea9:4dbf, 2600:3c09::f03c:93ff:fea9:4da6"}},{"id":"in-maa","label":"Chennai, IN","country":"in","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.96.17, 172.232.96.26, 172.232.96.19, 172.232.96.20, 172.232.96.25, 172.232.96.21, 172.232.96.18, 172.232.96.22, 172.232.96.23, 172.232.96.24","ipv6":"2600:3c08::f03c:93ff:fe7c:1135, 2600:3c08::f03c:93ff:fe7c:11f8, 2600:3c08::f03c:93ff:fe7c:11d2, 2600:3c08::f03c:93ff:fe7c:11a7, 2600:3c08::f03c:93ff:fe7c:11ad, 2600:3c08::f03c:93ff:fe7c:110a, 2600:3c08::f03c:93ff:fe7c:11f9, 2600:3c08::f03c:93ff:fe7c:1137, 2600:3c08::f03c:93ff:fe7c:11db, 2600:3c08::f03c:93ff:fe7c:1164"}},{"id":"jp-osa","label":"Osaka, JP","country":"jp","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.64.44, 172.233.64.43, 172.233.64.37, 172.233.64.40, 172.233.64.46, 172.233.64.41, 172.233.64.39, 172.233.64.42, 172.233.64.45, 172.233.64.38","ipv6":"2400:8905::f03c:93ff:fe9d:b085, 2400:8905::f03c:93ff:fe9d:b012, 2400:8905::f03c:93ff:fe9d:b09b, 2400:8905::f03c:93ff:fe9d:b0d8, 2400:8905::f03c:93ff:fe9d:259f, 2400:8905::f03c:93ff:fe9d:b006, 2400:8905::f03c:93ff:fe9d:b084, 2400:8905::f03c:93ff:fe9d:b0ce, 2400:8905::f03c:93ff:fe9d:25ea, 2400:8905::f03c:93ff:fe9d:b086"}},{"id":"it-mil","label":"Milan, IT","country":"it","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.192.19, 172.232.192.18, 172.232.192.16, 172.232.192.20, 172.232.192.24, 172.232.192.21, 172.232.192.22, 172.232.192.17, 172.232.192.15, 172.232.192.23","ipv6":"2600:3c0b::f03c:93ff:feba:d513, 2600:3c0b::f03c:93ff:feba:d5c3, 2600:3c0b::f03c:93ff:feba:d597, 2600:3c0b::f03c:93ff:feba:d5fb, 2600:3c0b::f03c:93ff:feba:d51f, 2600:3c0b::f03c:93ff:feba:d58e, 2600:3c0b::f03c:93ff:feba:d5d5, 2600:3c0b::f03c:93ff:feba:d534, 2600:3c0b::f03c:93ff:feba:d57c, 2600:3c0b::f03c:93ff:feba:d529"}},{"id":"us-mia","label":"Miami, FL","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.160.34, 172.233.160.27, 172.233.160.30, 172.233.160.29, 172.233.160.32, 172.233.160.28, 172.233.160.33, 172.233.160.26, 172.233.160.25, 172.233.160.31","ipv6":"2a01:7e04::f03c:93ff:fead:d31f, 2a01:7e04::f03c:93ff:fead:d37f, 2a01:7e04::f03c:93ff:fead:d30c, 2a01:7e04::f03c:93ff:fead:d318, 2a01:7e04::f03c:93ff:fead:d316, 2a01:7e04::f03c:93ff:fead:d339, 2a01:7e04::f03c:93ff:fead:d367, 2a01:7e04::f03c:93ff:fead:d395, 2a01:7e04::f03c:93ff:fead:d3d0, 2a01:7e04::f03c:93ff:fead:d38e"}},{"id":"id-cgk","label":"Jakarta, ID","country":"id","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.232.224.23, 172.232.224.32, 172.232.224.26, 172.232.224.27, 172.232.224.21, 172.232.224.24, 172.232.224.22, 172.232.224.20, 172.232.224.31, 172.232.224.28","ipv6":"2600:3c0c::f03c:93ff:feed:a90b, 2600:3c0c::f03c:93ff:feed:a9a5, 2600:3c0c::f03c:93ff:feed:a935, 2600:3c0c::f03c:93ff:feed:a930, 2600:3c0c::f03c:93ff:feed:a95c, 2600:3c0c::f03c:93ff:feed:a9ad, 2600:3c0c::f03c:93ff:feed:a9f2, 2600:3c0c::f03c:93ff:feed:a9ff, 2600:3c0c::f03c:93ff:feed:a9c8, 2600:3c0c::f03c:93ff:feed:a96b"}},{"id":"us-lax","label":"Los Angeles, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","Kubernetes","Cloud Firewall","Vlans","Metadata","Premium Plans"],"status":"ok","resolvers":{"ipv4":"172.233.128.45, 172.233.128.38, 172.233.128.53, 172.233.128.37, 172.233.128.34, 172.233.128.36, 172.233.128.33, 172.233.128.39, 172.233.128.43, 172.233.128.44","ipv6":"2a01:7e03::f03c:93ff:feb1:b789, 2a01:7e03::f03c:93ff:feb1:b717, 2a01:7e03::f03c:93ff:feb1:b707, 2a01:7e03::f03c:93ff:feb1:b7ab, 2a01:7e03::f03c:93ff:feb1:b7e2, 2a01:7e03::f03c:93ff:feb1:b709, 2a01:7e03::f03c:93ff:feb1:b7a6, 2a01:7e03::f03c:93ff:feb1:b750, 2a01:7e03::f03c:93ff:feb1:b76e, 2a01:7e03::f03c:93ff:feb1:b7a2"}},{"id":"us-central","label":"Dallas, TX","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"72.14.179.5, 72.14.188.5, 173.255.199.5, 66.228.53.5, 96.126.122.5, 96.126.124.5, 96.126.127.5, 198.58.107.5, 198.58.111.5, 23.239.24.5","ipv6":"2600:3c00::2, 2600:3c00::9, 2600:3c00::7, 2600:3c00::5, 2600:3c00::3, 2600:3c00::8, 2600:3c00::6, 2600:3c00::4, 2600:3c00::c, 2600:3c00::b"}},{"id":"us-west","label":"Fremont, CA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"173.230.145.5, 173.230.147.5, 173.230.155.5, 173.255.212.5, 173.255.219.5, 173.255.241.5, 173.255.243.5, 173.255.244.5, 74.207.241.5, 74.207.242.5","ipv6":"2600:3c01::2, 2600:3c01::9, 2600:3c01::5, 2600:3c01::7, 2600:3c01::3, 2600:3c01::8, 2600:3c01::4, 2600:3c01::b, 2600:3c01::c, 2600:3c01::6"}},{"id":"us-southeast","label":"Atlanta, GA","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"74.207.231.5, 173.230.128.5, 173.230.129.5, 173.230.136.5, 173.230.140.5, 66.228.59.5, 66.228.62.5, 50.116.35.5, 50.116.41.5, 23.239.18.5","ipv6":"2600:3c02::3, 2600:3c02::5, 2600:3c02::4, 2600:3c02::6, 2600:3c02::c, 2600:3c02::7, 2600:3c02::2, 2600:3c02::9, 2600:3c02::8, 2600:3c02::b"}},{"id":"us-east","label":"Newark, NJ","country":"us","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Bare Metal","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"66.228.42.5, 96.126.106.5, 50.116.53.5, 50.116.58.5, 50.116.61.5, 50.116.62.5, 66.175.211.5, 97.107.133.4, 207.192.69.4, 207.192.69.5","ipv6":"2600:3c03::7, 2600:3c03::4, 2600:3c03::9, 2600:3c03::6, 2600:3c03::3, 2600:3c03::c, 2600:3c03::5, 2600:3c03::b, 2600:3c03::2, 2600:3c03::8"}},{"id":"eu-west","label":"London, UK","country":"gb","capabilities":["Linodes","NodeBalancers","Block Storage","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"178.79.182.5, 176.58.107.5, 176.58.116.5, 176.58.121.5, 151.236.220.5, 212.71.252.5, 212.71.253.5, 109.74.192.20, 109.74.193.20, 109.74.194.20","ipv6":"2a01:7e00::9, 2a01:7e00::3, 2a01:7e00::c, 2a01:7e00::5, 2a01:7e00::6, 2a01:7e00::8, 2a01:7e00::b, 2a01:7e00::4, 2a01:7e00::7, 2a01:7e00::2"}},{"id":"ap-south","label":"Singapore, SG","country":"sg","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.11.5, 139.162.13.5, 139.162.14.5, 139.162.15.5, 139.162.16.5, 139.162.21.5, 139.162.27.5, 103.3.60.18, 103.3.60.19, 103.3.60.20","ipv6":"2400:8901::5, 2400:8901::4, 2400:8901::b, 2400:8901::3, 2400:8901::9, 2400:8901::2, 2400:8901::8, 2400:8901::7, 2400:8901::c, 2400:8901::6"}},{"id":"eu-central","label":"Frankfurt, DE","country":"de","capabilities":["Linodes","NodeBalancers","Block Storage","Object Storage","GPU Linodes","Kubernetes","Cloud Firewall","Vlans","Block Storage Migrations","Managed Databases"],"status":"ok","resolvers":{"ipv4":"139.162.130.5, 139.162.131.5, 139.162.132.5, 139.162.133.5, 139.162.134.5, 139.162.135.5, 139.162.136.5, 139.162.137.5, 139.162.138.5, 139.162.139.5","ipv6":"2a01:7e01::5, 2a01:7e01::9, 2a01:7e01::7, 2a01:7e01::c, 2a01:7e01::2, 2a01:7e01::4, 2a01:7e01::3, 2a01:7e01::6, 2a01:7e01::b, 2a01:7e01::8"}}],"page":1,"pages":1,"results":23} \ No newline at end of file From a3eebdf37dcb03b36b2897a4b05755dc23f5e715 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Mon, 1 Jan 2024 09:42:08 -0500 Subject: [PATCH 10/42] Bump version --- packages/manager/package.json | 2 +- yarn.lock | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index 9796cf09def..1b841d2244c 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -17,7 +17,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@linode/api-v4": "*", - "@linode/design-language-system": "^1.1.0", + "@linode/design-language-system": "^1.2.0", "@linode/validation": "*", "@mui/icons-material": "^5.14.7", "@mui/material": "^5.14.7", diff --git a/yarn.lock b/yarn.lock index 94fe57c2097..99dfd9ad7de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2528,12 +2528,14 @@ resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919" integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== -"@linode/design-language-system@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-1.0.0.tgz#df3617d140ede6190faaae47c2df310c5141594a" - integrity sha512-vNj2HGFttyrBEExvyWsv82xCoRUHjRcLNo4XSfJfSSLU9hgZDWI4cDXWslCdzZbAqyM4ODqltYGdrC/eu5vApQ== +"@linode/design-language-system@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-1.2.0.tgz#e4ed25791744fd067c83129d9ae14a85ed27bb77" + integrity sha512-A9PMEYsy83sghAKw041VtRMGaJzCXrqXwgD12kT20mgzQtJACG04PFSWYxD86E/7PMYbXcbmKgF33bgbkppkYw== dependencies: "@tokens-studio/sd-transforms" "^0.12.2" + react "^17.0.2" + react-dom "^17.0.2" style-dictionary "^3.7.2" "@linode/eslint-plugin-cloud-manager@^0.0.3": From d4c864c12201b1277e7182431a8ebadfb7b92fa9 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Tue, 2 Jan 2024 21:06:30 -0500 Subject: [PATCH 11/42] Updates to chip palette and update endpoint palette to use darker error color --- .../LoadBalancerDetail/ServiceTargets/EndpointTable.tsx | 8 ++++---- packages/manager/src/foundations/themes/light.ts | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/ServiceTargets/EndpointTable.tsx b/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/ServiceTargets/EndpointTable.tsx index b41ef639fa9..b783906b503 100644 --- a/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/ServiceTargets/EndpointTable.tsx +++ b/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/ServiceTargets/EndpointTable.tsx @@ -65,17 +65,17 @@ export const EndpointTable = (props: Props) => { {linode?.label ?? endpoint.ip}:{endpoint.port} {fieldErrors.ip && ( - theme.palette.error.main}> + theme.palette.error.dark}> {fieldErrors.ip} )} {fieldErrors.port && ( - theme.palette.error.main}> + theme.palette.error.dark}> {fieldErrors.port} )} {fieldErrors.rate_capacity && ( - theme.palette.error.main}> + theme.palette.error.dark}> {fieldErrors.rate_capacity} )} @@ -83,7 +83,7 @@ export const EndpointTable = (props: Props) => { {endpoint.host} {fieldErrors.host && ( - theme.palette.error.main}> + theme.palette.error.dark}> {fieldErrors.host} )} diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 18aad8f60b1..bbc6ce78d14 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -473,6 +473,7 @@ export const lightTheme: ThemeOptions = { backgroundColor: Color.Brand[10], // TODO: This was the closest color according to our palette }, colorError: { + background: Color.Red[70], color: color.white, }, colorPrimary: { @@ -482,6 +483,7 @@ export const lightTheme: ThemeOptions = { color: color.white, }, colorSuccess: { + background: Color.Green[70], color: color.white, }, deleteIcon: { From dad32d63df7ce74ba03f181282059ba7ea873441 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Tue, 2 Jan 2024 21:24:34 -0500 Subject: [PATCH 12/42] Remove unnecessary background color for notice story --- packages/manager/src/components/Notice/Notice.stories.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/manager/src/components/Notice/Notice.stories.tsx b/packages/manager/src/components/Notice/Notice.stories.tsx index ffbc41e9042..1ffe5dc5281 100644 --- a/packages/manager/src/components/Notice/Notice.stories.tsx +++ b/packages/manager/src/components/Notice/Notice.stories.tsx @@ -95,7 +95,5 @@ const meta: Meta = { export default meta; const StyledWrapper = styled('div')(({ theme }) => ({ - backgroundColor: theme.color.grey2, - padding: theme.spacing(2), })); From 4c60b7c9ac6b440c07adccb9b19a1ec94af23746 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Thu, 4 Jan 2024 11:18:21 -0500 Subject: [PATCH 13/42] Update textfields, borders and outlines --- .../manager/src/foundations/themes/light.ts | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index bbc6ce78d14..195bbc658b5 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -1,4 +1,10 @@ -import { Button, Color } from '@linode/design-language-system'; +import { + Border, + Button, + Color, + Content, + Interaction, +} from '@linode/design-language-system'; import { ThemeOptions } from '@mui/material/styles'; import { breakpoints } from 'src/foundations/breakpoints'; @@ -413,8 +419,8 @@ export const lightTheme: ThemeOptions = { }, outlined: { '&:hover, &:focus': { - backgroundColor: Color.Neutrals[5], // TODO: This was the closest color according to our palette - border: `1px solid ${Color.Neutrals[30]}`, // TODO: This was the closest color according to our palette + backgroundColor: Color.Neutrals[5], + border: `1px solid ${Border.Normal}`, color: Color.Brand[80], }, backgroundColor: 'transparent', @@ -510,7 +516,7 @@ export const lightTheme: ThemeOptions = { }, root: { '&:focus': { - outline: `1px dotted ${Color.Neutrals[60]}`, // TODO: This was the closest color according to our palette + outline: `1px dotted ${Interaction.Border.Focus}`, }, '&:last-child': { marginRight: 0, @@ -732,33 +738,33 @@ export const lightTheme: ThemeOptions = { color: primaryColors.main, fontSize: 18, }, - '&$disabled': { - borderColor: Color.Neutrals[40], - color: 'rgba(0, 0, 0, 0.75)', - opacity: 0.5, + '&.Mui-disabled': { + backgroundColor: Interaction.Background.Disabled, + borderColor: Border.Normal, + color: Content.Text.Primary.Disabled, }, '&.Mui-error': { - borderColor: Color.Red[70], + borderColor: Interaction.Border.Error, }, '&.Mui-focused': { '& .select-option-icon': { paddingLeft: `30px !important`, }, - borderColor: primaryColors.main, + borderColor: Interaction.Border.Focus, boxShadow: `0 0 2px 1px ${Color.Neutrals[30]}`, }, '&.affirmative': { borderColor: Color.Green[70], }, alignItems: 'center', - backgroundColor: Color.Neutrals.White, - border: `1px solid ${Color.Neutrals[40]}`, + backgroundColor: Interaction.Background.Primary, + border: `1px solid ${Interaction.Border.Default}`, boxSizing: 'border-box', [breakpoints.down('xs')]: { maxWidth: '100%', width: '100%', }, - color: primaryColors.text, + color: Content.Text.Primary.Default, lineHeight: 1, maxWidth: inputMaxWidth, minHeight: 34, @@ -776,13 +782,13 @@ export const lightTheme: ThemeOptions = { [breakpoints.only('xs')]: { fontSize: '1rem', }, - color: Color.Neutrals[70], + color: Content.Icon.Primary.Default, fontSize: '0.9rem', }, [breakpoints.only('xs')]: { fontSize: '1rem', }, - color: Color.Neutrals[70], + color: Content.Icon.Primary.Default, fontSize: '0.9rem', whiteSpace: 'nowrap', }, @@ -932,7 +938,7 @@ export const lightTheme: ThemeOptions = { MuiPaper: { styleOverrides: { outlined: { - border: `1px solid ${Color.Neutrals[30]}`, + border: `1px solid ${Border.Normal}`, }, root: {}, rounded: { @@ -1247,7 +1253,7 @@ export const lightTheme: ThemeOptions = { color: textColors.tableHeader, }, '&:focus': { - outline: `1px dotted ${Color.Neutrals[60]}`, // TODO: This was the closest color according to our palette + outline: `1px dotted ${Interaction.Border.Focus}`, }, '&:hover': { color: primaryColors.main, From 1abe630eb8702d00955d826a33efbd0aab1732af Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Tue, 9 Jan 2024 09:58:46 -0500 Subject: [PATCH 14/42] Fix dark mode button --- packages/manager/src/foundations/themes/dark.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/manager/src/foundations/themes/dark.ts b/packages/manager/src/foundations/themes/dark.ts index 8aebcce3b7c..3dceecba5fe 100644 --- a/packages/manager/src/foundations/themes/dark.ts +++ b/packages/manager/src/foundations/themes/dark.ts @@ -189,6 +189,8 @@ export const darkTheme: ThemeOptions = { '&:hover, &:focus': { backgroundColor: '#226dc3', }, + backgroundColor: primaryColors.main, + color: primaryColors.text, }, outlined: { '&:hover, &:focus': { From d4f5e92348027425b343cffb8a94bb8653bc5a0d Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Tue, 9 Jan 2024 10:32:52 -0500 Subject: [PATCH 15/42] Revert input token changes --- packages/manager/src/foundations/themes/light.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 195bbc658b5..b0b8cc0ddd8 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -738,10 +738,10 @@ export const lightTheme: ThemeOptions = { color: primaryColors.main, fontSize: 18, }, - '&.Mui-disabled': { - backgroundColor: Interaction.Background.Disabled, + '&$disabled': { borderColor: Border.Normal, - color: Content.Text.Primary.Disabled, + color: 'rgba(0, 0, 0, 0.75)', + opacity: 0.5, }, '&.Mui-error': { borderColor: Interaction.Border.Error, @@ -750,21 +750,21 @@ export const lightTheme: ThemeOptions = { '& .select-option-icon': { paddingLeft: `30px !important`, }, - borderColor: Interaction.Border.Focus, + borderColor: primaryColors.main, boxShadow: `0 0 2px 1px ${Color.Neutrals[30]}`, }, '&.affirmative': { borderColor: Color.Green[70], }, alignItems: 'center', - backgroundColor: Interaction.Background.Primary, + backgroundColor: Color.Neutrals.White, border: `1px solid ${Interaction.Border.Default}`, boxSizing: 'border-box', [breakpoints.down('xs')]: { maxWidth: '100%', width: '100%', }, - color: Content.Text.Primary.Default, + color: primaryColors.text, lineHeight: 1, maxWidth: inputMaxWidth, minHeight: 34, From 45adc441a2386cb95a79feca015f5168f99bed34 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Wed, 17 Jan 2024 09:37:54 -0500 Subject: [PATCH 16/42] Revert border tokens and fix marketplace background --- .../components/SelectionCard/CardBase.styles.ts | 4 ++-- packages/manager/src/foundations/themes/light.ts | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/manager/src/components/SelectionCard/CardBase.styles.ts b/packages/manager/src/components/SelectionCard/CardBase.styles.ts index b07fe04d202..01e6d009a59 100644 --- a/packages/manager/src/components/SelectionCard/CardBase.styles.ts +++ b/packages/manager/src/components/SelectionCard/CardBase.styles.ts @@ -18,13 +18,13 @@ export const CardBaseGrid = styled(Grid, { width: 5, }, '&:hover': { - backgroundColor: props.checked ? theme.bg.lightBlue2 : theme.bg.main, + backgroundColor: props.checked ? theme.bg.lightBlue1 : theme.bg.main, borderColor: props.checked ? theme.palette.primary.main : theme.color.border2, }, alignItems: 'center', - backgroundColor: props.checked ? theme.bg.lightBlue2 : theme.bg.offWhite, + backgroundColor: props.checked ? theme.bg.lightBlue1 : theme.bg.offWhite, border: `1px solid ${theme.bg.main}`, borderColor: props.checked ? theme.palette.primary.main : undefined, height: '100%', diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 31a5440087f..60608632288 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -2,7 +2,6 @@ import { Border, Button, Color, - Content, Interaction, } from '@linode/design-language-system'; import { ThemeOptions } from '@mui/material/styles'; @@ -531,7 +530,7 @@ export const lightTheme: ThemeOptions = { }, root: { '&:focus': { - outline: `1px dotted ${Interaction.Border.Focus}`, + outline: `1px dotted ${Color.Neutrals[60]}`, }, '&:last-child': { marginRight: 0, @@ -754,7 +753,7 @@ export const lightTheme: ThemeOptions = { fontSize: 18, }, '&$disabled': { - borderColor: Border.Normal, + borderColor: Color.Neutrals[40], color: 'rgba(0, 0, 0, 0.75)', opacity: 0.5, }, @@ -773,7 +772,7 @@ export const lightTheme: ThemeOptions = { }, alignItems: 'center', backgroundColor: Color.Neutrals.White, - border: `1px solid ${Interaction.Border.Default}`, + border: `1px solid ${Color.Neutrals[40]}`, boxSizing: 'border-box', [breakpoints.down('xs')]: { maxWidth: '100%', @@ -797,13 +796,13 @@ export const lightTheme: ThemeOptions = { [breakpoints.only('xs')]: { fontSize: '1rem', }, - color: Content.Icon.Primary.Default, + color: Color.Neutrals[70], fontSize: '0.9rem', }, [breakpoints.only('xs')]: { fontSize: '1rem', }, - color: Content.Icon.Primary.Default, + color: Color.Neutrals[70], fontSize: '0.9rem', whiteSpace: 'nowrap', }, @@ -953,7 +952,7 @@ export const lightTheme: ThemeOptions = { MuiPaper: { styleOverrides: { outlined: { - border: `1px solid ${Border.Normal}`, + border: `1px solid ${Color.Neutrals[30]}`, }, root: {}, rounded: { @@ -1268,7 +1267,7 @@ export const lightTheme: ThemeOptions = { color: textColors.tableHeader, }, '&:focus': { - outline: `1px dotted ${Interaction.Border.Focus}`, + outline: `1px dotted ${Color.Neutrals[60]}`, }, '&:hover': { color: primaryColors.main, From 97c83f432dec6af349d2787be35286660848e443 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Tue, 13 Feb 2024 10:30:29 -0500 Subject: [PATCH 17/42] Fix darkmode --- .../manager/src/components/SelectionCard/CardBase.styles.ts | 4 ++-- packages/manager/src/foundations/themes/dark.ts | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/manager/src/components/SelectionCard/CardBase.styles.ts b/packages/manager/src/components/SelectionCard/CardBase.styles.ts index 01e6d009a59..b07fe04d202 100644 --- a/packages/manager/src/components/SelectionCard/CardBase.styles.ts +++ b/packages/manager/src/components/SelectionCard/CardBase.styles.ts @@ -18,13 +18,13 @@ export const CardBaseGrid = styled(Grid, { width: 5, }, '&:hover': { - backgroundColor: props.checked ? theme.bg.lightBlue1 : theme.bg.main, + backgroundColor: props.checked ? theme.bg.lightBlue2 : theme.bg.main, borderColor: props.checked ? theme.palette.primary.main : theme.color.border2, }, alignItems: 'center', - backgroundColor: props.checked ? theme.bg.lightBlue1 : theme.bg.offWhite, + backgroundColor: props.checked ? theme.bg.lightBlue2 : theme.bg.offWhite, border: `1px solid ${theme.bg.main}`, borderColor: props.checked ? theme.palette.primary.main : undefined, height: '100%', diff --git a/packages/manager/src/foundations/themes/dark.ts b/packages/manager/src/foundations/themes/dark.ts index 04ee8206512..96398e4a4d6 100644 --- a/packages/manager/src/foundations/themes/dark.ts +++ b/packages/manager/src/foundations/themes/dark.ts @@ -193,8 +193,6 @@ export const darkTheme: ThemeOptions = { backgroundColor: '#454b54', color: '#5c6470', }, - backgroundColor: primaryColors.main, - color: primaryColors.text, }, containedSecondary: { '&[aria-disabled="true"]': { From 3a8667f0cbd0e662fb0170225209737238d76dd9 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Thu, 2 May 2024 13:36:30 -0400 Subject: [PATCH 18/42] Dark mode tokens --- packages/manager/package.json | 2 +- .../src/components/Button/StyledLinkButton.ts | 13 +- .../src/components/DocsLink/DocsLink.tsx | 5 +- .../src/components/Table/Table.styles.ts | 1 - .../TableSortCell/TableSortCell.tsx | 1 - packages/manager/src/components/Tabs/Tab.tsx | 4 +- .../components/TextTooltip/TextTooltip.tsx | 7 +- .../manager/src/components/TooltipIcon.tsx | 12 +- .../manager/src/foundations/themes/dark.ts | 335 +++++++------ .../manager/src/foundations/themes/light.ts | 16 +- yarn.lock | 448 ++++++++++++------ 11 files changed, 521 insertions(+), 323 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index b367725c547..d7a263b00fb 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -17,7 +17,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@linode/api-v4": "*", - "@linode/design-language-system": "^2.1.0", + "@linode/design-language-system": "^2.3.0", "@linode/validation": "*", "@lukemorales/query-key-factory": "^1.3.4", "@mui/icons-material": "^5.14.7", diff --git a/packages/manager/src/components/Button/StyledLinkButton.ts b/packages/manager/src/components/Button/StyledLinkButton.ts index e72f116e7dd..1688a156f79 100644 --- a/packages/manager/src/components/Button/StyledLinkButton.ts +++ b/packages/manager/src/components/Button/StyledLinkButton.ts @@ -10,16 +10,5 @@ import { styled } from '@mui/material/styles'; export const StyledLinkButton = styled('button', { label: 'StyledLinkButton', })(({ theme }) => ({ - '&:hover': { - backgroundColor: 'transparent', - color: theme.palette.primary.main, - textDecoration: 'underline', - }, - background: 'none', - border: 'none', - color: theme.textColors.linkActiveLight, - cursor: 'pointer', - font: 'inherit', - minWidth: 0, - padding: 0, + ...theme.applyLinkStyles, })); diff --git a/packages/manager/src/components/DocsLink/DocsLink.tsx b/packages/manager/src/components/DocsLink/DocsLink.tsx index 405a483f46c..1f8127629e1 100644 --- a/packages/manager/src/components/DocsLink/DocsLink.tsx +++ b/packages/manager/src/components/DocsLink/DocsLink.tsx @@ -50,13 +50,10 @@ export const DocsLink = (props: DocsLinkProps) => { const StyledDocsLink = styled(Link, { label: 'StyledDocsLink', })(({ theme }) => ({ + ...theme.applyLinkStyles, '& svg': { marginRight: theme.spacing(), }, - '&:hover': { - color: theme.textColors.linkActiveLight, - textDecoration: 'underline', - }, alignItems: 'center', display: 'flex', fontFamily: theme.font.normal, diff --git a/packages/manager/src/components/Table/Table.styles.ts b/packages/manager/src/components/Table/Table.styles.ts index f6b70032f91..1375e1a7262 100644 --- a/packages/manager/src/components/Table/Table.styles.ts +++ b/packages/manager/src/components/Table/Table.styles.ts @@ -30,7 +30,6 @@ export const StyledTableWrapper = styled('div', { borderLeft: `1px solid ${theme.borderColors.borderTable}`, borderRight: `1px solid ${theme.borderColors.borderTable}`, borderTop: `2px solid ${theme.borderColors.borderTable}`, - color: theme.textColors.tableHeader, fontFamily: theme.font.bold, padding: '10px 15px', }, diff --git a/packages/manager/src/components/TableSortCell/TableSortCell.tsx b/packages/manager/src/components/TableSortCell/TableSortCell.tsx index fd7d860288b..257e1644a35 100644 --- a/packages/manager/src/components/TableSortCell/TableSortCell.tsx +++ b/packages/manager/src/components/TableSortCell/TableSortCell.tsx @@ -18,7 +18,6 @@ const useStyles = makeStyles()((theme: Theme) => ({ marginRight: 4, }, label: { - color: theme.textColors.tableHeader, fontSize: '.875rem', minHeight: 20, transition: 'none', diff --git a/packages/manager/src/components/Tabs/Tab.tsx b/packages/manager/src/components/Tabs/Tab.tsx index c940218ba07..ea65565187c 100644 --- a/packages/manager/src/components/Tabs/Tab.tsx +++ b/packages/manager/src/components/Tabs/Tab.tsx @@ -11,7 +11,7 @@ const useStyles = makeStyles()((theme: Theme) => ({ }, '&:hover': { backgroundColor: theme.color.grey7, - color: theme.palette.primary.main, + color: theme.textColors.linkHover, }, alignItems: 'center', borderBottom: '2px solid transparent', @@ -29,7 +29,7 @@ const useStyles = makeStyles()((theme: Theme) => ({ }, '&[data-reach-tab][data-selected]': { '&:hover': { - color: theme.palette.primary.main, + color: theme.textColors.linkHover, }, borderBottom: `3px solid ${theme.textColors.linkActiveLight}`, color: theme.textColors.headlineStatic, diff --git a/packages/manager/src/components/TextTooltip/TextTooltip.tsx b/packages/manager/src/components/TextTooltip/TextTooltip.tsx index fb51b2a4b5e..319302a8afa 100644 --- a/packages/manager/src/components/TextTooltip/TextTooltip.tsx +++ b/packages/manager/src/components/TextTooltip/TextTooltip.tsx @@ -67,10 +67,13 @@ export const TextTooltip = (props: TextTooltipProps) => { const StyledRootTooltip = styled(Tooltip, { label: 'StyledRootTooltip', })(({ theme }) => ({ + '&:hover': { + color: theme.textColors.linkHover, + }, borderRadius: 4, - color: theme.palette.primary.main, + color: theme.textColors.linkActiveLight, cursor: 'pointer', position: 'relative', - textDecoration: `underline dotted ${theme.palette.primary.main}`, + textDecoration: `underline dotted ${theme.textColors.linkActiveLight}`, textUnderlineOffset: 4, })); diff --git a/packages/manager/src/components/TooltipIcon.tsx b/packages/manager/src/components/TooltipIcon.tsx index ef6f08c53b7..1c2f3598e48 100644 --- a/packages/manager/src/components/TooltipIcon.tsx +++ b/packages/manager/src/components/TooltipIcon.tsx @@ -113,16 +113,16 @@ export const TooltipIcon = (props: TooltipIconProps) => { const sxRootStyle = { '&&': { - fill: '#888f91', - stroke: '#888f91', + fill: theme.color.grey4, + stroke: theme.color.grey4, strokeWidth: 0, }, '&:hover': { - color: '#3683dc', - fill: '#3683dc', - stroke: '#3683dc', + color: theme.palette.primary.main, + fill: theme.palette.primary.main, + stroke: theme.palette.primary.main, }, - color: '#888f91', + color: theme.color.grey4, height: 20, width: 20, }; diff --git a/packages/manager/src/foundations/themes/dark.ts b/packages/manager/src/foundations/themes/dark.ts index c17205f2ad7..310d04784f7 100644 --- a/packages/manager/src/foundations/themes/dark.ts +++ b/packages/manager/src/foundations/themes/dark.ts @@ -1,67 +1,75 @@ +import { + Action, + Button, + Color, + Select, +} from '@linode/design-language-system/themes/dark'; import { ThemeOptions } from '@mui/material/styles'; import { breakpoints } from 'src/foundations/breakpoints'; +import { latoWeb } from 'src/foundations/fonts'; const primaryColors = { - dark: '#2466b3', - divider: '#222222', - headline: '#f4f4f4', - light: '#4d99f1', - main: '#3683dc', - text: '#ffffff', - white: '#222', + dark: Color.Brand[90], + divider: Color.Neutrals.Black, + headline: Color.Neutrals[5], + light: Color.Brand[60], + main: Color.Brand[80], + text: Color.Neutrals.White, + white: Color.Neutrals.Black, }; export const customDarkModeOptions = { bg: { - app: '#3a3f46', - bgAccessRow: '#454b54', + app: Color.Neutrals[90], + bgAccessRow: Color.Neutrals[80], bgAccessRowTransparentGradient: 'rgb(69, 75, 84, .001)', - bgPaper: '#2e3238', - lightBlue1: '#222', - lightBlue2: '#364863', - main: '#2f3236', - mainContentBanner: '#23272b', - offWhite: '#444', - primaryNavPaper: '#2e3238', - tableHeader: '#33373e', - white: '#32363c', + bgPaper: Color.Neutrals[100], + lightBlue1: Color.Neutrals.Black, + lightBlue2: Color.Brand[60], + main: Color.Neutrals[100], + mainContentBanner: Color.Neutrals[100], + offWhite: Color.Neutrals[90], + primaryNavPaper: Color.Neutrals[100], + tableHeader: Color.Neutrals[100], + white: Color.Neutrals[100], }, borderColors: { - borderTable: '#3a3f46', - borderTypography: '#454b54', - divider: '#222', + borderTable: Color.Neutrals[90], + borderTypography: Color.Neutrals[80], + divider: Color.Neutrals.Black, }, color: { - black: '#ffffff', - blueDTwhite: '#fff', - border2: '#111', - border3: '#222', - boxShadow: '#222', - boxShadowDark: '#000', + black: Color.Neutrals.White, + blueDTwhite: Color.Neutrals.White, + border2: Color.Neutrals.Black, + border3: Color.Neutrals.Black, + boxShadow: 'rgba(0, 0, 0, 0.5)', + boxShadowDark: Color.Neutrals.Black, drawerBackdrop: 'rgba(0, 0, 0, 0.5)', - grey1: '#abadaf', - grey2: 'rgba(0, 0, 0, 0.2)', - grey3: '#999', - grey5: 'rgba(0, 0, 0, 0.2)', - grey6: '#606469', - grey7: '#2e3238', + grey1: Color.Neutrals[50], + grey2: Color.Neutrals[50], + grey3: Color.Neutrals[60], + grey5: Color.Neutrals[50], + grey6: Color.Neutrals[50], + grey7: Color.Neutrals[100], grey9: primaryColors.divider, headline: primaryColors.headline, - label: '#c9cacb', - offBlack: '#ffffff', - red: '#fb6d6d', - tableHeaderText: '#fff', - tagButton: '#364863', - tagIcon: '#9caec9', - white: '#32363c', + label: Color.Neutrals[40], + offBlack: Color.Neutrals.White, + red: Color.Red[70], + tableHeaderText: Color.Neutrals.White, + tagButton: Color.Brand[90], + tagIcon: Color.Neutrals.White, + white: Color.Neutrals[100], }, textColors: { - headlineStatic: '#e6e6e6', - linkActiveLight: '#74aae6', - tableHeader: '#888F91', - tableStatic: '#e6e6e6', - textAccessTable: '#acb0b4', + headlineStatic: Color.Neutrals[20], + linkActiveLight: Action.Primary.Default, + linkHover: Action.Primary.Hover, + tableHeader: Color.Neutrals[60], + tableStatic: Color.Neutrals[20], + textAccessTable: Color.Neutrals[50], }, } as const; @@ -71,7 +79,7 @@ const iconCircleAnimation = { transition: 'fill .2s ease-in-out .2s', }, '& .insidePath *': { - stroke: 'white', + stroke: Color.Neutrals.White, transition: 'fill .2s ease-in-out .2s, stroke .2s ease-in-out .2s', }, '& .outerCircle': { @@ -85,12 +93,12 @@ const iconCircleAnimation = { // Used for styling html buttons to look like our generic links const genericLinkStyle = { '&:hover': { - color: primaryColors.main, + color: Action.Primary.Hover, textDecoration: 'underline', }, background: 'none', border: 'none', - color: customDarkModeOptions.textColors.linkActiveLight, + color: Action.Primary.Default, cursor: 'pointer', font: 'inherit', padding: 0, @@ -157,10 +165,10 @@ export const darkTheme: ThemeOptions = { border: `1px solid ${primaryColors.main}`, }, loading: { - color: '#fff', + color: Color.Neutrals.White, }, noOptions: { - color: '#fff', + color: Color.Neutrals.White, }, tag: { '.MuiChip-deleteIcon': { color: primaryColors.text }, @@ -176,57 +184,87 @@ export const darkTheme: ThemeOptions = { MuiButton: { styleOverrides: { containedPrimary: { + // TODO: We can remove this after migration since we can define variants '&.loading': { - color: primaryColors.text, + backgroundColor: primaryColors.text, }, '&:active': { - backgroundColor: primaryColors.dark, + backgroundColor: Button.Primary.Pressed.Background, }, '&:disabled': { - backgroundColor: '#454b54', - color: '#5c6470', + backgroundColor: Button.Primary.Disabled.Background, + color: Button.Primary.Disabled.Text, }, '&:hover, &:focus': { - backgroundColor: '#226dc3', + backgroundColor: Button.Primary.Hover.Background, }, '&[aria-disabled="true"]': { - backgroundColor: '#454b54', - color: '#5c6470', + backgroundColor: 'rgba(0, 0, 0, 0.12)', + color: 'white', }, + backgroundColor: Button.Primary.Default.Background, + color: Button.Primary.Default.Text, + padding: '2px 20px', }, containedSecondary: { - '&[aria-disabled="true"]': { - color: '#c9cacb', + // TODO: We can remove this after migration since we can define variants + '&.loading': { + color: primaryColors.text, + }, + '&:active': { + backgroundColor: 'transparent', + color: Button.Secondary.Pressed.Text, + }, + '&:disabled': { + backgroundColor: 'transparent', + color: Button.Secondary.Disabled.Text, }, - }, - outlined: { '&:hover, &:focus': { backgroundColor: 'transparent', - border: '1px solid #fff', - color: '#fff', + color: Button.Secondary.Hover.Text, }, '&[aria-disabled="true"]': { - backgroundColor: '#454b54', - border: '1px solid rgba(255, 255, 255, 0.12)', - color: '#5c6470', + backgroundColor: 'transparent', + color: Button.Secondary.Disabled.Text, }, - color: customDarkModeOptions.textColors.linkActiveLight, + backgroundColor: 'transparent', + color: Button.Secondary.Default.Text, }, - root: { - '&.loading': { - color: primaryColors.text, + outlined: { + '&:active': { + backgroundColor: Button.Secondary.Pressed.Background, + borderColor: Button.Secondary.Pressed.Text, + color: Button.Secondary.Pressed.Text, }, - '&:disabled': { - backgroundColor: '#454b54', - color: '#5c6470', + '&:hover, &:focus': { + backgroundColor: Button.Secondary.Hover.Background, + border: `1px solid ${Button.Secondary.Hover.Border}`, + color: Button.Secondary.Hover.Text, }, - '&:hover': { - backgroundColor: '#000', + '&[aria-disabled="true"]': { + backgroundColor: Button.Secondary.Disabled.Background, + border: `1px solid ${Button.Secondary.Disabled.Border}`, + color: Button.Secondary.Disabled.Text, }, + backgroundColor: Button.Secondary.Default.Background, + border: `1px solid ${Button.Secondary.Default.Border}`, + color: Button.Secondary.Default.Text, + minHeight: 34, + }, + root: { '&[aria-disabled="true"]': { cursor: 'not-allowed', }, - color: primaryColors.main, + border: 'none', + borderRadius: 1, + cursor: 'pointer', + fontFamily: latoWeb.bold, + fontSize: '1rem', + lineHeight: 1, + minHeight: 34, + minWidth: 105, + textTransform: 'capitalize', + transition: 'none', }, }, }, @@ -247,7 +285,7 @@ export const darkTheme: ThemeOptions = { MuiCardHeader: { styleOverrides: { root: { - backgroundColor: 'rgba(0, 0, 0, 0.2)', + backgroundColor: Color.Neutrals[50], }, }, }, @@ -259,12 +297,12 @@ export const darkTheme: ThemeOptions = { styleOverrides: { clickable: { '&:focus': { - backgroundColor: '#374863', + backgroundColor: Color.Brand[60], }, '&:hover': { - backgroundColor: '#374863', + backgroundColor: Color.Brand[60], }, - backgroundColor: '#415d81', + backgroundColor: Color.Brand[50], }, colorInfo: { color: primaryColors.dark, @@ -284,14 +322,14 @@ export const darkTheme: ThemeOptions = { MuiDialog: { styleOverrides: { paper: { - boxShadow: '0 0 5px #222', + boxShadow: `0 0 5px ${Color.Neutrals[100]}`, }, }, }, MuiDialogTitle: { styleOverrides: { root: { - borderBottom: '1px solid #222', + borderBottom: `1px solid ${Color.Neutrals[100]}`, color: primaryColors.headline, }, }, @@ -299,7 +337,7 @@ export const darkTheme: ThemeOptions = { MuiDrawer: { styleOverrides: { paper: { - boxShadow: '0 0 5px #222', + boxShadow: `0 0 5px ${Color.Neutrals[100]}`, }, }, }, @@ -307,7 +345,7 @@ export const darkTheme: ThemeOptions = { styleOverrides: { root: { '&.copy > div': { - backgroundColor: '#2f3236', + backgroundColor: Color.Neutrals[100], }, }, }, @@ -317,7 +355,7 @@ export const darkTheme: ThemeOptions = { disabled: {}, label: { '&.Mui-disabled': { - color: '#aaa !important', + color: `${Color.Neutrals[50]} !important`, }, color: primaryColors.text, }, @@ -328,9 +366,9 @@ export const darkTheme: ThemeOptions = { styleOverrides: { root: { '&$error': { - color: '#fb6d6d', + color: Select.Error.HintText, }, - color: '#c9cacb', + color: Color.Neutrals[40], lineHeight: 1.25, }, }, @@ -339,15 +377,15 @@ export const darkTheme: ThemeOptions = { styleOverrides: { root: { '&$disabled': { - color: '#c9cacb', + color: Color.Neutrals[40], }, '&$error': { - color: '#c9cacb', + color: Color.Neutrals[40], }, '&.Mui-focused': { - color: '#c9cacb', + color: Color.Neutrals[40], }, - color: '#c9cacb', + color: Color.Neutrals[40], }, }, }, @@ -355,34 +393,47 @@ export const darkTheme: ThemeOptions = { styleOverrides: { disabled: {}, focused: {}, - input: { - '&.Mui-disabled': { - '-webkit-text-fill-color': 'unset !important', - borderColor: '#606469', - color: '#ccc !important', - opacity: 0.5, - }, - }, + input: {}, root: { '& svg': { - color: primaryColors.main, + color: Select.Default.Icon, }, '&.Mui-disabled': { - backgroundColor: '#444444', - borderColor: '#606469', - color: '#ccc !important', - opacity: 0.5, + '& svg': { + color: Select.Disabled.Icon, + }, + backgroundColor: Select.Disabled.Background, + borderColor: Select.Disabled.Border, + color: Select.Disabled.Text, }, '&.Mui-error': { - borderColor: '#fb6d6d', + '& svg': { + color: Select.Error.Icon, + }, + backgroundColor: Select.Error.Background, + borderColor: Select.Error.Border, + color: Select.Error.Text, }, '&.Mui-focused': { - borderColor: primaryColors.main, - boxShadow: '0 0 2px 1px #222', + '& svg': { + color: Select.Focus.Icon, + }, + backgroundColor: Select.Focus.Background, + borderColor: Select.Focus.Border, + boxShadow: `0 0 2px 1px ${Color.Neutrals[100]}`, + color: Select.Focus.Text, + }, + '&.Mui-hover': { + '& svg': { + color: Select.Hover.Icon, + }, + backgroundColor: Select.Hover.Background, + borderColor: Select.Hover.Border, + color: Select.Hover.Text, }, - backgroundColor: '#444', - border: '1px solid #222', - color: primaryColors.text, + backgroundColor: Select.Default.Background, + borderColor: Select.Default.Border, + color: Select.Default.Text, }, }, }, @@ -390,9 +441,9 @@ export const darkTheme: ThemeOptions = { styleOverrides: { root: { '& p': { - color: '#eee', + color: Color.Neutrals[20], }, - color: '#eee', + color: Color.Neutrals[20], }, }, }, @@ -425,7 +476,7 @@ export const darkTheme: ThemeOptions = { border: '1px solid rgba(0, 0, 0, 0.2)', }, root: { - backgroundColor: '#2e3238', + backgroundColor: Color.Neutrals[100], backgroundImage: 'none', // I have no idea why MUI defaults to setting a background image... }, }, @@ -433,7 +484,7 @@ export const darkTheme: ThemeOptions = { MuiPopover: { styleOverrides: { paper: { - boxShadow: '0 0 5px #222', + boxShadow: `0 0 5px ${Color.Neutrals[100]}`, }, }, }, @@ -454,14 +505,14 @@ export const darkTheme: ThemeOptions = { root: ({ theme }) => ({ '& .defaultFill': { '& circle': { - color: '#ccc', + color: Color.Neutrals[40], }, - color: '#55595c', - fill: '#53575a', + color: Color.Neutrals[80], + fill: Color.Neutrals[80], }, '&.Mui-disabled': { '& .defaultFill': { - color: '#ccc', + color: Color.Neutrals[40], opacity: 0.15, }, }, @@ -477,8 +528,8 @@ export const darkTheme: ThemeOptions = { MuiSnackbarContent: { styleOverrides: { root: { - backgroundColor: '#32363c', - boxShadow: '0 0 5px #222', + backgroundColor: Color.Neutrals[100], + boxShadow: `0 0 5px ${Color.Neutrals[100]}`, color: primaryColors.text, }, }, @@ -494,7 +545,7 @@ export const darkTheme: ThemeOptions = { }, }, track: { - backgroundColor: '#55595c', + backgroundColor: Color.Neutrals[80], }, }, }, @@ -502,16 +553,16 @@ export const darkTheme: ThemeOptions = { styleOverrides: { root: { '&$selected, &$selected:hover': { - color: '#fff', + color: Color.Neutrals.White, }, - color: '#fff', + color: Color.Neutrals.White, }, selected: {}, textColorPrimary: { '&$selected, &$selected:hover': { - color: '#fff', + color: Color.Neutrals.White, }, - color: '#fff', + color: Color.Neutrals.White, }, }, }, @@ -523,10 +574,10 @@ export const darkTheme: ThemeOptions = { }, root: { '& a': { - color: customDarkModeOptions.textColors.linkActiveLight, + color: Action.Primary.Default, }, '& a:hover': { - color: primaryColors.main, + color: Action.Primary.Hover, }, borderBottom: `1px solid ${primaryColors.divider}`, borderTop: `1px solid ${primaryColors.divider}`, @@ -539,7 +590,7 @@ export const darkTheme: ThemeOptions = { '&:before': { backgroundColor: 'rgba(0, 0, 0, 0.15) !important', }, - backgroundColor: '#32363c', + backgroundColor: Color.Neutrals[100], }, hover: { '& a': { @@ -548,14 +599,14 @@ export const darkTheme: ThemeOptions = { }, root: { '&:before': { - borderLeftColor: '#32363c', + borderLeftColor: Color.Neutrals[100], }, '&:hover, &:focus': { '&$hover': { backgroundColor: 'rgba(0, 0, 0, 0.1)', }, }, - backgroundColor: '#32363c', + backgroundColor: Color.Neutrals[100], }, }, }, @@ -563,23 +614,23 @@ export const darkTheme: ThemeOptions = { styleOverrides: { flexContainer: { '& $scrollButtons:first-of-type': { - color: '#222', + color: Color.Neutrals.Black, }, }, root: { - boxShadow: 'inset 0 -1px 0 #222', + boxShadow: `inset 0 -1px 0 ${Color.Neutrals[100]}`, }, scrollButtons: { - color: '#fff', + color: Color.Neutrals.White, }, }, }, MuiTooltip: { styleOverrides: { tooltip: { - backgroundColor: '#444', - boxShadow: '0 0 5px #222', - color: '#fff', + backgroundColor: Color.Neutrals[70], + boxShadow: `0 0 5px ${Color.Neutrals[100]}`, + color: Color.Neutrals.White, }, }, }, @@ -587,7 +638,7 @@ export const darkTheme: ThemeOptions = { styleOverrides: { root: { '& a': { - color: customDarkModeOptions.textColors.linkActiveLight, + color: Action.Primary.Default, }, '& a.black': { color: primaryColors.text, @@ -599,7 +650,7 @@ export const darkTheme: ThemeOptions = { color: primaryColors.text, }, '& a:hover': { - color: primaryColors.main, + color: Action.Primary.Hover, }, }, }, @@ -627,13 +678,13 @@ export const darkTheme: ThemeOptions = { palette: { background: { default: customDarkModeOptions.bg.app, - paper: '#2e3238', + paper: Color.Neutrals[100], }, divider: primaryColors.divider, error: { - dark: customDarkModeOptions.color.red, - light: customDarkModeOptions.color.red, - main: customDarkModeOptions.color.red, + dark: Color.Red[60], + light: Color.Red[10], + main: Color.Red[40], }, mode: 'dark', primary: primaryColors, diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index bd8ab2fc093..80419609c23 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -1,8 +1,10 @@ import { + Action, Border, Button, Color, Interaction, + Select, } from '@linode/design-language-system'; import { ThemeOptions } from '@mui/material/styles'; @@ -71,7 +73,8 @@ export const color = { export const textColors = { headlineStatic: Color.Neutrals[100], - linkActiveLight: Color.Brand[80], + linkActiveLight: Action.Primary.Default, + linkHover: Action.Primary.Hover, tableHeader: Color.Neutrals[60], tableStatic: Color.Neutrals[70], textAccessTable: Color.Neutrals[70], @@ -113,12 +116,12 @@ const iconCircleHoverEffect = { const genericLinkStyle = { '&:hover': { backgroundColor: 'transparent', - color: primaryColors.main, + color: Action.Primary.Hover, textDecoration: 'underline', }, background: 'none', border: 'none', - color: textColors.linkActiveLight, + color: Action.Primary.Default, cursor: 'pointer', font: 'inherit', minWidth: 0, @@ -681,7 +684,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { root: { '&$error': { - color: Color.Red[70], + color: Select.Error.HintText, }, fontSize: '0.875rem', lineHeight: 1.25, @@ -823,7 +826,7 @@ export const lightTheme: ThemeOptions = { styleOverrides: { input: { '&::placeholder': { - opacity: 0.42, + opacity: 1, }, height: 'auto', }, @@ -1274,9 +1277,6 @@ export const lightTheme: ThemeOptions = { transform: 'rotate(180deg)', }, root: { - '&.Mui-active': { - color: textColors.tableHeader, - }, '&:focus': { outline: `1px dotted ${Color.Neutrals[60]}`, }, diff --git a/yarn.lock b/yarn.lock index ffe26aeeb11..c418a873c9c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1283,6 +1283,40 @@ dependencies: cookie "^0.5.0" +"@bundled-es-modules/deepmerge@^4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@bundled-es-modules/deepmerge/-/deepmerge-4.3.1.tgz#e0ef866494125f64f6fb75adeffacedc25f2f31b" + integrity sha512-Rk453EklPUPC3NRWc3VUNI/SSUjdBaFoaQvFRmNBNtMHVtOFD5AntiWg5kEE1hqcPqedYFDzxE3ZcMYPcA195w== + dependencies: + deepmerge "^4.3.1" + +"@bundled-es-modules/glob@^10.3.13": + version "10.3.13" + resolved "https://registry.yarnpkg.com/@bundled-es-modules/glob/-/glob-10.3.13.tgz#162af7285f224cbeacd8112754babf80adc0b732" + integrity sha512-eK+st/vwMmQy0pVvHLa2nzsS+p6NkNVR34e8qfiuzpzS1he4bMU3ODl0gbyv4r9INq5x41GqvRmFr8PtNw4yRA== + dependencies: + buffer "^6.0.3" + events "^3.3.0" + glob "^10.3.10" + patch-package "^8.0.0" + path "^0.12.7" + stream "^0.0.2" + string_decoder "^1.3.0" + url "^0.11.1" + +"@bundled-es-modules/memfs@^4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@bundled-es-modules/memfs/-/memfs-4.8.1.tgz#0a37f5a7050eced8d03d3af81f44579548437fa6" + integrity sha512-9BodQuihWm3XJGKYuV/vXckK8Tkf9EDiT/au1NJeFUyBMe7EMYRtOqL9eLzrjqJSDJUFoGwQFHvraFHwR8cysQ== + dependencies: + assert "^2.0.0" + buffer "^6.0.3" + events "^3.3.0" + memfs "^4.8.1" + path "^0.12.7" + stream "^0.0.2" + util "^0.12.5" + "@bundled-es-modules/statuses@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@bundled-es-modules/statuses/-/statuses-1.0.1.tgz#761d10f44e51a94902c4da48675b71a76cc98872" @@ -1953,6 +1987,26 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jsonjoy.com/base64@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/base64/-/base64-1.1.1.tgz#a717fd8840f7bad49c7fe66cc65db8bcfc4c4dc5" + integrity sha512-LnFjVChaGY8cZVMwAIMjvA1XwQjZ/zIXHyh28IyJkyNkzof4Dkm1+KN9UIm3lHhREH4vs7XwZ0NpkZKnwOtEfg== + +"@jsonjoy.com/json-pack@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pack/-/json-pack-1.0.3.tgz#a68cbe3ccfd85d26cd763e4175fe90c9ee383d33" + integrity sha512-Q0SPAdmK6s5Fe3e1kcNvwNyk6e2+CxM8XZdGbf4abZG7nUO05KSie3/iX29loTBuY+75uVP6RixDSPVpotfzmQ== + dependencies: + "@jsonjoy.com/base64" "^1.1.1" + "@jsonjoy.com/util" "^1.1.2" + hyperdyperid "^1.2.0" + thingies "^1.20.0" + +"@jsonjoy.com/util@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/util/-/util-1.1.2.tgz#5072c27ecdb16d1ed7a2d125a1d0ed8aba01d652" + integrity sha512-HOGa9wtE6LEz2I5mMQ2pMSjth85PmD71kPbsecs02nEUq3/Kw0wRK3gmZn5BCEB8mFLXByqPxjHgApoMwIPMKQ== + "@kwsites/file-exists@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@kwsites/file-exists/-/file-exists-1.1.1.tgz#ad1efcac13e1987d8dbaf235ef3be5b0d96faa99" @@ -1965,15 +2019,15 @@ resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919" integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== -"@linode/design-language-system@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-2.1.0.tgz#ec5a124230bf059b75bde1dc054b929d64dda035" - integrity sha512-whGc/wF1MIin9GvC7V8Y3emrMuS98LdvyjzhuzglxQOe+986w0Pny3Vcks8/79RRAqjLWPt+xWkgDztDvbALlA== +"@linode/design-language-system@^2.3.0": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-2.3.1.tgz#b555c5e83ce17c458d3c2c4a66d48dcfa9098e56" + integrity sha512-pocFej1UiXlI9HebxVGFlpe8aLpFFwJIkjdOIZhEiHqGqV8JaQ+v2tuIcB5c68G+jJU4ckxbfcSBz1D3aLaP2g== dependencies: - "@tokens-studio/sd-transforms" "^0.12.2" + "@tokens-studio/sd-transforms" "^0.15.2" react "^17.0.2" react-dom "^17.0.2" - style-dictionary "^3.7.2" + style-dictionary "4.0.0-prerelease.25" "@linode/eslint-plugin-cloud-manager@^0.0.3": version "0.0.3" @@ -3199,24 +3253,24 @@ resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.5.2.tgz#db7257d727c891905947bd1c1a99da20e03c2ebd" integrity sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ== -"@tokens-studio/sd-transforms@^0.12.2": - version "0.12.2" - resolved "https://registry.yarnpkg.com/@tokens-studio/sd-transforms/-/sd-transforms-0.12.2.tgz#b0512e163d2a0d46f75426b6c4f431cda6c4f9e2" - integrity sha512-ugiAOuem35yQ9BZ87bSkG4zz0xUzrdZLOenSn6/gRrGwDW8x1sWJ8AZ1OZXqIxZIOEGyjmUofSBkhulgKE70JA== +"@tokens-studio/sd-transforms@^0.15.2": + version "0.15.2" + resolved "https://registry.yarnpkg.com/@tokens-studio/sd-transforms/-/sd-transforms-0.15.2.tgz#2cd374b89a1167d66a9c29c2779623103221fac7" + integrity sha512-0ryA1xdZ75cmneUZ/0UQIpzMFUyKPsfQgeu/jZguGFF7vB3/Yr+JsjGU/HFFvWtZfy0c4EQToCSHYwI0g13cBg== dependencies: - "@tokens-studio/types" "^0.2.4" + "@tokens-studio/types" "^0.4.0" color2k "^2.0.1" colorjs.io "^0.4.3" deepmerge "^4.3.1" - expr-eval "^2.0.2" + expr-eval-fork "^2.0.2" is-mergeable-object "^1.1.1" postcss-calc-ast-parser "^0.1.4" - style-dictionary "^3.8.0" + style-dictionary "^4.0.0-prerelease.22" -"@tokens-studio/types@^0.2.4": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@tokens-studio/types/-/types-0.2.5.tgz#fbddad1d0040f1316ee74dbd42a389f2f3d2fcbc" - integrity sha512-pJ0zWxGnEjca4dznFIHC9/oXuovu3DKHUhLDNJVzTRZEVXhWkIRIUbjDwIRihxBr39c776W+3thYvWMgChT0Rw== +"@tokens-studio/types@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@tokens-studio/types/-/types-0.4.0.tgz#882088f22201e8f9112279f3ebacf8557213c615" + integrity sha512-rp5t0NP3Kai+Z+euGfHRUMn3AvPQ0bd9Dd2qbtfgnTvujxM5QYVr4psx/mwrVwA3NS9829mE6cD3ln+PIaptBA== "@tootallnate/once@2": version "2.0.0" @@ -4897,6 +4951,14 @@ buffer@^5.5.0, buffer@^5.6.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + bundle-require@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-4.0.2.tgz#65fc74ff14eabbba36d26c9a6161bd78fff6b29e" @@ -4934,6 +4996,17 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6: get-intrinsic "^1.2.3" set-function-length "^1.2.0" +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -4958,14 +5031,6 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" - integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== - dependencies: - pascal-case "^3.1.2" - tslib "^2.0.3" - camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" @@ -4995,15 +5060,6 @@ canvg@^3.0.6: stackblur-canvas "^2.0.0" svg-pathdata "^6.0.3" -capital-case@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" - integrity sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - upper-case-first "^2.0.2" - card-validator@8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/card-validator/-/card-validator-8.1.1.tgz#418f5f32435553fb9ca2a02634ad413bb38697a9" @@ -5051,7 +5107,7 @@ chalk@5.0.1: resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6" integrity sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w== -chalk@5.3.0, chalk@^5.0.1, chalk@^5.2.0: +chalk@5.3.0, chalk@^5.0.1, chalk@^5.2.0, chalk@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== @@ -5081,23 +5137,10 @@ chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -change-case@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/change-case/-/change-case-4.1.2.tgz#fedfc5f136045e2398c0410ee441f95704641e12" - integrity sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A== - dependencies: - camel-case "^4.1.2" - capital-case "^1.0.4" - constant-case "^3.0.4" - dot-case "^3.0.4" - header-case "^2.0.4" - no-case "^3.0.4" - param-case "^3.0.4" - pascal-case "^3.1.2" - path-case "^3.0.4" - sentence-case "^3.0.4" - snake-case "^3.0.4" - tslib "^2.0.3" +change-case@^5.3.0: + version "5.4.4" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-5.4.4.tgz#0d52b507d8fb8f204343432381d1a6d7bff97a02" + integrity sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w== change-emitter@^0.1.2: version "0.1.6" @@ -5442,15 +5485,6 @@ consola@^3.2.3: resolved "https://registry.yarnpkg.com/consolidated-events/-/consolidated-events-2.0.2.tgz#da8d8f8c2b232831413d9e190dc11669c79f4a91" integrity sha512-2/uRVMdRypf5z/TW/ncD/66l75P5hH2vM/GR8Jf8HLc2xnfJtmina6F6du8+v4Z2vTrMo7jC+W1tmEEuuELgkQ== -constant-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-3.0.4.tgz#3b84a9aeaf4cf31ec45e6bf5de91bdfb0589faf1" - integrity sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - upper-case "^2.0.2" - content-disposition@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" @@ -5962,6 +5996,15 @@ define-data-property@^1.0.1, define-data-property@^1.1.2: gopd "^1.0.1" has-property-descriptors "^1.0.1" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" @@ -6191,6 +6234,11 @@ electron-to-chromium@^1.4.648: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.665.tgz#681700bd590b0e5a3be66e3e2874ce62abcf5da5" integrity sha512-UpyCWObBoD+nSZgOC2ToaIdZB0r9GhqT2WahPKiSki6ckkSuKhQNso8V2PrFcHBMleI/eqbKgVQgVC4Wni4ilw== +emitter-component@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-component/-/emitter-component-1.1.2.tgz#d65af5833dc7c682fd0ade35f902d16bc4bad772" + integrity sha512-QdXO3nXOzZB4pAjM0n6ZE+R9/+kPpECA/XSELIcc54NeYVnBqIk+4DFiBgK+8QbV3mdvTG6nedl7dTYgO+5wDw== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -6293,6 +6341,13 @@ es-abstract@^1.22.1, es-abstract@^1.22.3: unbox-primitive "^1.0.2" which-typed-array "^1.1.13" +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + es-errors@^1.0.0, es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" @@ -6838,6 +6893,11 @@ eventemitter3@^5.0.1: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== +events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + execa@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" @@ -6918,10 +6978,10 @@ executable@^4.1.1: dependencies: pify "^2.2.0" -expr-eval@^2.0.2: +expr-eval-fork@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/expr-eval/-/expr-eval-2.0.2.tgz#fa6f044a7b0c93fde830954eb9c5b0f7fbc7e201" - integrity sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg== + resolved "https://registry.yarnpkg.com/expr-eval-fork/-/expr-eval-fork-2.0.2.tgz#97136ac0a8178522055500f55d3d3c5ad54f400d" + integrity sha512-NaAnObPVwHEYrODd7Jzp3zzT9pgTAlUUL4MZiZu9XAYPDpx89cPsfyEImFb2XY0vQNbrqg2CG7CLiI+Rs3seaQ== express@^4.17.3: version "4.19.2" @@ -7349,15 +7409,6 @@ fs-extra@>=5, fs-extra@^11.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" - integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-extra@^9.0.0, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -7682,6 +7733,13 @@ has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1: dependencies: get-intrinsic "^1.2.2" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" @@ -7732,14 +7790,6 @@ he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -header-case@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/header-case/-/header-case-2.0.4.tgz#5a42e63b55177349cf405beb8d775acabb92c063" - integrity sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q== - dependencies: - capital-case "^1.0.4" - tslib "^2.0.3" - headers-polyfill@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-4.0.2.tgz#9115a76eee3ce8fbf95b6e3c6bf82d936785b44a" @@ -7905,6 +7955,11 @@ husky@^3.0.1: run-node "^1.0.0" slash "^3.0.0" +hyperdyperid@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hyperdyperid/-/hyperdyperid-1.2.0.tgz#59668d323ada92228d2a869d3e474d5a33b69e6b" + integrity sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A== + iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -7919,7 +7974,7 @@ iconv-lite@0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ieee754@^1.1.13: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -7978,6 +8033,11 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== + ini@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" @@ -8275,7 +8335,7 @@ is-path-inside@^3.0.2, is-path-inside@^3.0.3: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== -is-plain-obj@^4.0.0: +is-plain-obj@^4.0.0, is-plain-obj@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== @@ -8629,6 +8689,16 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json-stable-stringify@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" + integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== + dependencies: + call-bind "^1.0.5" + isarray "^2.0.5" + jsonify "^0.0.1" + object-keys "^1.1.1" + json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -8639,7 +8709,7 @@ json5@^2.2.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonc-parser@^3.0.0, jsonc-parser@^3.2.0: +jsonc-parser@^3.2.0: version "3.2.1" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== @@ -8653,6 +8723,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jsonify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== + jspdf-autotable@^3.5.14: version "3.8.1" resolved "https://registry.yarnpkg.com/jspdf-autotable/-/jspdf-autotable-3.8.1.tgz#e4d9b62356a412024e8f08e84fdeb5b85e1383b5" @@ -9292,6 +9367,16 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" +memfs@^4.8.1: + version "4.9.2" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-4.9.2.tgz#42e7b48207268dad8c9c48ea5d4952c5d3840433" + integrity sha512-f16coDZlTG1jskq3mxarwB+fGRrd0uXWt+o1WIhRfOwbXQZqUDsTVxQBFK9JjRQHblg8eAG2JSbprDXKjc7ijQ== + dependencies: + "@jsonjoy.com/json-pack" "^1.0.3" + "@jsonjoy.com/util" "^1.1.2" + sonic-forest "^1.0.0" + tslib "^2.0.0" + memoize-one@^5.0.0, memoize-one@^5.1.1: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -10226,14 +10311,6 @@ pako@~0.2.0: resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" integrity sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA== -param-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" - integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -10276,14 +10353,6 @@ parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== -pascal-case@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" - integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - patch-package@^7.0.0: version "7.0.2" resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-7.0.2.tgz#c01589bb6964854b5210506a5845d47900641f5a" @@ -10304,13 +10373,26 @@ patch-package@^7.0.0: tmp "^0.0.33" yaml "^2.2.2" -path-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/path-case/-/path-case-3.0.4.tgz#9168645334eb942658375c56f80b4c0cb5f82c6f" - integrity sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg== +patch-package@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61" + integrity sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA== dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" + "@yarnpkg/lockfile" "^1.1.0" + chalk "^4.1.2" + ci-info "^3.7.0" + cross-spawn "^7.0.3" + find-yarn-workspace-root "^2.0.0" + fs-extra "^9.0.0" + json-stable-stringify "^1.0.2" + klaw-sync "^6.0.0" + minimist "^1.2.6" + open "^7.4.2" + rimraf "^2.6.3" + semver "^7.5.3" + slash "^2.0.0" + tmp "^0.0.33" + yaml "^2.2.2" path-exists@^3.0.0: version "3.0.0" @@ -10394,6 +10476,19 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +path-unified@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/path-unified/-/path-unified-0.1.0.tgz#fd751e787ab019a88cdf5cecbd7e5e4711c66c7d" + integrity sha512-/Oaz9ZJforrkmFrwkR/AcvjVsCAwGSJHO0X6O6ISj8YeFbATjIEBXLDcZfnK3MO4uvCBrJTdVIxdOc79PMqSdg== + +path@^0.12.7: + version "0.12.7" + resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" + integrity sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q== + dependencies: + process "^0.11.1" + util "^0.10.3" + pathe@^1.1.0, pathe@^1.1.1, pathe@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" @@ -10607,7 +10702,7 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.10: +process@^0.11.1, process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== @@ -10704,7 +10799,7 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" -punycode@^1.3.2: +punycode@^1.3.2, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== @@ -10748,6 +10843,13 @@ qs@^6.10.0: dependencies: side-channel "^1.0.4" +qs@^6.11.2: + version "6.12.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.1.tgz#39422111ca7cbdb70425541cba20c7d7b216599a" + integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== + dependencies: + side-channel "^1.0.6" + querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -11723,15 +11825,6 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" -sentence-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-3.0.4.tgz#3645a7b8c117c787fde8702056225bb62a45131f" - integrity sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - upper-case-first "^2.0.2" - serve-handler@6.1.5: version "6.1.5" resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.5.tgz#a4a0964f5c55c7e37a02a633232b6f0d6f068375" @@ -11790,6 +11883,18 @@ set-function-length@^1.2.0: gopd "^1.0.1" has-property-descriptors "^1.0.1" +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + set-function-name@^2.0.0, set-function-name@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" @@ -11855,6 +11960,16 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + siginfo@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" @@ -11946,6 +12061,13 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" +sonic-forest@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/sonic-forest/-/sonic-forest-1.0.2.tgz#d80aa621d1cffe75a606ca44789ccff30f5b9ce6" + integrity sha512-2rICdwIJi5kVlehMUVtJeHn3ohh5YZV4pDv0P0c1M11cRz/gXNViItpM94HQwfvnXuzybpqK0LZJgTa3lEwtAw== + dependencies: + tree-dump "^1.0.0" + source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" @@ -12090,6 +12212,13 @@ stream-shift@^1.0.0: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== +stream@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stream/-/stream-0.0.2.tgz#7f5363f057f6592c5595f00bc80a27f5cec1f0ef" + integrity sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g== + dependencies: + emitter-component "^1.1.1" + strict-event-emitter@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93" @@ -12195,7 +12324,7 @@ string.prototype.trimstart@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" -string_decoder@^1.1.1: +string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -12295,20 +12424,40 @@ strip-literal@^1.3.0: dependencies: acorn "^8.10.0" -style-dictionary@^3.7.2, style-dictionary@^3.8.0: - version "3.9.2" - resolved "https://registry.yarnpkg.com/style-dictionary/-/style-dictionary-3.9.2.tgz#5b3ecd4af28a64f4855db71c90d24fd288f27318" - integrity sha512-M2pcQ6hyRtqHOh+NyT6T05R3pD/gwNpuhREBKvxC1En0vyywx+9Wy9nXWT1SZ9ePzv1vAo65ItnpA16tT9ZUCg== +style-dictionary@4.0.0-prerelease.25: + version "4.0.0-prerelease.25" + resolved "https://registry.yarnpkg.com/style-dictionary/-/style-dictionary-4.0.0-prerelease.25.tgz#df3d552e4324a277c13880e377f6be756db6db61" + integrity sha512-1dqKBBSvGbXPH2WFLUqqZBrmLnuNyXRkUOG1SEGJ0vDVrx+o4guOcx5aIBI9sLz2pyL7B8Yo0r4FizltFPi9WA== dependencies: - chalk "^4.0.0" - change-case "^4.1.2" + "@bundled-es-modules/deepmerge" "^4.3.1" + "@bundled-es-modules/glob" "^10.3.13" + "@bundled-es-modules/memfs" "^4.8.1" + chalk "^5.3.0" + change-case "^5.3.0" commander "^8.3.0" - fs-extra "^10.0.0" - glob "^10.3.10" + is-plain-obj "^4.1.0" json5 "^2.2.2" - jsonc-parser "^3.0.0" - lodash "^4.17.15" - tinycolor2 "^1.4.1" + lodash-es "^4.17.21" + patch-package "^8.0.0" + path-unified "^0.1.0" + tinycolor2 "^1.6.0" + +style-dictionary@^4.0.0-prerelease.22: + version "4.0.0-prerelease.26" + resolved "https://registry.yarnpkg.com/style-dictionary/-/style-dictionary-4.0.0-prerelease.26.tgz#005c393d12ba1678171a060b60c9a3bc16d4231a" + integrity sha512-pg/0accikT+2suJX9YPnJKBqU4wTJ9qtWD6cGl21TZdE9Ub7z1VzoIj7u5PdSK5355FHuri+yjOfzu+bLnMXdQ== + dependencies: + "@bundled-es-modules/deepmerge" "^4.3.1" + "@bundled-es-modules/glob" "^10.3.13" + "@bundled-es-modules/memfs" "^4.8.1" + chalk "^5.3.0" + change-case "^5.3.0" + commander "^8.3.0" + is-plain-obj "^4.1.0" + json5 "^2.2.2" + patch-package "^8.0.0" + path-unified "^0.1.0" + tinycolor2 "^1.6.0" stylis@4.2.0: version "4.2.0" @@ -12496,6 +12645,11 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +thingies@^1.20.0: + version "1.21.0" + resolved "https://registry.yarnpkg.com/thingies/-/thingies-1.21.0.tgz#e80fbe58fd6fdaaab8fad9b67bd0a5c943c445c1" + integrity sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g== + throttle-debounce@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.3.0.tgz#fd31865e66502071e411817e241465b3e9c372e2" @@ -12539,7 +12693,7 @@ tinybench@^2.5.1: resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.6.0.tgz#1423284ee22de07c91b3752c048d2764714b341b" integrity sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA== -tinycolor2@^1.4.1: +tinycolor2@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.6.0.tgz#f98007460169b0263b97072c5ae92484ce02d09e" integrity sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw== @@ -12634,6 +12788,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tree-dump@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tree-dump/-/tree-dump-1.0.1.tgz#b448758da7495580e6b7830d6b7834fca4c45b96" + integrity sha512-WCkcRBVPSlHHq1dc/px9iOfqklvzCbdRwvlNfxGZsrHqf6aZttfPrd7DJTt6oR10dwUfpFFQeVTkPbBIZxX/YA== + tree-kill@^1.2.1, tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" @@ -13016,20 +13175,6 @@ update-check@1.5.4: registry-auth-token "3.3.2" registry-url "3.1.0" -upper-case-first@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-2.0.2.tgz#992c3273f882abd19d1e02894cc147117f844324" - integrity sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg== - dependencies: - tslib "^2.0.3" - -upper-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-2.0.2.tgz#d89810823faab1df1549b7d97a76f8662bae6f7a" - integrity sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg== - dependencies: - tslib "^2.0.3" - uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -13045,6 +13190,14 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" +url@^0.11.1: + version "0.11.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" + integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== + dependencies: + punycode "^1.4.1" + qs "^6.11.2" + use-memo-one@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99" @@ -13060,6 +13213,13 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +util@^0.10.3: + version "0.10.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== + dependencies: + inherits "2.0.3" + util@^0.12.4, util@^0.12.5: version "0.12.5" resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" From 660786d300ab925597f401907e5d5a6b6ffc0d81 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Thu, 2 May 2024 13:45:50 -0400 Subject: [PATCH 19/42] More dark mode fixes --- .../manager/src/components/SelectionCard/CardBase.styles.ts | 2 +- packages/manager/src/foundations/themes/dark.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/manager/src/components/SelectionCard/CardBase.styles.ts b/packages/manager/src/components/SelectionCard/CardBase.styles.ts index b07fe04d202..b258f3a9821 100644 --- a/packages/manager/src/components/SelectionCard/CardBase.styles.ts +++ b/packages/manager/src/components/SelectionCard/CardBase.styles.ts @@ -1,5 +1,5 @@ -import Grid from '@mui/material/Unstable_Grid2'; import { styled } from '@mui/material/styles'; +import Grid from '@mui/material/Unstable_Grid2'; import type { CardBaseProps } from './CardBase'; diff --git a/packages/manager/src/foundations/themes/dark.ts b/packages/manager/src/foundations/themes/dark.ts index 310d04784f7..f7081de1823 100644 --- a/packages/manager/src/foundations/themes/dark.ts +++ b/packages/manager/src/foundations/themes/dark.ts @@ -26,7 +26,7 @@ export const customDarkModeOptions = { bgAccessRowTransparentGradient: 'rgb(69, 75, 84, .001)', bgPaper: Color.Neutrals[100], lightBlue1: Color.Neutrals.Black, - lightBlue2: Color.Brand[60], + lightBlue2: Color.Brand[100], main: Color.Neutrals[100], mainContentBanner: Color.Neutrals[100], offWhite: Color.Neutrals[90], From 2da593312ecfdfe3cdbf2bfd9c581cfc50d9d6f4 Mon Sep 17 00:00:00 2001 From: Alban Bailly Date: Thu, 2 May 2024 15:42:55 -0400 Subject: [PATCH 20/42] Update MuiFormHelperText dark mode color --- packages/manager/src/foundations/themes/dark.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/manager/src/foundations/themes/dark.ts b/packages/manager/src/foundations/themes/dark.ts index f7081de1823..36cab8592ba 100644 --- a/packages/manager/src/foundations/themes/dark.ts +++ b/packages/manager/src/foundations/themes/dark.ts @@ -365,7 +365,7 @@ export const darkTheme: ThemeOptions = { MuiFormHelperText: { styleOverrides: { root: { - '&$error': { + '&[class*="error"]': { color: Select.Error.HintText, }, color: Color.Neutrals[40], From 6c30f4b6eb4f2735003f42d99cde3cfc26905356 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Thu, 2 May 2024 17:41:08 -0400 Subject: [PATCH 21/42] Yarn lock --- yarn.lock | 396 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 390 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index fdda46fe6a1..5540a0427ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1283,6 +1283,40 @@ dependencies: cookie "^0.5.0" +"@bundled-es-modules/deepmerge@^4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@bundled-es-modules/deepmerge/-/deepmerge-4.3.1.tgz#e0ef866494125f64f6fb75adeffacedc25f2f31b" + integrity sha512-Rk453EklPUPC3NRWc3VUNI/SSUjdBaFoaQvFRmNBNtMHVtOFD5AntiWg5kEE1hqcPqedYFDzxE3ZcMYPcA195w== + dependencies: + deepmerge "^4.3.1" + +"@bundled-es-modules/glob@^10.3.13": + version "10.3.13" + resolved "https://registry.yarnpkg.com/@bundled-es-modules/glob/-/glob-10.3.13.tgz#162af7285f224cbeacd8112754babf80adc0b732" + integrity sha512-eK+st/vwMmQy0pVvHLa2nzsS+p6NkNVR34e8qfiuzpzS1he4bMU3ODl0gbyv4r9INq5x41GqvRmFr8PtNw4yRA== + dependencies: + buffer "^6.0.3" + events "^3.3.0" + glob "^10.3.10" + patch-package "^8.0.0" + path "^0.12.7" + stream "^0.0.2" + string_decoder "^1.3.0" + url "^0.11.1" + +"@bundled-es-modules/memfs@^4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@bundled-es-modules/memfs/-/memfs-4.8.1.tgz#0a37f5a7050eced8d03d3af81f44579548437fa6" + integrity sha512-9BodQuihWm3XJGKYuV/vXckK8Tkf9EDiT/au1NJeFUyBMe7EMYRtOqL9eLzrjqJSDJUFoGwQFHvraFHwR8cysQ== + dependencies: + assert "^2.0.0" + buffer "^6.0.3" + events "^3.3.0" + memfs "^4.8.1" + path "^0.12.7" + stream "^0.0.2" + util "^0.12.5" + "@bundled-es-modules/statuses@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@bundled-es-modules/statuses/-/statuses-1.0.1.tgz#761d10f44e51a94902c4da48675b71a76cc98872" @@ -1958,6 +1992,26 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jsonjoy.com/base64@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/base64/-/base64-1.1.1.tgz#a717fd8840f7bad49c7fe66cc65db8bcfc4c4dc5" + integrity sha512-LnFjVChaGY8cZVMwAIMjvA1XwQjZ/zIXHyh28IyJkyNkzof4Dkm1+KN9UIm3lHhREH4vs7XwZ0NpkZKnwOtEfg== + +"@jsonjoy.com/json-pack@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pack/-/json-pack-1.0.3.tgz#a68cbe3ccfd85d26cd763e4175fe90c9ee383d33" + integrity sha512-Q0SPAdmK6s5Fe3e1kcNvwNyk6e2+CxM8XZdGbf4abZG7nUO05KSie3/iX29loTBuY+75uVP6RixDSPVpotfzmQ== + dependencies: + "@jsonjoy.com/base64" "^1.1.1" + "@jsonjoy.com/util" "^1.1.2" + hyperdyperid "^1.2.0" + thingies "^1.20.0" + +"@jsonjoy.com/util@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/util/-/util-1.1.2.tgz#5072c27ecdb16d1ed7a2d125a1d0ed8aba01d652" + integrity sha512-HOGa9wtE6LEz2I5mMQ2pMSjth85PmD71kPbsecs02nEUq3/Kw0wRK3gmZn5BCEB8mFLXByqPxjHgApoMwIPMKQ== + "@kwsites/file-exists@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@kwsites/file-exists/-/file-exists-1.1.1.tgz#ad1efcac13e1987d8dbaf235ef3be5b0d96faa99" @@ -1970,6 +2024,16 @@ resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919" integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== +"@linode/design-language-system@^2.3.0": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@linode/design-language-system/-/design-language-system-2.3.1.tgz#b555c5e83ce17c458d3c2c4a66d48dcfa9098e56" + integrity sha512-pocFej1UiXlI9HebxVGFlpe8aLpFFwJIkjdOIZhEiHqGqV8JaQ+v2tuIcB5c68G+jJU4ckxbfcSBz1D3aLaP2g== + dependencies: + "@tokens-studio/sd-transforms" "^0.15.2" + react "^17.0.2" + react-dom "^17.0.2" + style-dictionary "4.0.0-prerelease.25" + "@linode/eslint-plugin-cloud-manager@^0.0.3": version "0.0.3" resolved "https://registry.yarnpkg.com/@linode/eslint-plugin-cloud-manager/-/eslint-plugin-cloud-manager-0.0.3.tgz#dcb78ab36065bf0fb71106a586c1f3f88dbf840a" @@ -3194,6 +3258,25 @@ resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.5.2.tgz#db7257d727c891905947bd1c1a99da20e03c2ebd" integrity sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ== +"@tokens-studio/sd-transforms@^0.15.2": + version "0.15.2" + resolved "https://registry.yarnpkg.com/@tokens-studio/sd-transforms/-/sd-transforms-0.15.2.tgz#2cd374b89a1167d66a9c29c2779623103221fac7" + integrity sha512-0ryA1xdZ75cmneUZ/0UQIpzMFUyKPsfQgeu/jZguGFF7vB3/Yr+JsjGU/HFFvWtZfy0c4EQToCSHYwI0g13cBg== + dependencies: + "@tokens-studio/types" "^0.4.0" + color2k "^2.0.1" + colorjs.io "^0.4.3" + deepmerge "^4.3.1" + expr-eval-fork "^2.0.2" + is-mergeable-object "^1.1.1" + postcss-calc-ast-parser "^0.1.4" + style-dictionary "^4.0.0-prerelease.22" + +"@tokens-studio/types@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@tokens-studio/types/-/types-0.4.0.tgz#882088f22201e8f9112279f3ebacf8557213c615" + integrity sha512-rp5t0NP3Kai+Z+euGfHRUMn3AvPQ0bd9Dd2qbtfgnTvujxM5QYVr4psx/mwrVwA3NS9829mE6cD3ln+PIaptBA== + "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" @@ -4904,6 +4987,14 @@ buffer@^5.5.0, buffer@^5.6.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + bundle-require@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-4.0.2.tgz#65fc74ff14eabbba36d26c9a6161bd78fff6b29e" @@ -4941,6 +5032,17 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6: get-intrinsic "^1.2.3" set-function-length "^1.2.0" +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -5041,7 +5143,7 @@ chalk@5.0.1: resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6" integrity sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w== -chalk@5.3.0, chalk@^5.0.1, chalk@^5.2.0: +chalk@5.3.0, chalk@^5.0.1, chalk@^5.2.0, chalk@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== @@ -5071,6 +5173,11 @@ chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +change-case@^5.3.0: + version "5.4.4" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-5.4.4.tgz#0d52b507d8fb8f204343432381d1a6d7bff97a02" + integrity sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w== + change-emitter@^0.1.2: version "0.1.6" resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515" @@ -5312,11 +5419,21 @@ color-name@^1.0.0, color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color2k@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/color2k/-/color2k-2.0.3.tgz#a771244f6b6285541c82aa65ff0a0c624046e533" + integrity sha512-zW190nQTIoXcGCaU08DvVNFTmQhUpnJfVuAKfWqUQkflXKpaDdpaYoM0iluLS9lgJNHyBF58KKA2FBEwkD7wog== + colorette@^2.0.16, colorette@^2.0.20: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== +colorjs.io@^0.4.3: + version "0.4.5" + resolved "https://registry.yarnpkg.com/colorjs.io/-/colorjs.io-0.4.5.tgz#7775f787ff90aca7a38f6edb7b7c0f8cce1e6418" + integrity sha512-yCtUNCmge7llyfd/Wou19PMAcf5yC3XXhgFoAh6zsO2pGswhUPBaaUh8jzgHnXtXuZyFKzXZNAnyF5i+apICow== + combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -5339,6 +5456,11 @@ commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== +commander@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + common-tags@^1.8.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -5880,6 +6002,11 @@ deepmerge@^2.1.1: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" integrity sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA== +deepmerge@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + default-browser-id@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" @@ -5905,6 +6032,15 @@ define-data-property@^1.0.1, define-data-property@^1.1.2: gopd "^1.0.1" has-property-descriptors "^1.0.1" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" @@ -6109,6 +6245,11 @@ electron-to-chromium@^1.4.648: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.665.tgz#681700bd590b0e5a3be66e3e2874ce62abcf5da5" integrity sha512-UpyCWObBoD+nSZgOC2ToaIdZB0r9GhqT2WahPKiSki6ckkSuKhQNso8V2PrFcHBMleI/eqbKgVQgVC4Wni4ilw== +emitter-component@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-component/-/emitter-component-1.1.2.tgz#d65af5833dc7c682fd0ade35f902d16bc4bad772" + integrity sha512-QdXO3nXOzZB4pAjM0n6ZE+R9/+kPpECA/XSELIcc54NeYVnBqIk+4DFiBgK+8QbV3mdvTG6nedl7dTYgO+5wDw== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -6211,6 +6352,13 @@ es-abstract@^1.22.1, es-abstract@^1.22.3: unbox-primitive "^1.0.2" which-typed-array "^1.1.13" +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + es-errors@^1.0.0, es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" @@ -6756,6 +6904,11 @@ eventemitter3@^5.0.1: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== +events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + execa@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" @@ -6836,6 +6989,11 @@ executable@^4.1.1: dependencies: pify "^2.2.0" +expr-eval-fork@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expr-eval-fork/-/expr-eval-fork-2.0.2.tgz#97136ac0a8178522055500f55d3d3c5ad54f400d" + integrity sha512-NaAnObPVwHEYrODd7Jzp3zzT9pgTAlUUL4MZiZu9XAYPDpx89cPsfyEImFb2XY0vQNbrqg2CG7CLiI+Rs3seaQ== + express@^4.17.3: version "4.19.2" resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" @@ -7586,6 +7744,13 @@ has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1: dependencies: get-intrinsic "^1.2.2" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" @@ -7791,6 +7956,11 @@ husky@^3.0.1: run-node "^1.0.0" slash "^3.0.0" +hyperdyperid@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hyperdyperid/-/hyperdyperid-1.2.0.tgz#59668d323ada92228d2a869d3e474d5a33b69e6b" + integrity sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A== + iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -7805,7 +7975,7 @@ iconv-lite@0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ieee754@^1.1.13: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -7864,6 +8034,11 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== + ini@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" @@ -8116,6 +8291,11 @@ is-map@^2.0.1, is-map@^2.0.2: resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-mergeable-object@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-mergeable-object/-/is-mergeable-object-1.1.1.tgz#faaa3ed1cfce87d6f7d2f5885e92cc30af3e2ebf" + integrity sha512-CPduJfuGg8h8vW74WOxHtHmtQutyQBzR+3MjQ6iDHIYdbOnm1YC7jv43SqCoU8OPGTJD4nibmiryA4kmogbGrA== + is-nan@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" @@ -8156,7 +8336,7 @@ is-path-inside@^3.0.2, is-path-inside@^3.0.3: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== -is-plain-obj@^4.0.0: +is-plain-obj@^4.0.0, is-plain-obj@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== @@ -8510,6 +8690,16 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json-stable-stringify@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" + integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== + dependencies: + call-bind "^1.0.5" + isarray "^2.0.5" + jsonify "^0.0.1" + object-keys "^1.1.1" + json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -8534,6 +8724,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jsonify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== + jspdf-autotable@^3.5.14: version "3.8.1" resolved "https://registry.yarnpkg.com/jspdf-autotable/-/jspdf-autotable-3.8.1.tgz#e4d9b62356a412024e8f08e84fdeb5b85e1383b5" @@ -9188,6 +9383,16 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" +memfs@^4.8.1: + version "4.9.2" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-4.9.2.tgz#42e7b48207268dad8c9c48ea5d4952c5d3840433" + integrity sha512-f16coDZlTG1jskq3mxarwB+fGRrd0uXWt+o1WIhRfOwbXQZqUDsTVxQBFK9JjRQHblg8eAG2JSbprDXKjc7ijQ== + dependencies: + "@jsonjoy.com/json-pack" "^1.0.3" + "@jsonjoy.com/util" "^1.1.2" + sonic-forest "^1.0.0" + tslib "^2.0.0" + memoize-one@^5.0.0, memoize-one@^5.1.1: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -10179,6 +10384,27 @@ patch-package@^7.0.0: tmp "^0.0.33" yaml "^2.2.2" +patch-package@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61" + integrity sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^4.1.2" + ci-info "^3.7.0" + cross-spawn "^7.0.3" + find-yarn-workspace-root "^2.0.0" + fs-extra "^9.0.0" + json-stable-stringify "^1.0.2" + klaw-sync "^6.0.0" + minimist "^1.2.6" + open "^7.4.2" + rimraf "^2.6.3" + semver "^7.5.3" + slash "^2.0.0" + tmp "^0.0.33" + yaml "^2.2.2" + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -10261,6 +10487,19 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +path-unified@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/path-unified/-/path-unified-0.1.0.tgz#fd751e787ab019a88cdf5cecbd7e5e4711c66c7d" + integrity sha512-/Oaz9ZJforrkmFrwkR/AcvjVsCAwGSJHO0X6O6ISj8YeFbATjIEBXLDcZfnK3MO4uvCBrJTdVIxdOc79PMqSdg== + +path@^0.12.7: + version "0.12.7" + resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" + integrity sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q== + dependencies: + process "^0.11.1" + util "^0.10.3" + pathe@^1.1.0, pathe@^1.1.1, pathe@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" @@ -10374,6 +10613,13 @@ polished@^4.2.2: dependencies: "@babel/runtime" "^7.17.8" +postcss-calc-ast-parser@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/postcss-calc-ast-parser/-/postcss-calc-ast-parser-0.1.4.tgz#9aeee3650a91c0b2902789689bc044c9f83bc447" + integrity sha512-CebpbHc96zgFjGgdQ6BqBy6XIUgRx1xXWCAAk6oke02RZ5nxwo9KQejTg8y7uYEeI9kv8jKQPYjoe6REsY23vw== + dependencies: + postcss-value-parser "^3.3.1" + postcss-load-config@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.2.tgz#7159dcf626118d33e299f485d6afe4aff7c4a3e3" @@ -10382,6 +10628,11 @@ postcss-load-config@^4.0.1: lilconfig "^3.0.0" yaml "^2.3.4" +postcss-value-parser@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + postcss@^8.4.35: version "8.4.35" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.35.tgz#60997775689ce09011edf083a549cea44aabe2f7" @@ -10462,7 +10713,7 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.10: +process@^0.11.1, process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== @@ -10559,7 +10810,7 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" -punycode@^1.3.2: +punycode@^1.3.2, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== @@ -10603,6 +10854,13 @@ qs@^6.10.0: dependencies: side-channel "^1.0.4" +qs@^6.11.2: + version "6.12.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.1.tgz#39422111ca7cbdb70425541cba20c7d7b216599a" + integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== + dependencies: + side-channel "^1.0.6" + querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -10717,6 +10975,15 @@ react-docgen@^7.0.0: loose-envify "^1.1.0" scheduler "^0.23.0" +react-dom@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" + integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + scheduler "^0.20.2" + react-dropzone@~11.2.0: version "11.2.4" resolved "https://registry.yarnpkg.com/react-dropzone/-/react-dropzone-11.2.4.tgz#391a8d2e41a8a974340f83524d306540192e3313" @@ -10908,6 +11175,14 @@ react-waypoint@^10.3.0: dependencies: loose-envify "^1.1.0" +react@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" + integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" @@ -11498,6 +11773,14 @@ scheduler@^0.19.1: loose-envify "^1.1.0" object-assign "^4.1.1" +scheduler@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" + integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + scheduler@^0.23.0: version "0.23.0" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" @@ -11599,6 +11882,18 @@ set-function-length@^1.2.0: gopd "^1.0.1" has-property-descriptors "^1.0.1" +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + set-function-name@^2.0.0, set-function-name@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" @@ -11664,6 +11959,16 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + siginfo@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" @@ -11755,6 +12060,13 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" +sonic-forest@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/sonic-forest/-/sonic-forest-1.0.2.tgz#d80aa621d1cffe75a606ca44789ccff30f5b9ce6" + integrity sha512-2rICdwIJi5kVlehMUVtJeHn3ohh5YZV4pDv0P0c1M11cRz/gXNViItpM94HQwfvnXuzybpqK0LZJgTa3lEwtAw== + dependencies: + tree-dump "^1.0.0" + source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" @@ -11899,6 +12211,13 @@ stream-shift@^1.0.0: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== +stream@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stream/-/stream-0.0.2.tgz#7f5363f057f6592c5595f00bc80a27f5cec1f0ef" + integrity sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g== + dependencies: + emitter-component "^1.1.1" + strict-event-emitter@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93" @@ -12004,7 +12323,7 @@ string.prototype.trimstart@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" -string_decoder@^1.1.1: +string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -12104,6 +12423,41 @@ strip-literal@^1.3.0: dependencies: acorn "^8.10.0" +style-dictionary@4.0.0-prerelease.25: + version "4.0.0-prerelease.25" + resolved "https://registry.yarnpkg.com/style-dictionary/-/style-dictionary-4.0.0-prerelease.25.tgz#df3d552e4324a277c13880e377f6be756db6db61" + integrity sha512-1dqKBBSvGbXPH2WFLUqqZBrmLnuNyXRkUOG1SEGJ0vDVrx+o4guOcx5aIBI9sLz2pyL7B8Yo0r4FizltFPi9WA== + dependencies: + "@bundled-es-modules/deepmerge" "^4.3.1" + "@bundled-es-modules/glob" "^10.3.13" + "@bundled-es-modules/memfs" "^4.8.1" + chalk "^5.3.0" + change-case "^5.3.0" + commander "^8.3.0" + is-plain-obj "^4.1.0" + json5 "^2.2.2" + lodash-es "^4.17.21" + patch-package "^8.0.0" + path-unified "^0.1.0" + tinycolor2 "^1.6.0" + +style-dictionary@^4.0.0-prerelease.22: + version "4.0.0-prerelease.26" + resolved "https://registry.yarnpkg.com/style-dictionary/-/style-dictionary-4.0.0-prerelease.26.tgz#005c393d12ba1678171a060b60c9a3bc16d4231a" + integrity sha512-pg/0accikT+2suJX9YPnJKBqU4wTJ9qtWD6cGl21TZdE9Ub7z1VzoIj7u5PdSK5355FHuri+yjOfzu+bLnMXdQ== + dependencies: + "@bundled-es-modules/deepmerge" "^4.3.1" + "@bundled-es-modules/glob" "^10.3.13" + "@bundled-es-modules/memfs" "^4.8.1" + chalk "^5.3.0" + change-case "^5.3.0" + commander "^8.3.0" + is-plain-obj "^4.1.0" + json5 "^2.2.2" + patch-package "^8.0.0" + path-unified "^0.1.0" + tinycolor2 "^1.6.0" + stylis@4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51" @@ -12290,6 +12644,11 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +thingies@^1.20.0: + version "1.21.0" + resolved "https://registry.yarnpkg.com/thingies/-/thingies-1.21.0.tgz#e80fbe58fd6fdaaab8fad9b67bd0a5c943c445c1" + integrity sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g== + throttle-debounce@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.3.0.tgz#fd31865e66502071e411817e241465b3e9c372e2" @@ -12333,6 +12692,11 @@ tinybench@^2.5.1: resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.6.0.tgz#1423284ee22de07c91b3752c048d2764714b341b" integrity sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA== +tinycolor2@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.6.0.tgz#f98007460169b0263b97072c5ae92484ce02d09e" + integrity sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw== + tinypool@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.8.2.tgz#84013b03dc69dacb322563a475d4c0a9be00f82a" @@ -12423,6 +12787,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tree-dump@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tree-dump/-/tree-dump-1.0.1.tgz#b448758da7495580e6b7830d6b7834fca4c45b96" + integrity sha512-WCkcRBVPSlHHq1dc/px9iOfqklvzCbdRwvlNfxGZsrHqf6aZttfPrd7DJTt6oR10dwUfpFFQeVTkPbBIZxX/YA== + tree-kill@^1.2.1, tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" @@ -12820,6 +13189,14 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" +url@^0.11.1: + version "0.11.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" + integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== + dependencies: + punycode "^1.4.1" + qs "^6.11.2" + use-memo-one@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99" @@ -12835,6 +13212,13 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +util@^0.10.3: + version "0.10.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== + dependencies: + inherits "2.0.3" + util@^0.12.4, util@^0.12.5: version "0.12.5" resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" From 9deb93c36df17dfd4e7767a9174a666afcd168a2 Mon Sep 17 00:00:00 2001 From: Alban Bailly Date: Thu, 2 May 2024 21:47:24 -0400 Subject: [PATCH 22/42] fix units --- .../src/components/BetaChip/BetaChip.test.tsx | 2 +- .../ColorPalette/ColorPalette.test.tsx | 132 ------------------ .../components/ColorPalette/ColorPalette.tsx | 6 +- .../HighlightedMarkdown.test.tsx.snap | 2 +- .../src/components/Notice/Notice.test.tsx | 2 +- .../manager/src/components/Tabs/Tab.test.tsx | 2 +- .../TextTooltip/TextTooltip.test.tsx | 2 +- .../EndpointHealth.test.tsx | 11 +- 8 files changed, 15 insertions(+), 144 deletions(-) delete mode 100644 packages/manager/src/components/ColorPalette/ColorPalette.test.tsx diff --git a/packages/manager/src/components/BetaChip/BetaChip.test.tsx b/packages/manager/src/components/BetaChip/BetaChip.test.tsx index 47a86d03207..39d28178640 100644 --- a/packages/manager/src/components/BetaChip/BetaChip.test.tsx +++ b/packages/manager/src/components/BetaChip/BetaChip.test.tsx @@ -17,7 +17,7 @@ describe('BetaChip', () => { const { getByTestId } = renderWithTheme(); const betaChip = getByTestId('betaChip'); expect(betaChip).toBeInTheDocument(); - expect(betaChip).toHaveStyle('background-color: #3683dc'); + expect(betaChip).toHaveStyle('background-color: rgb(16, 138, 214)'); }); it('triggers an onClick callback', () => { diff --git a/packages/manager/src/components/ColorPalette/ColorPalette.test.tsx b/packages/manager/src/components/ColorPalette/ColorPalette.test.tsx deleted file mode 100644 index a9f6024520e..00000000000 --- a/packages/manager/src/components/ColorPalette/ColorPalette.test.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import React from 'react'; - -import { renderWithTheme } from 'src/utilities/testHelpers'; - -import { ColorPalette } from './ColorPalette'; - -describe('Color Palette', () => { - it('renders the Color Palette', () => { - const { getAllByText, getByText } = renderWithTheme(); - - // primary colors - getByText('Primary Colors'); - getByText('theme.palette.primary.main'); - const mainHash = getAllByText('#3683dc'); - expect(mainHash).toHaveLength(2); - getByText('theme.palette.primary.light'); - getByText('#4d99f1'); - getByText('theme.palette.primary.dark'); - getByText('#2466b3'); - getByText('theme.palette.text.primary'); - const primaryHash = getAllByText('#606469'); - expect(primaryHash).toHaveLength(3); - getByText('theme.color.headline'); - const headlineHash = getAllByText('#32363c'); - expect(headlineHash).toHaveLength(2); - getByText('theme.palette.divider'); - const dividerHash = getAllByText('#f4f4f4'); - expect(dividerHash).toHaveLength(2); - const whiteColor = getAllByText('theme.color.white'); - expect(whiteColor).toHaveLength(2); - const whiteHash = getAllByText('#fff'); - expect(whiteHash).toHaveLength(3); - - // etc - getByText('Etc.'); - getByText('theme.color.red'); - getByText('#ca0813'); - getByText('theme.color.orange'); - getByText('#ffb31a'); - getByText('theme.color.yellow'); - getByText('#fecf2f'); - getByText('theme.color.green'); - getByText('#00b159'); - getByText('theme.color.teal'); - getByText('#17cf73'); - getByText('theme.color.border2'); - getByText('#c5c6c8'); - getByText('theme.color.border3'); - getByText('#eee'); - getByText('theme.color.grey1'); - getByText('#abadaf'); - getByText('theme.color.grey2'); - getByText('#e7e7e7'); - getByText('theme.color.grey3'); - getByText('#ccc'); - getByText('theme.color.grey4'); - getByText('#8C929D'); - getByText('theme.color.grey5'); - getByText('#f5f5f5'); - getByText('theme.color.grey6'); - const borderGreyHash = getAllByText('#e3e5e8'); - expect(borderGreyHash).toHaveLength(3); - getByText('theme.color.grey7'); - getByText('#e9eaef'); - getByText('theme.color.grey8'); - getByText('#dbdde1'); - getByText('theme.color.grey9'); - const borderGrey9Hash = getAllByText('#f4f5f6'); - expect(borderGrey9Hash).toHaveLength(3); - getByText('theme.color.black'); - getByText('#222'); - getByText('theme.color.offBlack'); - getByText('#444'); - getByText('theme.color.boxShadow'); - getByText('#ddd'); - getByText('theme.color.boxShadowDark'); - getByText('#aaa'); - getByText('theme.color.blueDTwhite'); - getByText('theme.color.tableHeaderText'); - getByText('rgba(0, 0, 0, 0.54)'); - getByText('theme.color.drawerBackdrop'); - getByText('rgba(255, 255, 255, 0.5)'); - getByText('theme.color.label'); - getByText('#555'); - getByText('theme.color.disabledText'); - getByText('#c9cacb'); - getByText('theme.color.tagButton'); - getByText('#f1f7fd'); - getByText('theme.color.tagIcon'); - getByText('#7daee8'); - - // background colors - getByText('Background Colors'); - getByText('theme.bg.app'); - getByText('theme.bg.main'); - getByText('theme.bg.offWhite'); - getByText('#fbfbfb'); - getByText('theme.bg.lightBlue1'); - getByText('#f0f7ff'); - getByText('theme.bg.lightBlue2'); - getByText('#e5f1ff'); - getByText('theme.bg.white'); - getByText('theme.bg.tableHeader'); - getByText('#f9fafa'); - getByText('theme.bg.primaryNavPaper'); - getByText('#3a3f46'); - getByText('theme.bg.mainContentBanner'); - getByText('#33373d'); - getByText('theme.bg.bgPaper'); - getByText('#ffffff'); - getByText('theme.bg.bgAccessRow'); - getByText('#fafafa'); - getByText('theme.bg.bgAccessRowTransparentGradient'); - getByText('rgb(255, 255, 255, .001)'); - - // typography colors - getByText('Typography Colors'); - getByText('theme.textColors.linkActiveLight'); - getByText('#2575d0'); - getByText('theme.textColors.headlineStatic'); - getByText('theme.textColors.tableHeader'); - getByText('#888f91'); - getByText('theme.textColors.tableStatic'); - getByText('theme.textColors.textAccessTable'); - - // border colors - getByText('Border Colors'); - getByText('theme.borderColors.borderTypography'); - getByText('theme.borderColors.borderTable'); - getByText('theme.borderColors.divider'); - }); -}); diff --git a/packages/manager/src/components/ColorPalette/ColorPalette.tsx b/packages/manager/src/components/ColorPalette/ColorPalette.tsx index a3bfaadb121..620a62c6015 100644 --- a/packages/manager/src/components/ColorPalette/ColorPalette.tsx +++ b/packages/manager/src/components/ColorPalette/ColorPalette.tsx @@ -1,12 +1,12 @@ -// eslint-disable-next-line no-restricted-imports import { useTheme } from '@mui/material'; import Grid from '@mui/material/Unstable_Grid2'; -import { Theme } from '@mui/material/styles'; import * as React from 'react'; import { makeStyles } from 'tss-react/mui'; import { Typography } from 'src/components/Typography'; +import type { Theme } from '@mui/material/styles'; + interface Color { alias: string; color: string; @@ -45,7 +45,7 @@ const useStyles = makeStyles()((theme: Theme) => ({ /** * Add a new color to the palette, especially another tint of gray or blue, only after exhausting the option of using an existing color. * - * - Colors used in light mode are located in `foundations/light.ts + * - Colors used in light mode are located in `foundations/light.ts` * - Colors used in dark mode are located in `foundations/dark.ts` * * If a color does not exist in the current palette and is only used once, consider applying the color conditionally: diff --git a/packages/manager/src/components/HighlightedMarkdown/__snapshots__/HighlightedMarkdown.test.tsx.snap b/packages/manager/src/components/HighlightedMarkdown/__snapshots__/HighlightedMarkdown.test.tsx.snap index 94033594dc5..238b90d44c9 100644 --- a/packages/manager/src/components/HighlightedMarkdown/__snapshots__/HighlightedMarkdown.test.tsx.snap +++ b/packages/manager/src/components/HighlightedMarkdown/__snapshots__/HighlightedMarkdown.test.tsx.snap @@ -3,7 +3,7 @@ exports[`HighlightedMarkdown component > should highlight text consistently 1`] = `

Some markdown diff --git a/packages/manager/src/components/Notice/Notice.test.tsx b/packages/manager/src/components/Notice/Notice.test.tsx index cf12ad28ca2..e7d536cd907 100644 --- a/packages/manager/src/components/Notice/Notice.test.tsx +++ b/packages/manager/src/components/Notice/Notice.test.tsx @@ -58,7 +58,7 @@ describe('Notice Component', () => { it('applies variant prop', () => { const { container } = renderWithTheme(); - expect(container.firstChild).toHaveStyle('border-left: 5px solid #ca0813;'); + expect(container.firstChild).toHaveStyle('border-left: 5px solid #d63c42;'); }); it('displays icon for important notices', () => { diff --git a/packages/manager/src/components/Tabs/Tab.test.tsx b/packages/manager/src/components/Tabs/Tab.test.tsx index 38736410cdb..6463053b864 100644 --- a/packages/manager/src/components/Tabs/Tab.test.tsx +++ b/packages/manager/src/components/Tabs/Tab.test.tsx @@ -20,7 +20,7 @@ describe('Tab Component', () => { expect(tabElement).toHaveStyle(` display: inline-flex; - color: rgb(54, 131, 220); + color: rgb(0, 156, 222); `); }); diff --git a/packages/manager/src/components/TextTooltip/TextTooltip.test.tsx b/packages/manager/src/components/TextTooltip/TextTooltip.test.tsx index 7a44e14538e..171e57948e5 100644 --- a/packages/manager/src/components/TextTooltip/TextTooltip.test.tsx +++ b/packages/manager/src/components/TextTooltip/TextTooltip.test.tsx @@ -56,7 +56,7 @@ describe('TextTooltip', () => { const displayText = getByText(props.displayText); - expect(displayText).toHaveStyle('color: rgb(54, 131, 220)'); + expect(displayText).toHaveStyle('color: rgb(0, 156, 222)'); expect(displayText).toHaveStyle('font-size: 18px'); }); }); diff --git a/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/EndpointHealth.test.tsx b/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/EndpointHealth.test.tsx index b0274db2eff..b5aca9a2eba 100644 --- a/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/EndpointHealth.test.tsx +++ b/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/EndpointHealth.test.tsx @@ -11,6 +11,7 @@ describe('EndpointHealth', () => { expect(getByText('0 up')).toBeVisible(); expect(getByText('0 down')).toBeVisible(); }); + it('renders endpoints that are up and down', () => { const { getByLabelText, getByText } = renderWithTheme( , @@ -20,12 +21,13 @@ describe('EndpointHealth', () => { const upStatusIcon = getByLabelText('Status is active'); const downStatusIcon = getByLabelText('Status is error'); - expect(upStatusIcon).toHaveStyle({ backgroundColor: '#17cf73' }); - expect(downStatusIcon).toHaveStyle({ backgroundColor: '#ca0813' }); + expect(upStatusIcon).toHaveStyle({ backgroundColor: 'rgba(23, 207, 115)' }); + expect(downStatusIcon).toHaveStyle({ backgroundColor: 'rgbs(202, 8, 19)' }); expect(getByText('18 up')).toBeVisible(); expect(getByText('6 down')).toBeVisible(); }); + it('should render gray when the "down" number is zero', () => { const { getByLabelText, getByText } = renderWithTheme( @@ -34,9 +36,10 @@ describe('EndpointHealth', () => { const statusIcon = getByLabelText('Status is inactive'); expect(statusIcon).toBeVisible(); - expect(statusIcon).toHaveStyle({ backgroundColor: '#dbdde1' }); + expect(statusIcon).toHaveStyle({ backgroundColor: 'rgba(219, 221, 225)' }); expect(getByText('0 down')).toBeVisible(); }); + it('should render gray when the "up" number is zero', () => { const { getByLabelText, getByText } = renderWithTheme( @@ -45,7 +48,7 @@ describe('EndpointHealth', () => { const statusIcon = getByLabelText('Status is inactive'); expect(statusIcon).toBeVisible(); - expect(statusIcon).toHaveStyle({ backgroundColor: '#dbdde1' }); + expect(statusIcon).toHaveStyle({ backgroundColor: 'rgba(219, 221, 225)' }); expect(getByText('0 up')).toBeVisible(); }); }); From 72c7b0932a2c39886a6dbedf6746701ae077d31f Mon Sep 17 00:00:00 2001 From: Alban Bailly Date: Thu, 2 May 2024 21:54:33 -0400 Subject: [PATCH 23/42] Fix disabled buttons --- packages/manager/src/foundations/themes/dark.ts | 4 ++-- packages/manager/src/foundations/themes/light.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/manager/src/foundations/themes/dark.ts b/packages/manager/src/foundations/themes/dark.ts index 0de511c6979..c3aa62bd7e5 100644 --- a/packages/manager/src/foundations/themes/dark.ts +++ b/packages/manager/src/foundations/themes/dark.ts @@ -199,8 +199,8 @@ export const darkTheme: ThemeOptions = { backgroundColor: Button.Primary.Hover.Background, }, '&[aria-disabled="true"]': { - backgroundColor: 'rgba(0, 0, 0, 0.12)', - color: 'white', + backgroundColor: Button.Primary.Disabled.Background, + color: Button.Primary.Disabled.Text, }, backgroundColor: Button.Primary.Default.Background, color: Button.Primary.Default.Text, diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 80419609c23..243057b6858 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -401,8 +401,8 @@ export const lightTheme: ThemeOptions = { backgroundColor: Button.Primary.Hover.Background, }, '&[aria-disabled="true"]': { - backgroundColor: 'rgba(0, 0, 0, 0.12)', - color: 'white', + backgroundColor: Button.Primary.Disabled.Background, + color: Button.Primary.Disabled.Text, }, backgroundColor: Button.Primary.Default.Background, color: Button.Primary.Default.Text, From 85eb7d84258e7af40fff9feae60135a8599a10a2 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Mon, 6 May 2024 15:43:21 -0400 Subject: [PATCH 24/42] Saving --- packages/manager/src/components/Divider.tsx | 7 ------- packages/manager/src/foundations/themes/dark.ts | 7 +++++++ packages/manager/src/foundations/themes/light.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/manager/src/components/Divider.tsx b/packages/manager/src/components/Divider.tsx index 6daa2d34fdb..cfd18a7fe5a 100644 --- a/packages/manager/src/components/Divider.tsx +++ b/packages/manager/src/components/Divider.tsx @@ -24,13 +24,6 @@ const StyledDivider = styled(_Divider, { 'dark', ]), })(({ theme, ...props }) => ({ - borderColor: props.dark - ? theme.color.border2 - : props.light - ? theme.name === 'light' - ? '#e3e5e8' - : '#2e3238' - : '', marginBottom: props.spacingBottom, marginTop: props.spacingTop, })); diff --git a/packages/manager/src/foundations/themes/dark.ts b/packages/manager/src/foundations/themes/dark.ts index 0de511c6979..e727ff1d71d 100644 --- a/packages/manager/src/foundations/themes/dark.ts +++ b/packages/manager/src/foundations/themes/dark.ts @@ -334,6 +334,13 @@ export const darkTheme: ThemeOptions = { }, }, }, + MuiDivider: { + styleOverrides: { + root: { + borderColor: customDarkModeOptions.borderColors.divider, + }, + }, + }, MuiDrawer: { styleOverrides: { paper: { diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 80419609c23..ed826bb6379 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -627,7 +627,7 @@ export const lightTheme: ThemeOptions = { MuiDivider: { styleOverrides: { root: { - borderColor: 'rgba(0, 0, 0, 0.12)', + borderColor: borderColors.divider, marginBottom: spacing, marginTop: spacing, }, From 8e5268fbb66b58e370f409d30e551b6a91e4020d Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Mon, 13 May 2024 16:56:40 -0400 Subject: [PATCH 25/42] Saving... --- .../src/components/PrimaryNav/PrimaryNav.tsx | 6 ++ .../src/components/Table/Table.styles.ts | 12 +--- .../components/TableRow/TableRow.styles.ts | 11 ++- .../manager/src/components/Tabs/TabList.tsx | 4 +- .../TopMenu/SearchBar/SearchBar.styles.ts | 21 +++++- .../PlansPanel/PlanContainer.styles.ts | 2 - .../manager/src/foundations/themes/dark.ts | 72 ++++++++++++++++--- .../manager/src/foundations/themes/index.ts | 2 + .../manager/src/foundations/themes/light.ts | 58 +++++++++++++-- 9 files changed, 147 insertions(+), 41 deletions(-) diff --git a/packages/manager/src/components/PrimaryNav/PrimaryNav.tsx b/packages/manager/src/components/PrimaryNav/PrimaryNav.tsx index c55ac7ecf0b..d596e5ce223 100644 --- a/packages/manager/src/components/PrimaryNav/PrimaryNav.tsx +++ b/packages/manager/src/components/PrimaryNav/PrimaryNav.tsx @@ -331,6 +331,9 @@ export const PrimaryNav = (props: PrimaryNavProps) => { return ( ({ + borderRight: `1px solid ${theme.borderColors.dividerDark}`, + })} alignItems="flex-start" className={classes.menuGrid} component="nav" @@ -387,6 +390,9 @@ export const PrimaryNav = (props: PrimaryNavProps) => { spacingTop={ _isManagedAccount ? (idx === 0 ? 0 : 11) : idx === 1 ? 0 : 11 } + sx={(theme) => ({ + borderColor: theme.borderColors.dividerDark, + })} className={classes.divider} spacingBottom={11} /> diff --git a/packages/manager/src/components/Table/Table.styles.ts b/packages/manager/src/components/Table/Table.styles.ts index 1375e1a7262..87318bf2aaf 100644 --- a/packages/manager/src/components/Table/Table.styles.ts +++ b/packages/manager/src/components/Table/Table.styles.ts @@ -26,10 +26,9 @@ export const StyledTableWrapper = styled('div', { borderRight: 'none', }, backgroundColor: theme.bg.tableHeader, - borderBottom: `2px solid ${theme.borderColors.borderTable}`, - borderLeft: `1px solid ${theme.borderColors.borderTable}`, + borderBottom: `1px solid ${theme.borderColors.borderTable}`, borderRight: `1px solid ${theme.borderColors.borderTable}`, - borderTop: `2px solid ${theme.borderColors.borderTable}`, + borderTop: `1px solid ${theme.borderColors.borderTable}`, fontFamily: theme.font.bold, padding: '10px 15px', }, @@ -42,11 +41,4 @@ export const StyledTableWrapper = styled('div', { border: 0, }, }), - ...(props.rowHoverState && { - '& tbody tr': { - '&:hover': { - backgroundColor: theme.bg.lightBlue1, - }, - }, - }), })); diff --git a/packages/manager/src/components/TableRow/TableRow.styles.ts b/packages/manager/src/components/TableRow/TableRow.styles.ts index 1cfdb721e5a..d062abd7cca 100644 --- a/packages/manager/src/components/TableRow/TableRow.styles.ts +++ b/packages/manager/src/components/TableRow/TableRow.styles.ts @@ -9,9 +9,6 @@ export const StyledTableRow = styled(_TableRow, { label: 'StyledTableRow', shouldForwardProp: omittedProps(['forceIndex']), })(({ theme, ...props }) => ({ - backgroundColor: theme.bg.bgPaper, - borderLeft: `1px solid ${theme.borderColors.borderTable}`, - borderRight: `1px solid ${theme.borderColors.borderTable}`, [theme.breakpoints.up('md')]: { boxShadow: `inset 3px 0 0 transparent`, }, @@ -38,14 +35,14 @@ export const StyledTableRow = styled(_TableRow, { ...(props.selected && { '& td': { '&:first-of-type': { - borderLeft: `1px solid ${theme.palette.primary.light}`, + borderLeft: `1px solid ${theme.borderColors.borderTable}`, }, - borderBottomColor: theme.palette.primary.light, - borderTop: `1px solid ${theme.palette.primary.light}`, + borderBottomColor: theme.borderColors.borderTable, + borderTop: `1px solid ${theme.borderColors.borderTable}`, position: 'relative', [theme.breakpoints.down('lg')]: { '&:last-child': { - borderRight: `1px solid ${theme.palette.primary.light}`, + borderRight: `1px solid ${theme.borderColors.borderTable}`, }, }, }, diff --git a/packages/manager/src/components/Tabs/TabList.tsx b/packages/manager/src/components/Tabs/TabList.tsx index 16a12a41296..0ae8e8a8714 100644 --- a/packages/manager/src/components/Tabs/TabList.tsx +++ b/packages/manager/src/components/Tabs/TabList.tsx @@ -23,9 +23,7 @@ export { TabList }; const StyledReachTabList = styled(ReachTabList)(({ theme }) => ({ '&[data-reach-tab-list]': { background: 'none !important', - boxShadow: `inset 0 -1px 0 ${ - theme.name === 'light' ? '#e3e5e8' : '#2e3238' - }`, + boxShadow: `inset 0 -1px 0 ${theme.borderColors.divider}`, marginBottom: theme.spacing(), [theme.breakpoints.down('lg')]: { overflowX: 'auto', diff --git a/packages/manager/src/features/TopMenu/SearchBar/SearchBar.styles.ts b/packages/manager/src/features/TopMenu/SearchBar/SearchBar.styles.ts index bc4144e18cc..361f9332b7c 100644 --- a/packages/manager/src/features/TopMenu/SearchBar/SearchBar.styles.ts +++ b/packages/manager/src/features/TopMenu/SearchBar/SearchBar.styles.ts @@ -31,7 +31,14 @@ export const StyledSearchBarWrapperDiv = styled('div', { label: 'StyledSearchBarWrapperDiv', })(({ theme }) => ({ '& > div .react-select__control': { + '&:hover': { + borderColor: 'transparent', + }, backgroundColor: 'transparent', + borderColor: 'transparent', + }, + '& > div .react-select__control--is-focused:hover': { + borderColor: 'transparent', }, '& > div .react-select__indicators': { display: 'none', @@ -55,9 +62,18 @@ export const StyledSearchBarWrapperDiv = styled('div', { }, overflow: 'hidden', }, + '& svg': { + height: 20, + width: 20, + }, + '&.active': { + ...theme.inputStyles.focused, + }, + '&:hover': { + ...theme.inputStyles.hover, + }, + ...theme.inputStyles.default, alignItems: 'center', - backgroundColor: theme.bg.app, - borderRadius: 3, display: 'flex', flex: 1, height: 34, @@ -70,7 +86,6 @@ export const StyledSearchBarWrapperDiv = styled('div', { visibility: 'visible', zIndex: 3, }, - backgroundColor: theme.bg.white, left: 0, margin: 0, opacity: 0, diff --git a/packages/manager/src/features/components/PlansPanel/PlanContainer.styles.ts b/packages/manager/src/features/components/PlansPanel/PlanContainer.styles.ts index 935c059aabe..30cc5351841 100644 --- a/packages/manager/src/features/components/PlansPanel/PlanContainer.styles.ts +++ b/packages/manager/src/features/components/PlansPanel/PlanContainer.styles.ts @@ -11,8 +11,6 @@ interface StyledTableCellPropsProps extends TableCellProps { export const StyledTable = styled(Table, { label: 'StyledTable', })(({ theme }) => ({ - borderLeft: `1px solid ${theme.borderColors.borderTable}`, - borderRight: `1px solid ${theme.borderColors.borderTable}`, overflowX: 'hidden', })); diff --git a/packages/manager/src/foundations/themes/dark.ts b/packages/manager/src/foundations/themes/dark.ts index a4d3f3ca694..b2afe3c9a8f 100644 --- a/packages/manager/src/foundations/themes/dark.ts +++ b/packages/manager/src/foundations/themes/dark.ts @@ -21,7 +21,7 @@ const primaryColors = { export const customDarkModeOptions = { bg: { - app: Color.Neutrals[90], + app: Color.Neutrals[100], bgAccessRow: Color.Neutrals[80], bgAccessRowTransparentGradient: 'rgb(69, 75, 84, .001)', bgPaper: Color.Neutrals[100], @@ -35,9 +35,9 @@ export const customDarkModeOptions = { white: Color.Neutrals[100], }, borderColors: { - borderTable: Color.Neutrals[90], + borderTable: Color.Neutrals[80], borderTypography: Color.Neutrals[80], - divider: Color.Neutrals.Black, + divider: Color.Neutrals[80], }, color: { black: Color.Neutrals.White, @@ -344,6 +344,7 @@ export const darkTheme: ThemeOptions = { MuiDrawer: { styleOverrides: { paper: { + border: 0, boxShadow: `0 0 5px ${Color.Neutrals[100]}`, }, }, @@ -351,6 +352,7 @@ export const darkTheme: ThemeOptions = { MuiFormControl: { styleOverrides: { root: { + // Component.Checkbox.Checked.Disabled '&.copy > div': { backgroundColor: Color.Neutrals[100], }, @@ -484,11 +486,13 @@ export const darkTheme: ThemeOptions = { MuiPaper: { styleOverrides: { outlined: { - border: '1px solid rgba(0, 0, 0, 0.2)', + // TODO: We can remove this variant since they will always have a border + backgroundColor: Color.Neutrals[90], }, root: { - backgroundColor: Color.Neutrals[100], + backgroundColor: Color.Neutrals[90], backgroundImage: 'none', // I have no idea why MUI defaults to setting a background image... + border: `1px solid ${Color.Neutrals[80]}`, }, }, }, @@ -577,6 +581,15 @@ export const darkTheme: ThemeOptions = { }, }, }, + MuiTable: { + styleOverrides: { + root: { + border: `1px solid ${customDarkModeOptions.borderColors.borderTable}`, + borderBottom: 0, + borderTop: 0, + }, + }, + }, MuiTableCell: { styleOverrides: { head: { @@ -610,14 +623,13 @@ export const darkTheme: ThemeOptions = { }, root: { '&:before': { - borderLeftColor: Color.Neutrals[100], + borderLeftColor: Color.Neutrals[90], }, '&:hover, &:focus': { - '&$hover': { - backgroundColor: 'rgba(0, 0, 0, 0.1)', - }, + backgroundColor: Color.Neutrals[80], }, - backgroundColor: Color.Neutrals[100], + backgroundColor: Color.Neutrals[90], + border: `1px solid ${Color.Neutrals[50]}`, }, }, }, @@ -685,6 +697,46 @@ export const darkTheme: ThemeOptions = { red: `rgb(255, 99, 60)`, yellow: `rgb(255, 220, 125)`, }, + inputStyles: { + default: { + backgroundColor: Select.Default.Background, + borderColor: Select.Default.Border, + color: Select.Default.Text, + }, + disabled: { + '& svg': { + color: Select.Disabled.Icon, + }, + backgroundColor: Select.Disabled.Background, + borderColor: Select.Disabled.Border, + color: Select.Disabled.Text, + }, + error: { + '& svg': { + color: Select.Error.Icon, + }, + backgroundColor: Select.Error.Background, + borderColor: Select.Error.Border, + color: Select.Error.Text, + }, + focused: { + '& svg': { + color: Select.Focus.Icon, + }, + backgroundColor: Select.Focus.Background, + borderColor: Select.Focus.Border, + boxShadow: `0 0 2px 1px ${Color.Neutrals[100]}`, + color: Select.Focus.Text, + }, + hover: { + '& svg': { + color: Select.Hover.Icon, + }, + backgroundColor: Select.Hover.Background, + borderColor: Select.Hover.Border, + color: Select.Hover.Text, + }, + }, name: 'dark', palette: { background: { diff --git a/packages/manager/src/foundations/themes/index.ts b/packages/manager/src/foundations/themes/index.ts index a30625e34f3..c2787bc2b54 100644 --- a/packages/manager/src/foundations/themes/index.ts +++ b/packages/manager/src/foundations/themes/index.ts @@ -58,6 +58,7 @@ declare module '@mui/material/styles/createTheme' { color: Colors; font: Fonts; graphs: any; + inputStyles?: any; name: ThemeName; textColors: TextColors; visually: any; @@ -74,6 +75,7 @@ declare module '@mui/material/styles/createTheme' { color?: DarkModeColors | LightModeColors; font?: Fonts; graphs?: any; + inputStyles?: any; name: ThemeName; textColors?: DarkModeTextColors | LightModeTextColors; visually?: any; diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 0c3d3a4e1dc..1a098bc9cc2 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -84,6 +84,7 @@ export const borderColors = { borderTable: Color.Neutrals[5], borderTypography: Color.Neutrals[30], divider: Color.Neutrals[30], + dividerDark: Color.Neutrals[80], } as const; const iconCircleAnimation = { @@ -205,6 +206,9 @@ export const lightTheme: ThemeOptions = { paddingBottom: 12, paddingLeft: 16, }, + '&:before': { + display: 'none', + }, flexBasis: '100%', width: '100%', }, @@ -258,6 +262,10 @@ export const lightTheme: ThemeOptions = { colorDefault: { backgroundColor: 'inherit', }, + root: { + borderLeft: 0, + borderTop: 0, + }, }, }, MuiAutocomplete: { @@ -1207,7 +1215,10 @@ export const lightTheme: ThemeOptions = { MuiTable: { styleOverrides: { root: { + border: `1px solid ${borderColors.borderTable}`, + borderBottom: 0, borderCollapse: 'initial', + borderTop: 0, }, }, }, @@ -1248,12 +1259,7 @@ export const lightTheme: ThemeOptions = { }, root: { '&:hover, &:focus': { - '&$hover': { - backgroundColor: Color.Neutrals[5], - [breakpoints.up('md')]: { - boxShadow: `inset 5px 0 0 ${primaryColors.main}`, - }, - }, + backgroundColor: Color.Neutrals[5], }, backfaceVisibility: 'hidden', backgroundColor: primaryColors.white, @@ -1462,6 +1468,46 @@ export const lightTheme: ThemeOptions = { }, yellow: `rgba(255, 220, 125, ${graphTransparency})`, }, + inputStyles: { + default: { + backgroundColor: Select.Default.Background, + border: `1px solid ${Select.Default.Border}`, + color: Select.Default.Text, + }, + disabled: { + '& svg': { + color: Select.Disabled.Icon, + }, + backgroundColor: Select.Disabled.Background, + border: `1px solid ${Select.Disabled.Border}`, + color: Select.Disabled.Text, + }, + error: { + '& svg': { + color: Select.Error.Icon, + }, + backgroundColor: Select.Error.Background, + border: `1px solid ${Select.Error.Border}`, + color: Select.Error.Text, + }, + focused: { + '& svg': { + color: Select.Focus.Icon, + }, + backgroundColor: Select.Focus.Background, + border: `1px solid ${Select.Focus.Border}`, + boxShadow: `0 0 2px 1px ${Color.Neutrals[30]}`, + color: Select.Focus.Text, + }, + hover: { + '& svg': { + color: Select.Hover.Icon, + }, + backgroundColor: Select.Hover.Background, + border: `1px solid ${Select.Hover.Border}`, + color: Select.Hover.Text, + }, + }, name: 'light', // @todo remove this because we leverage pallete.mode now palette: { background: { From 8393e420dc4429b2196e28e650e22249372dc0eb Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Fri, 17 May 2024 15:44:19 -0400 Subject: [PATCH 26/42] Adjust billing paper --- .../Billing/BillingPanels/BillingSummary/BillingSummary.tsx | 6 +++--- packages/manager/src/foundations/themes/dark.ts | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/BillingSummary.tsx b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/BillingSummary.tsx index b18adbaa7d2..f48e7c4ad50 100644 --- a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/BillingSummary.tsx +++ b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/BillingSummary.tsx @@ -162,7 +162,7 @@ export const BillingSummary = (props: BillingSummaryProps) => { <> - + Account Balance { {promotions && promotions?.length > 0 ? ( - + Promotions @@ -223,7 +223,7 @@ export const BillingSummary = (props: BillingSummaryProps) => { ) : null} - + Accrued Charges Date: Tue, 21 May 2024 08:04:24 -0400 Subject: [PATCH 27/42] Work in progress --- packages/manager/src/components/PrimaryNav/PrimaryNav.tsx | 3 --- packages/manager/src/components/PrimaryNav/SideMenu.tsx | 3 ++- .../BillingPanels/BillingSummary/BillingSummary.tsx | 6 +++--- .../src/features/TopMenu/SearchBar/SearchBar.styles.ts | 3 +++ packages/manager/src/features/TopMenu/TopMenu.tsx | 8 +------- packages/manager/src/foundations/themes/dark.ts | 6 +++++- packages/manager/src/foundations/themes/light.ts | 8 ++++++-- 7 files changed, 20 insertions(+), 17 deletions(-) diff --git a/packages/manager/src/components/PrimaryNav/PrimaryNav.tsx b/packages/manager/src/components/PrimaryNav/PrimaryNav.tsx index d596e5ce223..c43f7ceb421 100644 --- a/packages/manager/src/components/PrimaryNav/PrimaryNav.tsx +++ b/packages/manager/src/components/PrimaryNav/PrimaryNav.tsx @@ -331,9 +331,6 @@ export const PrimaryNav = (props: PrimaryNavProps) => { return ( ({ - borderRight: `1px solid ${theme.borderColors.dividerDark}`, - })} alignItems="flex-start" className={classes.menuGrid} component="nav" diff --git a/packages/manager/src/components/PrimaryNav/SideMenu.tsx b/packages/manager/src/components/PrimaryNav/SideMenu.tsx index e901df9883c..5be1241600f 100644 --- a/packages/manager/src/components/PrimaryNav/SideMenu.tsx +++ b/packages/manager/src/components/PrimaryNav/SideMenu.tsx @@ -66,7 +66,8 @@ const StyledDrawer = styled(Drawer, { shouldForwardProp: (prop) => prop !== 'collapse', })<{ collapse?: boolean }>(({ theme, ...props }) => ({ '& .MuiDrawer-paper': { - backgroundColor: theme.bg.primaryNavPaper, + backgroundColor: + theme.name === 'dark' ? theme.bg.appBar : theme.bg.primaryNavPaper, borderRight: 'none', boxShadow: 'none', height: '100%', diff --git a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/BillingSummary.tsx b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/BillingSummary.tsx index f48e7c4ad50..b18adbaa7d2 100644 --- a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/BillingSummary.tsx +++ b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/BillingSummary.tsx @@ -162,7 +162,7 @@ export const BillingSummary = (props: BillingSummaryProps) => { <> - + Account Balance { {promotions && promotions?.length > 0 ? ( - + Promotions @@ -223,7 +223,7 @@ export const BillingSummary = (props: BillingSummaryProps) => { ) : null} - + Accrued Charges { )} - ({ - backgroundColor: theme.bg.bgPaper, - color: theme.palette.text.primary, - position: 'relative', - })} - > + ({ '&.MuiToolbar-root': { diff --git a/packages/manager/src/foundations/themes/dark.ts b/packages/manager/src/foundations/themes/dark.ts index 9c20e0283bc..348f7bfa19a 100644 --- a/packages/manager/src/foundations/themes/dark.ts +++ b/packages/manager/src/foundations/themes/dark.ts @@ -22,6 +22,7 @@ const primaryColors = { export const customDarkModeOptions = { bg: { app: Color.Neutrals[100], + appBar: Color.Neutrals.Black, bgAccessRow: Color.Neutrals[80], bgAccessRowTransparentGradient: 'rgb(69, 75, 84, .001)', bgPaper: Color.Neutrals[100], @@ -156,6 +157,9 @@ export const darkTheme: ThemeOptions = { colorDefault: { backgroundColor: 'transparent', }, + root: { + backgroundColor: Color.Neutrals.Black, + }, }, }, MuiAutocomplete: { @@ -489,7 +493,7 @@ export const darkTheme: ThemeOptions = { // TODO: We can remove this variant since they will always have a border backgroundColor: Color.Neutrals[90], outlined: { - border: `1px solid ${Color.Neutrals[30]}`, + border: `1px solid ${Color.Neutrals[80]}`, }, }, root: { diff --git a/packages/manager/src/foundations/themes/light.ts b/packages/manager/src/foundations/themes/light.ts index 1a098bc9cc2..cf31e5578e4 100644 --- a/packages/manager/src/foundations/themes/light.ts +++ b/packages/manager/src/foundations/themes/light.ts @@ -15,6 +15,7 @@ export const inputMaxWidth = 416; export const bg = { app: Color.Neutrals[5], + appBar: 'transparent', bgAccessRow: Color.Neutrals[5], bgAccessRowTransparentGradient: 'rgb(255, 255, 255, .001)', bgPaper: Color.Neutrals.White, @@ -263,8 +264,11 @@ export const lightTheme: ThemeOptions = { backgroundColor: 'inherit', }, root: { + backgroundColor: bg.bgPaper, borderLeft: 0, borderTop: 0, + color: primaryColors.text, + position: 'relative', }, }, }, @@ -1471,7 +1475,7 @@ export const lightTheme: ThemeOptions = { inputStyles: { default: { backgroundColor: Select.Default.Background, - border: `1px solid ${Select.Default.Border}`, + border: `1px solid ${Color.Neutrals[40]}`, // TODO: This should convert to token in future color: Select.Default.Text, }, disabled: { @@ -1504,7 +1508,7 @@ export const lightTheme: ThemeOptions = { color: Select.Hover.Icon, }, backgroundColor: Select.Hover.Background, - border: `1px solid ${Select.Hover.Border}`, + border: `1px solid ${Color.Neutrals[40]}`, // TODO: This should convert to token in future color: Select.Hover.Text, }, }, From f006eedd665d68c983bd1ae6a038d82cd123f06d Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Fri, 31 May 2024 16:05:41 -0400 Subject: [PATCH 28/42] More style updates --- .../src/components/ActionMenu/ActionMenu.tsx | 21 +++----- .../components/Breadcrumb/Crumbs.styles.tsx | 3 +- .../components/Button/StyledActionButton.ts | 6 ++- .../src/components/Button/StyledTagButton.ts | 7 +-- .../components/ColorPalette/ColorPalette.tsx | 2 +- .../EntityHeader/EntityHeader.stories.tsx | 24 ++-------- .../InlineMenuAction/InlineMenuAction.tsx | 2 +- .../manager/src/components/Tag/Tag.styles.ts | 8 ++-- .../src/components/TagCell/TagCell.tsx | 2 +- .../Linodes/LinodeEntityDetail.styles.ts | 4 +- .../Linodes/LinodeEntityDetailHeader.tsx | 13 +++-- .../manager/src/foundations/themes/dark.ts | 48 +++++++++++++------ .../manager/src/foundations/themes/light.ts | 48 +++++++++++-------- 13 files changed, 98 insertions(+), 90 deletions(-) diff --git a/packages/manager/src/components/ActionMenu/ActionMenu.tsx b/packages/manager/src/components/ActionMenu/ActionMenu.tsx index 679c0b34df9..5e9f00855fa 100644 --- a/packages/manager/src/components/ActionMenu/ActionMenu.tsx +++ b/packages/manager/src/components/ActionMenu/ActionMenu.tsx @@ -71,10 +71,10 @@ export const ActionMenu = React.memo((props: ActionMenuProps) => { const sxTooltipIcon = { '& :hover': { - color: '#4d99f1', + color: theme.color.white, }, '&& .MuiSvgIcon-root': { - fill: theme.color.disabledText, + fill: theme.color.white, height: '20px', width: '20px', }, @@ -89,12 +89,12 @@ export const ActionMenu = React.memo((props: ActionMenuProps) => { ({ ':hover': { - backgroundColor: theme.palette.primary.main, - color: '#fff', + backgroundColor: theme.color.buttonPrimaryHover, + color: theme.color.white, }, - backgroundColor: open ? theme.palette.primary.main : undefined, + backgroundColor: open ? theme.color.buttonPrimaryHover : undefined, borderRadius: 'unset', - color: open ? '#fff' : theme.textColors.linkActiveLight, + color: open ? theme.color.white : theme.textColors.linkActiveLight, height: '100%', minWidth: '40px', padding: '10px', @@ -147,15 +147,6 @@ export const ActionMenu = React.memo((props: ActionMenuProps) => { a.onClick(); } }} - sx={{ - '&:hover': { - background: '#226dc3', - }, - background: '#3683dc', - borderBottom: '1px solid #5294e0', - color: '#fff', - padding: '10px 10px 10px 16px', - }} data-qa-action-menu-item={a.title} data-testid={a.title} disabled={a.disabled} diff --git a/packages/manager/src/components/Breadcrumb/Crumbs.styles.tsx b/packages/manager/src/components/Breadcrumb/Crumbs.styles.tsx index 8fe3480a3a9..848a0a164bc 100644 --- a/packages/manager/src/components/Breadcrumb/Crumbs.styles.tsx +++ b/packages/manager/src/components/Breadcrumb/Crumbs.styles.tsx @@ -4,11 +4,10 @@ import { Typography } from 'src/components/Typography'; export const StyledTypography = styled(Typography, { label: 'StyledTypography', -})(({ theme }) => ({ +})(({}) => ({ '&:hover': { textDecoration: 'underline', }, - color: theme.textColors.tableHeader, fontSize: '1.125rem', lineHeight: 'normal', textTransform: 'capitalize', diff --git a/packages/manager/src/components/Button/StyledActionButton.ts b/packages/manager/src/components/Button/StyledActionButton.ts index aa711d36626..008257f5a50 100644 --- a/packages/manager/src/components/Button/StyledActionButton.ts +++ b/packages/manager/src/components/Button/StyledActionButton.ts @@ -15,10 +15,12 @@ export const StyledActionButton = styled(Button, { })(({ theme, ...props }) => ({ ...(!props.disabled && { '&:hover': { - backgroundColor: theme.palette.primary.main, - color: theme.name === 'dark' ? theme.color.black : theme.color.white, + backgroundColor: theme.color.buttonPrimaryHover, + color: theme.color.white, }, }), + background: 'transparent', + color: theme.textColors.linkActiveLight, fontFamily: latoWeb.normal, fontSize: '14px', lineHeight: '16px', diff --git a/packages/manager/src/components/Button/StyledTagButton.ts b/packages/manager/src/components/Button/StyledTagButton.ts index df83fcc4c88..d0dae58b7cd 100644 --- a/packages/manager/src/components/Button/StyledTagButton.ts +++ b/packages/manager/src/components/Button/StyledTagButton.ts @@ -24,11 +24,12 @@ export const StyledTagButton = styled(Button, { }), ...(!props.disabled && { '&:hover, &:focus': { - backgroundColor: theme.color.tagButton, + backgroundColor: theme.color.tagButtonBg, border: 'none', + color: theme.color.tagButtonText, }, - backgroundColor: theme.color.tagButton, - color: theme.textColors.linkActiveLight, + backgroundColor: theme.color.tagButtonBg, + color: theme.color.tagButtonText, }), })); diff --git a/packages/manager/src/components/ColorPalette/ColorPalette.tsx b/packages/manager/src/components/ColorPalette/ColorPalette.tsx index 620a62c6015..9404371eea9 100644 --- a/packages/manager/src/components/ColorPalette/ColorPalette.tsx +++ b/packages/manager/src/components/ColorPalette/ColorPalette.tsx @@ -102,7 +102,7 @@ export const ColorPalette = () => { { alias: 'theme.color.drawerBackdrop', color: theme.color.drawerBackdrop }, { alias: 'theme.color.label', color: theme.color.label }, { alias: 'theme.color.disabledText', color: theme.color.disabledText }, - { alias: 'theme.color.tagButton', color: theme.color.tagButton }, + { alias: 'theme.color.tagButton', color: theme.color.tagButtonBg }, { alias: 'theme.color.tagIcon', color: theme.color.tagIcon }, ]; diff --git a/packages/manager/src/components/EntityHeader/EntityHeader.stories.tsx b/packages/manager/src/components/EntityHeader/EntityHeader.stories.tsx index 795daa1010f..e1b05f120ad 100644 --- a/packages/manager/src/components/EntityHeader/EntityHeader.stories.tsx +++ b/packages/manager/src/components/EntityHeader/EntityHeader.stories.tsx @@ -40,32 +40,14 @@ export const Default: Story = { variant: 'h2', }, render: (args) => { - const sxActionItem = { - '&:hover': { - backgroundColor: '#3683dc', - color: '#fff', - }, - color: '#2575d0', - fontFamily: '"LatoWeb", sans-serif', - fontSize: '0.875rem', - height: '34px', - minWidth: 'auto', - }; - return ( Chip / Progress Go Here - - - + + + { span': { '&:focus': { - backgroundColor: theme.color.tagButton, + backgroundColor: theme.color.tagButtonBg, color: theme.color.black, }, '&:hover': { @@ -66,7 +66,7 @@ export const StyledChip = styled(Chip, { color: 'white', }, }, - backgroundColor: theme.color.tagButton, + backgroundColor: theme.color.tagButtonBg, }), })); diff --git a/packages/manager/src/components/TagCell/TagCell.tsx b/packages/manager/src/components/TagCell/TagCell.tsx index a79ea11bd84..48687d4da7c 100644 --- a/packages/manager/src/components/TagCell/TagCell.tsx +++ b/packages/manager/src/components/TagCell/TagCell.tsx @@ -219,7 +219,7 @@ const StyledIconButton = styled(IconButton)(({ theme }) => ({ backgroundColor: theme.palette.primary.main, color: '#ffff', }, - backgroundColor: theme.color.tagButton, + backgroundColor: theme.color.tagButtonBg, borderRadius: 0, color: theme.color.tagIcon, height: 30, diff --git a/packages/manager/src/features/Linodes/LinodeEntityDetail.styles.ts b/packages/manager/src/features/Linodes/LinodeEntityDetail.styles.ts index 47af5c1e3da..f59d4fb895c 100644 --- a/packages/manager/src/features/Linodes/LinodeEntityDetail.styles.ts +++ b/packages/manager/src/features/Linodes/LinodeEntityDetail.styles.ts @@ -122,7 +122,8 @@ export const StyledTable = styled(Table, { label: 'StyledTable' })( whiteSpace: 'nowrap', }, '& th': { - backgroundColor: theme.bg.app, + backgroundColor: + theme.name === 'light' ? theme.color.grey10 : theme.bg.app, borderBottom: `1px solid ${theme.bg.bgPaper}`, color: theme.textColors.textAccessTable, fontFamily: theme.font.bold, @@ -136,6 +137,7 @@ export const StyledTable = styled(Table, { label: 'StyledTable' })( '& tr': { height: 32, }, + border: 'none', tableLayout: 'fixed', }) ); diff --git a/packages/manager/src/features/Linodes/LinodeEntityDetailHeader.tsx b/packages/manager/src/features/Linodes/LinodeEntityDetailHeader.tsx index a7846f58163..ccf6bba591a 100644 --- a/packages/manager/src/features/Linodes/LinodeEntityDetailHeader.tsx +++ b/packages/manager/src/features/Linodes/LinodeEntityDetailHeader.tsx @@ -134,10 +134,13 @@ export const LinodeEntityDetailHeader = ( formattedTransitionText !== formattedStatus; const sxActionItem = { + '&:focus': { + color: theme.color.white, + }, '&:hover': { - backgroundColor: theme.color.blue, - color: '#fff', + color: theme.color.white, }, + background: 'transparent', color: theme.textColors.linkActiveLight, fontFamily: theme.font.normal, fontSize: '0.875rem', @@ -197,14 +200,14 @@ export const LinodeEntityDetailHeader = ( onClick={() => handlers.onOpenPowerDialog(isRunning ? 'Power Off' : 'Power On') } - buttonType="secondary" + buttonType="primary" disabled={!(isRunning || isOffline) || isLinodesGrantReadOnly} sx={sxActionItem} > {isRunning ? 'Power Off' : 'Power On'}