···1#!/usr/bin/bash
02cat << EOF > ${pkgbuild_path}/README.md
3# knotserver-git
4···10## SSH
1112SSH access is required to push to repositories. To enable, use the sshd_config.d drop-in, and give the
13-\`${knotserver_user:-git}\` user a shell and a home directory:
1415\`\`\`bash
16ln -s /usr/lib/systemd/sshd_config.d/knotserver.conf /etc/ssh/sshd_config.d/30-knotserver.conf
17-usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user:-git}
18\`\`\`
1920EOF
···1#!/usr/bin/bash
2+set -eu
3cat << EOF > ${pkgbuild_path}/README.md
4# knotserver-git
5···11## SSH
1213SSH access is required to push to repositories. To enable, use the sshd_config.d drop-in, and give the
14+\`${knotserver_user}\` user a shell and a home directory:
1516\`\`\`bash
17ln -s /usr/lib/systemd/sshd_config.d/knotserver.conf /etc/ssh/sshd_config.d/30-knotserver.conf
18+usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user}
19\`\`\`
2021EOF
+3-2
src/knotserver-shared/install.sh
···1#!/usr/bin/bash
02cat << EOF > ${pkgbuild_path}/knotserver.install
3post_install() {
4 echo
5- echo knotserver installed, with repositories stored in: ${knotserver_repo_path:-/var/lib/tangled/repositories}
6 echo
7 echo Use "systemctl edit knotserver.service" to set "KNOT_SERVER_OWNER" to the DID of the knot owner,
8 echo and override "KNOT_SERVER_HOSTNAME" if 'hostname' does not return the FQDN echo of your knot.
9 echo
10 echo To enable git push over ssh for tangled repositories, run:
11 echo " ln -s /usr/lib/systemd/sshd_config.d/knotserver.conf /etc/ssh/sshd_config.d/30-knotserver.conf"
12- echo " usermod -s /usr/bin/bash -d ${knotserver_repo_path:-/var/lib/tangled/repositories} ${knotserver_user:-git}"
13 echo
14 echo and reload sshd
15 echo
···1#!/usr/bin/bash
2+set -eu
3cat << EOF > ${pkgbuild_path}/knotserver.install
4post_install() {
5 echo
6+ echo knotserver installed, with repositories stored in: ${knotserver_repo_path}
7 echo
8 echo Use "systemctl edit knotserver.service" to set "KNOT_SERVER_OWNER" to the DID of the knot owner,
9 echo and override "KNOT_SERVER_HOSTNAME" if 'hostname' does not return the FQDN echo of your knot.
10 echo
11 echo To enable git push over ssh for tangled repositories, run:
12 echo " ln -s /usr/lib/systemd/sshd_config.d/knotserver.conf /etc/ssh/sshd_config.d/30-knotserver.conf"
13+ echo " usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user}"
14 echo
15 echo and reload sshd
16 echo
···1#!/usr/bin/bash
02cat << EOF > ${pkgbuild_path}/README.md
3# knotserver
4···10## SSH
1112SSH access is required to push to repositories. To enable, use the sshd_config.d drop-in, and give the
13-\`${knotserver_user:-git}\` user a shell and a home directory:
1415\`\`\`bash
16ln -s /usr/lib/systemd/sshd_config.d/knotserver.conf /etc/ssh/sshd_config.d/30-knotserver.conf
17-usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user:-git}
18\`\`\`
1920EOF
···1#!/usr/bin/bash
2+set -eu
3cat << EOF > ${pkgbuild_path}/README.md
4# knotserver
5···11## SSH
1213SSH access is required to push to repositories. To enable, use the sshd_config.d drop-in, and give the
14+\`${knotserver_user}\` user a shell and a home directory:
1516\`\`\`bash
17ln -s /usr/lib/systemd/sshd_config.d/knotserver.conf /etc/ssh/sshd_config.d/30-knotserver.conf
18+usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user}
19\`\`\`
2021EOF