Commit bc268a77 authored by Aral Balkan's avatar Aral Balkan
Browse files

Ensure settings folder exists before copying Owncast install script

parent a8c9b3f3
...@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. ...@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [16.3.1] - 2021-04-14
### Fixed
- Ensure Site.js settings directory exists before copying Owncast installation script to it.
## [16.3.0] - 2021-04-14 ## [16.3.0] - 2021-04-14
### Added ### Added
......
...@@ -257,6 +257,7 @@ function enable (args) { ...@@ -257,6 +257,7 @@ function enable (args) {
const internalOwncastInstallationScriptPath = path.resolve(path.join(__dirname, '..', 'sh', 'install-owncast.sh')) const internalOwncastInstallationScriptPath = path.resolve(path.join(__dirname, '..', 'sh', 'install-owncast.sh'))
const installationScript = fs.readFileSync(internalOwncastInstallationScriptPath, 'utf-8') const installationScript = fs.readFileSync(internalOwncastInstallationScriptPath, 'utf-8')
const externalOwncastInstallationScriptPath = path.join(Site.settingsDirectory, 'install-owncast.sh') const externalOwncastInstallationScriptPath = path.join(Site.settingsDirectory, 'install-owncast.sh')
fs.ensureDirSync(Site.settingsDirectory)
fs.writeFileSync(externalOwncastInstallationScriptPath, installationScript, {encoding: 'utf-8', mode: 0o755}) fs.writeFileSync(externalOwncastInstallationScriptPath, installationScript, {encoding: 'utf-8', mode: 0o755})
childProcess.execSync(`OWNCAST_INSTALL_DIRECTORY=${owncastDirectory} ${externalOwncastInstallationScriptPath}`, {env: process.env, stdio: 'pipe'}) childProcess.execSync(`OWNCAST_INSTALL_DIRECTORY=${owncastDirectory} ${externalOwncastInstallationScriptPath}`, {env: process.env, stdio: 'pipe'})
console.log(` 💮️ ❨site.js❩ Owncast installed at ${owncastDirectory}.`) console.log(` 💮️ ❨site.js❩ Owncast installed at ${owncastDirectory}.`)
......
{ {
"name": "@small-tech/site.js", "name": "@small-tech/site.js",
"version": "16.3.0", "version": "16.3.1",
"description": "Small Web construction set.", "description": "Small Web construction set.",
"keywords": [ "keywords": [
"web server", "web server",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment