-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
178 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
mkdir dist | ||
#cd client && bun build --compile --minify --target=bun-linux-x64 --sourcemap ./index.ts --outfile ./ArtemisClient | ||
#mv ArtemisClient ../dist | ||
cd client-go && go build -o ArtemisClient && mv ArtemisClient ../dist | ||
cd client-go && CGO_ENABLED=0 go build -o ArtemisClient && mv ArtemisClient ../dist | ||
cd .. | ||
cd server && bun build --compile --minify --target=bun-linux-x64 --sourcemap ./src/index.ts --outfile ./ArtemisServer | ||
mv ArtemisServer ../dist | ||
cd .. | ||
cd frontend && bunx --bun vite build && mv ./dist ../dist/frontend | ||
cd frontend && bunx --bun vite build && mv ./dist ../dist/frontend && cd ../dist && tar zcvf frontend.tar.gz frontend/ && rm -rf ./frontend |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,57 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"os/signal" | ||
"syscall" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
var GlobalConfiguration GlobalConfigure | ||
|
||
var serverData ServerObj | ||
|
||
func main() { | ||
var rootCmd = &cobra.Command{ | ||
Use: "ArtemisClient", | ||
Short: "ArtemisClient - HPFS server monitor", | ||
Long: ` | ||
ArtemisClient [email protected] | ||
Artemis is an HPFS server monitor | ||
for more information please checkout | ||
https://github.com/kwaitsing/Artemis`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
|
||
serverData = ServerObj{ | ||
Name: GlobalConfiguration.Name, | ||
Location: "trans", | ||
} | ||
|
||
interrupt := make(chan os.Signal, 1) | ||
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM) | ||
interrupt := make(chan os.Signal, 1) | ||
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM) | ||
go socket() | ||
|
||
initVar() | ||
go socket() | ||
// Die Brutally | ||
<-interrupt | ||
os.Exit(0) | ||
}, | ||
} | ||
rootCmd.SilenceUsage = true | ||
rootCmd.SilenceErrors = true | ||
rootCmd.PersistentFlags().StringVarP(&GlobalConfiguration.Remote, "remote", "r", "ws://127.0.0.0:9702", "Remote WS Server") | ||
rootCmd.PersistentFlags().StringVarP(&GlobalConfiguration.Key, "key", "k", "oATqKPjF72wau8MdJPhV", "Auth key") | ||
rootCmd.PersistentFlags().StringVarP(&GlobalConfiguration.Name, "name", "n", "Infra", "Name of the server") | ||
rootCmd.PersistentFlags().Float32VarP(&GlobalConfiguration.UpdInterval, "updateInterval", "u", 1.2, "Update interval in seconds") | ||
rootCmd.PersistentFlags().BoolVarP(&GlobalConfiguration.Verbose, "verbose", "v", false, "Enable verbose") | ||
|
||
// Die Brutally | ||
<-interrupt | ||
os.Exit(2) | ||
if err := rootCmd.Execute(); err != nil { | ||
if rootCmd.Flags().Lookup("help").Changed { | ||
fmt.Println(rootCmd.Long) | ||
return | ||
} else { | ||
fmt.Println("Error:", err) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,11 @@ const serverConf: IgniteConf = { | |
} | ||
|
||
urn.igniteInstance(serverConf) | ||
|
||
logger(`+ Artemis running on ${serverConf.hostname}:${serverConf.port}`, 0) | ||
|
||
logger(` | ||
ArtemisServer [email protected] | ||
Artemis is an HPFS server monitor | ||
for more information please checkout | ||
https://github.com/kwaitsing/Artemis | ||
`, 0) | ||
logger(` Artemis running on ${serverConf.hostname}:${serverConf.port}\n`, 3) | ||
export type App = typeof instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
$!/bin/bash | ||
|
||
if [[ $EUID -ne 0 ]]; then | ||
echo "Error: This script must be run as root." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$1" ]; then | ||
echo "Error: No WSremote supplied." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$2" ]; then | ||
echo "Error: No name supplied." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$3" ]; then | ||
echo "Error: No Passkey supplied." | ||
exit 1 | ||
fi | ||
|
||
# Create Folder | ||
mkdir -p /opt/Artemis/ | ||
|
||
# Copy Service | ||
echo -n "[Unit] | ||
Description=ArtemisClient | ||
After=multi-user.target | ||
Wants=multi-user.target | ||
[Service] | ||
User=root | ||
ExecStart=/opt/Artemis/ArtemisClient -r \"$1\" -n \"$2\" -k \"$3\" | ||
Restart=on-failure | ||
[Install] | ||
WantedBy=multi-user.target" >/opt/ArtemisArtemisClient.service | ||
|
||
# Download Core and | ||
cd /opt/Artemis && curl -L 'https://github.com/kwaitsing/Artemis/releases/download/pkg/ArtemisClient' >ArtemisClient && chmod +x ArtemisClient && ln -sf /opt/Artemis/ArtemisClient.service /etc/systemd/system/ |
Oops, something went wrong.