Add systemd service support with servicectl
This commit is contained in:
parent
fdcb3acf30
commit
dc88d63389
@ -11,7 +11,4 @@ mount -R /run $CHROOT/run
|
||||
mount -R /lib/modules $CHROOT/lib/modules
|
||||
mount -R /boot $CHROOT/boot
|
||||
mount -R /var/lib/dbus $CHROOT/var/lib/dbus
|
||||
|
||||
# Runit will re-execute scripts those are finished,
|
||||
# so we create a neverending loop.
|
||||
while true; do sleep 10800; done
|
||||
chroot $CHROOT /usr/local/bin/serviced
|
@ -14,6 +14,13 @@ pacman-key --init
|
||||
pacman-key --populate archlinux
|
||||
msg "Installing essential packages..."
|
||||
pacman -Syu base base-devel xorg pulseaudio --noconfirm
|
||||
msg "Installing servicectl..."
|
||||
mkdir -p /usr/local/share/servicectl/enabled
|
||||
curl -L 'https://raw.githubusercontent.com/lemniskett/servicectl/master/servicectl' > /usr/local/share/servicectl/servicectl 2>/dev/null
|
||||
curl -L 'https://raw.githubusercontent.com/lemniskett/servicectl/master/serviced' > /usr/local/share/servicectl/serviced 2>/dev/null
|
||||
chmod +x /usr/local/share/servicectl/service{d,ctl}
|
||||
ln -s /usr/local/share/servicectl/servicectl /usr/local/bin/servicectl
|
||||
ln -s /usr/local/share/servicectl/serviced /usr/local/bin/serviced
|
||||
msg "Creating user account..."
|
||||
CHROOT_USER="$(cat /tmp/archbox_user)"
|
||||
useradd -m $CHROOT_USER
|
||||
@ -27,3 +34,4 @@ while true; do
|
||||
passwd $CHROOT_USER && break
|
||||
done
|
||||
sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers
|
||||
echo "Don't forget to run /usr/local/share/archbox/bin/archboxinit in host on boot"
|
||||
|
@ -7,7 +7,7 @@ install -v -D -m 755 ./copyresolv.bash /usr/local/share/archbox/bin/copyresolv
|
||||
install -v -D -m 755 ./archboxcommand.bash /usr/local/share/archbox/bin/archbox
|
||||
install -v -D -m 755 ./remount_run.bash /usr/local/share/archbox/bin/remount_run
|
||||
install -v -D -m 755 ./chroot_setup.bash /usr/local/share/archbox/chroot_setup.bash
|
||||
|
||||
install -v -D -m 755 ./archboxinit.bash /usr/local/share/archbox/bin/archboxinit
|
||||
[[ -z $1 ]] && exit 0
|
||||
|
||||
if [ $1 = "--exp" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user