Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Systemd Unit file for Handle Service used by DSpace
- #
- # On hosts that use systemd, like RHEL7, this can be used to auto-start
- # the handle service and provide the familiar "servicectl start|status|stop"
- # commands for controlling execution.
- #
- # To install:
- #
- # 1) As dspace:
- # REQUIRED:
- # - Rename dspace/bin/start-handle-server to run-handle-server,
- # and remove "nohup" and the trailing ampersand from the last line.
- # OPTIONAL:
- # - Create start-handle-server, with the following lines, not indented:
- # #!/bin/sh
- # sudo systemctl start handle
- # ..and make sure it's executable (e.g. chmod 755 start-handle-server)
- # 2) As root:
- # REQUIRED:
- # - Copy this file into /etc/systemd/system and change the path for
- # ExecStart's value as appropriate.
- # - Run the following to install and make it start at system startup:
- # systemctl daemon-reload
- # systemctl enable handle
- # OPTIONAL:
- # - Modify /etc/sudoers (using visudo) to allow the dspace user
- # to run "sudo systemctl start|stop|status handle" with no password:
- # dspace ALL=(root) NOPASSWD: /bin/systemctl start handle
- # dspace ALL=(root) NOPASSWD: /bin/systemctl stop handle
- # dspace ALL=(root) NOPASSWD: /bin/systemctl status handle
- [Unit]
- Description=Handle Service
- After=syslog.target network.target
- [Service]
- Type=simple
- ExecStart=/opt/dspace/dspace/bin/run-handle-server
- ExecStop=/bin/kill $MAINPID
- User=dspace
- Group=dspace
- [Install]
- WantedBy=multi-user.target
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement