Skip to content

Commit

Permalink
add mount service command
Browse files Browse the repository at this point in the history
  • Loading branch information
arc119226 committed Aug 20, 2020
1 parent afc981a commit 6de7355
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sql/backup.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1.

create table if not exists new_user select * from user; -- exclude index

2.

create table new_user like user; -- create empty table include index
insert into new_user select * from user; -- import data
18 changes: 18 additions & 0 deletions win/mount_service.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
prunsrv install ArcService ^
--DisplayName="ArcService" ^
--Install=%cd%\prunsrv.exe ^
--JvmMx=1024M ^
--JvmMs=256M ^
--JvmMs=1M ^
--Jvm=auto ^
--StartMode=jvm ^
--StopMode=jvm ^
--Classpath=starter.jar ^
--StartClass=com.arc.core.Starter ^
--StartMethod=start ^
--StopMode=jvm ^
--StopClass=com.arc.core.Starter ^
--StopMethod=stop ^
--StdOutput=out.txt ^
--StdError=error.txt
pause
30 changes: 30 additions & 0 deletions win/src/com/arc/core/Starter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.arc.core;

public class Starter {
public static boolean isStart=false;
public static void main(String[] args) {
String mode = args[0];
if ("start".equals(mode)){
System.out.println("start");
start(args);
}
System.out.println("stop");
}

public static void start(String[] args) {
isStart=true;
while(isStart) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {

}
}
System.out.println("after start loop");
}

public static void stop(String[] args) {
isStart=false;
}

}

0 comments on commit 6de7355

Please sign in to comment.