Skip to content

Commit 399ff37

Browse files
a bunch of ssh stuff works now
1 parent 54a4479 commit 399ff37

2 files changed

Lines changed: 421 additions & 1 deletion

File tree

src/initial_fs_setup.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,24 @@ const setup_boot = async (fs: AbstractFileSystem) => {
110110
await fs.write_file(absolute_fingerd_service, fingerd_service_content);
111111
}
112112

113+
// create /etc/services/privileged/sshd.service.json file if it doesn't exist
114+
const ssh_service_content = `{
115+
"name": "SSH Server",
116+
"dependencies": [],
117+
"exec": "sshd",
118+
"auto_start": false,
119+
"oneshot": false,
120+
"restart": {
121+
"on": "failure",
122+
"delay_ms": 1000,
123+
"max_retries": 5
124+
}
125+
}`.replaceAll("\n", NEWLINE);
126+
const absolute_ssh_service = fs.absolute("/etc/services/privileged/sshd.service.json");
127+
if (!(await fs.exists(absolute_ssh_service))) {
128+
await fs.write_file(absolute_ssh_service, ssh_service_content);
129+
}
130+
113131
// create /home/.plan file if it doesn't exist
114132
const plan_content = "Hello! I am using OllieOS!";
115133
const absolute_plan = fs.absolute("/home/.plan");

0 commit comments

Comments
 (0)