TDPS As a Service - Upstart Skript
Posted: 23 Nov 2013, 12:50
Hello,
as mentioned in my post to run TeamDrive Personal Server via INIT-Skript, I created an upstart script.
This was the reason to create the following how-to.
First of all, you need to copy the URLs manually, I am not allowed to use "BBCode:URL" anymore.
So, let us start to setup our TeamDrive Personal Server as a Service:
Part 1: Download and Installation
First of all, logon to your server and - if not already done - open a command box (bash).
Time by time you can download a new version of TDPS from http://www.teamdrive.com/de/download_server.html so please take a look an update the following command:
next we'll extract the file
After that, we will move the new directory tdpsd into /opt, you can also choose /var or /usr/bin or /usr/local/bin or ...
Now, take a moment, create your MD5 Password Hash and configure the tdps.config, to finish the installation
Part 2: User and startscript
Next we will need a deamon user, "tdpsd", without a homedrive and without a shell. If you need to have a special UID add -u xyz to the command
now set a password
as we will start TDPS with that user account we should make it the owner of the directory and files
next we will need the upstart scripts, you can download them here: http://www.cuivienen.name/downloads/tdpsd.zip or directly on your server
Extract the ZIP-File.
The scripts should run out-of-the-box, the only parts you may need to edit are the User and/or the path of tdpsd in ./default/tdpsd.
Now, let us move the scripts to /etc/default and /etc/init
...and set the required rights
Part 3: start/stop
Now we are in the final phase
To start TDPSD we just need to run
To stop it's just
Voilá - FINISHED
Greeting
SFu
as mentioned in my post to run TeamDrive Personal Server via INIT-Skript, I created an upstart script.
This was the reason to create the following how-to.
First of all, you need to copy the URLs manually, I am not allowed to use "BBCode:URL" anymore.
So, let us start to setup our TeamDrive Personal Server as a Service:
Part 1: Download and Installation
First of all, logon to your server and - if not already done - open a command box (bash).
Time by time you can download a new version of TDPS from http://www.teamdrive.com/de/download_server.html so please take a look an update the following command:
- Code: Select all
wget http://s3-eu-west-1.amazonaws.com/s3download.teamdrive.net/TDPS/1.1.061/linux/TeamDrivePersonalServerLinux_1.1.062.tar.gz
next we'll extract the file
- Code: Select all
tar xzf TeamDrivePersonalServerLinux_1.1.061.tar.gz
After that, we will move the new directory tdpsd into /opt, you can also choose /var or /usr/bin or /usr/local/bin or ...
- Code: Select all
mv tdps/ /opt/tdpsd
Now, take a moment, create your MD5 Password Hash and configure the tdps.config, to finish the installation
Part 2: User and startscript
Next we will need a deamon user, "tdpsd", without a homedrive and without a shell. If you need to have a special UID add -u xyz to the command
- Code: Select all
sudo useradd -s /bin/false -d /bin/null tdpsd
now set a password
- Code: Select all
sudo passwd tdpsd
as we will start TDPS with that user account we should make it the owner of the directory and files
- Code: Select all
sudo chown -R tdpsd:tdpsd /opt/tdpsd/
next we will need the upstart scripts, you can download them here: http://www.cuivienen.name/downloads/tdpsd.zip or directly on your server
- Code: Select all
sudo wget http://www.cuivienen.name/downloads/tdpsd.zip
Extract the ZIP-File.
The scripts should run out-of-the-box, the only parts you may need to edit are the User and/or the path of tdpsd in ./default/tdpsd.
# TeamDrive install path
TDPSD_PATH="/opt/tdpsd"
# user to run TeamDrive server as
TDPSD_USER="tdpsd"
# parameters to pass to TeamDrive startup script
TDPSD_PARAMS=""
Now, let us move the scripts to /etc/default and /etc/init
- Code: Select all
sudo mv ./default/tdpsd /etc/default
sudo mv ./init/tdpsd.conf /etc/init
...and set the required rights
- Code: Select all
sudo chmod 755 /etc/default/tdpsd
sudo chmod 755 /etc/init/tdpsd.conf
Part 3: start/stop
Now we are in the final phase
To start TDPSD we just need to run
- Code: Select all
sudo service tdpsd start
To stop it's just
- Code: Select all
sudo service tdpsd stop
Voilá - FINISHED
Greeting
SFu