UNPKG

hosty

Version:

A code based opinionated way to self-host and manage web apps.

10 lines 660 B
import { block } from './block.js'; import { builtin } from '../ansible/tasks/index.js'; export function delete_domain({ domain, caddyfile_path }) { return block(`Delete domain ${domain}`, {}, [ builtin.lineinfile(`Remove ${domain} from /etc/hosts`, { path: '/etc/hosts', line: `127.0.0.1 ${domain}`, state: 'absent' }, { become: true }), builtin.file(`Delete Caddyfile for ${domain}`, { path: caddyfile_path, state: 'absent' }, { register: 'caddyfile' }), builtin.command(`Reload caddy`, { cmd: `sudo systemctl reload caddy` }, { become: true, when: 'caddyfile.changed' }), ]).get(); } //# sourceMappingURL=delete_domain.js.map