Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
b763fd38
Commit
b763fd38
authored
Apr 25, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
serv: add all initial detection, use bash directly
parent
93678e7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
9 deletions
+32
-9
serv
bin/serv
+32
-9
No files found.
bin/serv
View file @
b763fd38
#!/bin/sh
#!/bin/
ba
sh
#
# Copyright (C) 2012-2013, 2016, 2020, 2021 Etersoft
# Copyright (C) 2012-2013, 2016, 2020, 2021 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2013, 2016, 2020, 2021
, 2023
Etersoft
# Copyright (C) 2012-2013, 2016, 2020, 2021
, 2023
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -17,11 +17,34 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
PROGDIR
=
$(
dirname
$0
)
[
"
$PROGDIR
"
=
"."
]
&&
PROGDIR
=
$(
pwd
)
PROGDIR
=
$(
dirname
"
$0
"
)
PROGNAME
=
$(
basename
"
$0
"
)
[
-n
"
$EPMCURDIR
"
]
||
export
EPMCURDIR
=
"
$(
pwd
)
"
CMDSHELL
=
"/bin/bash"
# TODO: pwd for ./epm and which for epm
[
"
$PROGDIR
"
=
"."
]
&&
PROGDIR
=
"
$EPMCURDIR
"
if
[
"
$0
"
=
"/dev/stdin"
]
||
[
"
$0
"
=
"sh"
]
;
then
PROGDIR
=
""
PROGNAME
=
""
fi
# will replaced with /usr/share/eepm during install
SHAREDIR
=
$PROGDIR
# will replaced with /etc/eepm during install
CONFIGDIR
=
$PROGDIR
/../etc
EPMVERSION
=
"@VERSION@"
# package, single (file), pipe, git
EPMMODE
=
"package"
[
"
$SHAREDIR
"
=
"
$PROGDIR
"
]
&&
EPMMODE
=
"single"
[
"
$EPMVERSION
"
=
"@""VERSION""@"
]
&&
EPMMODE
=
"git"
[
"
$PROGNAME
"
=
""
]
&&
EPMMODE
=
"pipe"
if
[
"
$EPMMODE
"
=
"git"
]
;
then
EPMVERSION
=
$(
head
$PROGDIR
/../eepm.spec |
grep
"^Version: "
|
sed
-e
's|Version: ||'
)
fi
# will replaced to /usr/share/eepm during install
SHAREDIR
=
$(
dirname
$0
)
load_helper
()
{
...
...
@@ -98,9 +121,9 @@ print_version()
local
on_text
=
"(host system)"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
echo
"Service manager version
@VERSION@
https://wiki.etersoft.ru/Epm"
echo
"Service manager version
$EPMVERSION
https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Copyright (c) Etersoft 2012-202
1
"
echo
"Copyright (c) Etersoft 2012-202
3
"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment