diff --git a/EpsonPrintService/EpsonPrintService.csproj b/EpsonPrintService/EpsonPrintService.csproj index 3e07211..e253044 100644 --- a/EpsonPrintService/EpsonPrintService.csproj +++ b/EpsonPrintService/EpsonPrintService.csproj @@ -5,7 +5,7 @@ net8.0 enable enable - 1.0.0 + 1.0.2 @@ -28,6 +28,15 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/EpsonPrintService/install.sh b/EpsonPrintService/install.sh new file mode 100644 index 0000000..36672e9 --- /dev/null +++ b/EpsonPrintService/install.sh @@ -0,0 +1,6 @@ +#!/bin/bash +chmod +x start.sh +cp -rf print_server.service /etc/systemd/system/print_server.service +systemctl daemon-reload +systemctl enable print_server.service +systemctl start print_server.service \ No newline at end of file diff --git a/EpsonPrintService/postinst b/EpsonPrintService/postinst index 30fe990..eea9c28 100644 --- a/EpsonPrintService/postinst +++ b/EpsonPrintService/postinst @@ -1,5 +1,5 @@ chmod +x start.sh -cp -rf epson.service /etc/systemd/system/epson.service -systemctl enable epson.service -systemctl start epson.service +cp -rf print_server.service /etc/systemd/system/print_server.service +systemctl enable print_server.service +systemctl start print_server.service systemctl daemon-reload \ No newline at end of file diff --git a/EpsonPrintService/prem b/EpsonPrintService/prem index 0907fc2..d9e094b 100644 --- a/EpsonPrintService/prem +++ b/EpsonPrintService/prem @@ -1,2 +1,2 @@ -systemctl stop epson.service -systemctl disable epson.service \ No newline at end of file +systemctl stop print_server.service +systemctl disable print_server.service \ No newline at end of file diff --git a/EpsonPrintService/print_server.service b/EpsonPrintService/print_server.service new file mode 100644 index 0000000..ddc2c26 --- /dev/null +++ b/EpsonPrintService/print_server.service @@ -0,0 +1,12 @@ +[Unit] +Description=print_server service + +[Service] +Restart=always +RestartSec=1 +WorkingDirectory=/home/pi/insin/installed_packages/print_server +Type=simple +ExecStart=/bin/bash /home/pi/insin/installed_packages/print_server/start.sh + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/EpsonPrintService/start.sh b/EpsonPrintService/start.sh index 32fee00..0bbd5ff 100644 --- a/EpsonPrintService/start.sh +++ b/EpsonPrintService/start.sh @@ -1,2 +1,2 @@ #!/bin/bash -/root/.dotnet/dotnet /home/oem/epson_service/EpsonPrintService.dll \ No newline at end of file +/root/.dotnet/dotnet /home/pi/insin/installed_packages/print_server/EpsonPrintService.dll \ No newline at end of file diff --git a/EpsonPrintService/uninstall.sh b/EpsonPrintService/uninstall.sh new file mode 100644 index 0000000..08cc727 --- /dev/null +++ b/EpsonPrintService/uninstall.sh @@ -0,0 +1,5 @@ +#!/bin/bash +systemctl stop print_server.service +systemctl disable print_server.service +rm -f /etc/systemd/system/print_server.service +systemctl daemon-reload \ No newline at end of file