35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Start installation AIO_3D_Print_Exp"
|
|
|
|
echo "Clean existing installation"
|
|
# rm -rf /opt/AIO_3D_Print_Exp
|
|
systemctl stop aio-3d-main.service
|
|
systemctl stop aio-3d-huey.service
|
|
# rm -rf /etc/systemd/system/aio-3d-main.service
|
|
# rm -rf /etc/systemd/system/aio-3d-huey.service
|
|
|
|
echo "Copy installation files"
|
|
# mkdir -p /opt/AIO_3D_Print_Exp
|
|
# cp -r ./. /opt/AIO_3D_Print_Exp/
|
|
|
|
echo "Set execute permissions"
|
|
# chmod +x /opt/AIO_3D_Print_Exp/run_main.sh
|
|
# chmod +x /opt/AIO_3D_Print_Exp/run_huey.sh
|
|
|
|
echo "Copy service files"
|
|
# cp /opt/AIO_3D_Print_Exp/aio-3d-main.service /etc/systemd/system/
|
|
# cp /opt/AIO_3D_Print_Exp/aio-3d-huey.service /etc/systemd/system/
|
|
cp /home/lhye200/AIO_3D_Print_Exp/aio-3d-main.service /etc/systemd/system/
|
|
cp /home/lhye200/AIO_3D_Print_Exp/aio-3d-huey.service /etc/systemd/system/
|
|
|
|
echo "Reload systemd daemon"
|
|
systemctl daemon-reload
|
|
systemctl enable aio-3d-main.service
|
|
systemctl enable aio-3d-huey.service
|
|
systemctl start aio-3d-huey.service
|
|
systemctl start aio-3d-main.service
|
|
|
|
echo "Installation completed successfully"
|
|
|