]> Git repositories of Nishi - koakuma.git/commitdiff
fix stuff
authorNishi <nishi@nishi.boats>
Wed, 2 Oct 2024 07:31:01 +0000 (07:31 +0000)
committerNishi <nishi@nishi.boats>
Wed, 2 Oct 2024 07:31:01 +0000 (07:31 +0000)
git-svn-id: file:///raid/svn-personal/koakuma/trunk@17 219d0f9c-2d94-d447-890a-813e76b88fe9

Makefile
Tool/launch-job.in
Utility/rpc.tcl

index 3cff58a2c7194234906a07904e718cd05c7bbe07..6b9efa46aec0f3154f71e0a7f40f884614ecf565 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,8 +21,8 @@ install: Component/* Tool/* Utility/* Static/* koakuma.cgi.in apache.conf.in
        $(REPLACE) Tool/launch-job.in > $(PREFIX)/bin/launch-job
        cp -rf Static/* $(PREFIX)/lib/koakuma/htdocs/static/
        $(REPLACE) koakuma.cgi.in > $(PREFIX)/lib/koakuma/cgi-bin/koakuma.cgi
-       $(REPLACE) apache.conf.in > $(PREFIX)/etc/koakuma/apache.conf
-       cp cgi.conf $(PREFIX)/etc/koakuma/
+       if [ ! -e "$(PREFIX)/etc/koakuma/apache.conf" ] ; then $(REPLACE) apache.conf.in > $(PREFIX)/etc/koakuma/apache.conf ; fi
+       if [ ! -e "$(PREFIX)/etc/koakuma/cgi.conf" ] ; then cp cgi.conf $(PREFIX)/etc/koakuma/ ; fi
        chmod +x $(PREFIX)/lib/koakuma/cgi-bin/koakuma.cgi
        chmod +x $(PREFIX)/bin/create-project
        chmod +x $(PREFIX)/bin/launch-job
index 70d5bca418446b6cacae59bf4ff568d791fbe60f..32ed5421f581e8bf4bc7dbab515c6df44317c9cd 100644 (file)
@@ -23,9 +23,9 @@ foreach arg $argv {
                }
        } else {
                if { "$dothis" == "set-username" } {
-                       set ::rpc::useranme "$arg"
+                       ::rpc::set-username "$arg"
                } elseif { "$dothis" == "set-password" } {
-                       set ::rpc::password "$arg"
+                       ::rpc::set-password "$arg"
                } elseif { "$dothis" == "set-rpc" } {
                        set RPC_URL "$arg"
                } elseif { "$name" == "" } {
index 7fff1b82e5a7cc7a7fb8469172e6c1fab77dd62b..7080f74593ebfc37a7da9c4c23a086e9009f4687 100644 (file)
@@ -16,6 +16,8 @@ if { [info exists "env(KOAKUMA_RPC)"] } {
 set RPC_URL "[regsub {/+$} "$RPC_URL" ""]"
 
 namespace eval rpc {
+       set username ""
+       set password ""
        proc require-auth {} {
                global RPC_URL
                set tok [::http::geturl "$RPC_URL"]
@@ -29,8 +31,14 @@ namespace eval rpc {
                        return 0
                }
        }
-       set username ""
-       set password ""
+       proc set-username {us} {
+               global username
+               set ::rpc::username "$us"
+       }
+       proc set-password {pw} {
+               global password
+               set ::rpc::password "$pw"
+       }
        proc ask-auth {} {
                global username
                global password