Add stage3
- Install libnss-mdns package - Sudo without password - Add and enable vision service
This commit is contained in:
@@ -0,0 +1 @@
|
||||
libnss-mdns
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Enable password-less sudo for everyone
|
||||
echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> "${ROOTFS_DIR}/etc/sudoers"
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Install the service so the system can run it
|
||||
install -m 755 files/vision.service "${ROOTFS_DIR}/etc/systemd/system"
|
||||
|
||||
on_chroot << EOF
|
||||
# Reload the system services
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
# Enable our vision service on startup
|
||||
sudo systemctl enable vision
|
||||
EOF
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=FRC Vision Service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/home/vision/visionProgram
|
||||
WorkingDirectory=/home/vision
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ ! -d "${ROOTFS_DIR}" ]; then
|
||||
copy_previous
|
||||
fi
|
||||
Reference in New Issue
Block a user