dat-boi daemon
This commit is contained in:
parent
0d7c503363
commit
4c21484c95
|
@ -373,19 +373,49 @@ function mesh_install_dat {
|
|||
#!/bin/bash
|
||||
npm install --arch=$NPM_ARCH -g dat
|
||||
npm install --arch=$NPM_ARCH -g @garbados/dat-boi
|
||||
npm install --arch=$NPM_ARCH -g add-to-systemd
|
||||
add-to-systemd dat-boi --user "$(whoami)" "$(which dat-boi)"
|
||||
EOF
|
||||
chroot "$rootdir" /bin/chmod +x /usr/bin/install_dat
|
||||
chroot "$rootdir" /usr/bin/install_dat
|
||||
rm "$rootdir/usr/bin/install_dat"
|
||||
|
||||
{ echo '[Unit]';
|
||||
echo 'Description=DAT-boi';
|
||||
echo 'After=syslog.target';
|
||||
echo 'After=network.target';
|
||||
echo '';
|
||||
echo '[Service]';
|
||||
echo 'Type=simple';
|
||||
echo 'User=root';
|
||||
echo 'Group=root';
|
||||
echo 'ExecStart=/usr/local/bin/dat-boi';
|
||||
echo 'Restart=always';
|
||||
echo '';
|
||||
echo '[Install]';
|
||||
echo 'WantedBy=multi-user.target'; } > "$rootdir/etc/systemd/system/dat-boi.service"
|
||||
chmod +x "$rootdir/etc/systemd/system/dat-boi.service"
|
||||
chroot "$rootdir" systemctl enable dat-boi
|
||||
}
|
||||
|
||||
function install_dat {
|
||||
npm install -g dat
|
||||
npm install -g @garbados/dat-boi
|
||||
npm install -g add-to-systemd
|
||||
add-to-systemd dat-boi --user "$(whoami)" "$(which dat-boi)"
|
||||
|
||||
{ echo '[Unit]';
|
||||
echo 'Description=DAT-boi';
|
||||
echo 'After=syslog.target';
|
||||
echo 'After=network.target';
|
||||
echo '';
|
||||
echo '[Service]';
|
||||
echo 'Type=simple';
|
||||
echo 'User=root';
|
||||
echo 'Group=root';
|
||||
echo 'ExecStart=/usr/local/bin/dat-boi';
|
||||
echo 'Restart=always';
|
||||
echo '';
|
||||
echo '[Install]';
|
||||
echo 'WantedBy=multi-user.target'; } > /etc/systemd/system/dat-boi.service
|
||||
chmod +x /etc/systemd/system/dat-boi.service
|
||||
systemctl enable dat-boi
|
||||
}
|
||||
|
||||
function mesh_install_scuttlebot {
|
||||
|
|
Loading…
Reference in New Issue