Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
XRootD-Caching-Setup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ETP-HTC
XRootD-Caching-Setup
Commits
122c7771
Commit
122c7771
authored
7 years ago
by
Christoph Heidecker
Committed by
root
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added systemd service files
parent
7dc95c4b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
systemd/xrootd-daemon.sh
+89
-0
89 additions, 0 deletions
systemd/xrootd-daemon.sh
systemd/xrootd.service
+14
-0
14 additions, 0 deletions
systemd/xrootd.service
with
104 additions
and
0 deletions
.gitignore
+
1
−
0
View file @
122c7771
# ignore cache, tmp, xrootd and xrdbuild directory
/*
!/config
!/systemd
!/*.*
*.root
This diff is collapsed.
Click to expand it.
systemd/xrootd-daemon.sh
0 → 100644
+
89
−
0
View file @
122c7771
#!/bin/bash
#
# Service script for XRootD caching services
# ----------------------------------------
# Service instance name
INSTANCE
=
"XRootD"
# XRootD installation path
XRD_PATH
=
/opt/XRootD
# XRootD logging directory
LOGDIR
=
/var/log/XRootD
# Service PID file
PIDFILE
=
/var/run/xrootd.pid
# Adding libraries to enironment variable
export
LD_LIBRARY_PATH
=
$XRD_PATH
/xrootd/lib64:
$LD_LIBRARY_PATH
export
PATH
=
$XRD_PATH
/xrootd/bin:
$PATH
# Starting command for XRootD services
COMMAND
=
"su xrootd -c 'xrootd -c
$XRD_PATH
/configs/proxy-manager.cf -l=
$LOGDIR
/proxy-manager/xrootd.log -k 100m &' ; su xrootd -c 'cmsd -c
$XRD_PATH
/configs/proxy-manager.cf -l=/logs/proxy-manager/cmsd.log -k 100m &'"
# Check for running service processes
if
[
-f
$PIDFILE
]
then
PID
=
`
cat
$PIDFILE
`
fi
case
"
$1
"
in
'start'
)
if
[
-f
$PIDFILE
]
;
then
if
test
`
ps
-e
|
grep
-c
$PID
`
=
1
;
then
echo
"Not starting
$INSTANCE
- instance already running with PID:
$PID
"
else
echo
"Starting
$INSTANCE
"
#echo "Starting $INSTANCE" > $LOGDIR
cd
$PDIR
nohup
$COMMAND
&>> /dev/null &
#nohup $COMMAND &>> $LOGDIR &
echo
$!
>
$PIDFILE
fi
else
echo
"Starting
$INSTANCE
"
#echo "Starting $INSTANCE" > $LOGDIR
cd
$PDIR
nohup
$COMMAND
&>> /dev/null &
#nohup $COMMAND &>> $LOGDIR &
echo
$!
>
$PIDFILE
fi
;;
'stop'
)
if
[
-f
$PIDFILE
]
;
then
echo
"stopping
$INSTANCE
"
#echo "stopping $INSTANCE" >> $LOGDIR
kill
-15
$PID
else
echo
"Cannot stop
$INSTANCE
- no Pidfile found!"
fi
;;
'restart'
)
$0
stop
sleep
5
$0
start
;;
'status'
)
if
[
-f
$PIDFILE
]
;
then
if
test
`
ps
-e
|
grep
-c
$PID
`
=
0
;
then
echo
"
$INSTANCE
not running"
else
echo
"
$INSTANCE
running with PID: [
$PID
]"
fi
else
echo
"
$PIDFILE
does not exist! Cannot process
$INSTANCE
status!"
exit
1
fi
;;
*
)
echo
"usage:
$0
{ start | stop | restart | status }"
;;
esac
exit
0
This diff is collapsed.
Click to expand it.
systemd/xrootd.service
0 → 100644
+
14
−
0
View file @
122c7771
[Unit]
Description
=
XRootD-Services
After
=
syslog.target network.target
Wants
=
network.target
[Service]
Type
=
simple
RemainAfterExit
=
yes
ExecStart
=
/bin/sh /opt/XRootD/systemd/xrootd-daemon.sh start
ExecStop
=
/bin/sh /opt/XRootD/systemd/xrootd-daemon.sh stop
[Install]
WantedBy
=
multi-user.target
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