Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linuxconf
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
linuxconf
Commits
151490e6
There was an error fetching the commit references. Please try again later.
Commit
151490e6
authored
1 month ago
by
Recolic
Browse files
Options
Downloads
Patches
Plain Diff
.important bugfix and bump version
parent
e31c6414
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
linuxconf
+7
-5
7 additions, 5 deletions
linuxconf
with
7 additions
and
5 deletions
linuxconf
+
7
−
5
View file @
151490e6
...
@@ -16,7 +16,7 @@ function lc_bgrun () {
...
@@ -16,7 +16,7 @@ function lc_bgrun () {
# Usage: lc_bgrun /var/log/your.log sslocal -s xxx -p 'hello world my password' -l xxx --xxx
# Usage: lc_bgrun /var/log/your.log sslocal -s xxx -p 'hello world my password' -l xxx --xxx
# Usage: lc_bgrun /var/log/your.log auto_restart frpc -c my_server.ini
# Usage: lc_bgrun /var/log/your.log auto_restart frpc -c my_server.ini
# Usage: lc_bgrun /dev/null every 1h curl https://example-ddns.com/api
# Usage: lc_bgrun /dev/null every 1h curl https://example-ddns.com/api
# v202504-
3
# v202504-
4
local
logF
=
"
$1
"
local
logF
=
"
$1
"
shift
shift
local
cmd
=
"
$1
"
local
cmd
=
"
$1
"
...
@@ -29,9 +29,11 @@ function lc_bgrun () {
...
@@ -29,9 +29,11 @@ function lc_bgrun () {
cmd
=
auto_restart
cmd
=
auto_restart
shift
shift
fi
fi
if
[
"
$cmd
"
=
auto_restart
]
&&
[
!
-f
/tmp/.auto_restart
]
;
then
if
[
"
$cmd
"
=
auto_restart
]
;
then
echo
IyEvYmluL2Jhc2gKd2hpbGUgdHJ1ZTsgZG8KWyAkc3luYyA9IDEgXSAmJiAiJEAiClsgJHN5bmMgPSAwIF0gJiYgIiRAIiAmCnNsZWVwICIkdCIKZG9uZQo
=
|
base64
-d
>
/tmp/.auto_restart
if
[
!
-f
/tmp/.auto_restart
]
;
then
chmod
ugo+rx /tmp/.auto_restart
echo
IyEvYmluL2Jhc2gKd2hpbGUgdHJ1ZTsgZG8KWyAkc3luYyA9IDEgXSAmJiAiJEAiClsgJHN5bmMgPSAwIF0gJiYgIiRAIiAmCnNsZWVwICIkdCIKZG9uZQo
=
|
base64
-d
>
/tmp/.auto_restart
chmod
ugo+rx /tmp/.auto_restart
fi
cmd
=
/tmp/.auto_restart
cmd
=
/tmp/.auto_restart
fi
fi
echo
"[
$(
date
--utc
)
] EXEC
$cmd
$@
"
>>
"
$logF
"
echo
"[
$(
date
--utc
)
] EXEC
$cmd
$@
"
>>
"
$logF
"
...
@@ -254,7 +256,7 @@ function lci_install_login_hook () {
...
@@ -254,7 +256,7 @@ function lci_install_login_hook () {
fi
fi
}
}
lci_version
=
0.2.
3
lci_version
=
0.2.
4
subcommand
=
"
$1
"
subcommand
=
"
$1
"
if
[[
"
$subcommand
"
!=
register
]]
&&
[[
"
$subcommand
"
!=
""
]]
;
then
if
[[
"
$subcommand
"
!=
register
]]
&&
[[
"
$subcommand
"
!=
""
]]
;
then
[[
!
-f
/etc/linuxconf.conf
]]
&&
lc_die
"Please run '
$0
register <path/to/masterconf.sh>' at least once"
[[
!
-f
/etc/linuxconf.conf
]]
&&
lc_die
"Please run '
$0
register <path/to/masterconf.sh>' at least once"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment