Skip to content

Commit

Permalink
fix: port when resetting to defaults (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrodriguez authored Jan 12, 2024
1 parent 7b28c50 commit 7e65046
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions meta/plugin/unbalanced.page
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Enable unbalanced server:
</select>

Port:
: <input id="PORT" type="text" class="stopped" name="PORT" maxlength="40" value="<?=$unbalanced_port;?>" title="port must be 0-65535" placeholder="Default Port is 6237" >
: <input id="PORT" type="text" class="stopped" name="PORT" maxlength="40" value="<?=$unbalanced_port;?>" title="port must be 0-65535" placeholder="Default Port is 7090" >

<!-- Run as User:
: <select id="USERS" class="stopped" title="select user, cannot be root" size="1" onChange="checkUSER(this.form, '<?=$unbalanced_runas;?>');">
Expand All @@ -59,7 +59,7 @@ $(function(){
});

function resetDATA(form) {
form.PORT.value = "6237";
form.PORT.value = "7090";
// form.RUNAS.value = "nobody";
form.USERS.value = "nobody";
}
Expand Down Expand Up @@ -97,10 +97,10 @@ function checkRUNNING(form) {

function verifyDATA(form) {
if (isNaN(form.PORT.value)){
form.PORT.value = "6237";
form.PORT.value = "7090";
} else {
if (form.PORT.value < 0 || form.PORT.value > 65535){
form.PORT.value = "6237";
form.PORT.value = "7090";
}
}
// if (form.RUNAS.value == null || form.RUNAS.value == "" || form.RUNAS.value == "root" ){
Expand Down
2 changes: 1 addition & 1 deletion unbalance.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var Version string
// const ReservedSpace int64 = 512 * 1024 * 1024 // 512Mb

var cli struct {
Port string `default:"6237" help:"port to listen on"`
Port string `default:"7090" help:"port to listen on"`
LogsDir string `default:"/var/log" help:"directory to store logs"`

// Config vars
Expand Down

0 comments on commit 7e65046

Please sign in to comment.