Create a template service file at /etc/systemd/system/secure-tunnel@.service
. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target
/* MIT License | |
* | |
* Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com] | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: |
# ... more above ... | |
# wsfl bash is not a login shell | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
# ssh-agent configuration | |
if [ -z "$(pgrep ssh-agent)" ]; then | |
rm -rf /tmp/ssh-* |
#include <ctime> | |
#include <iostream> | |
#include <boost/date_time/gregorian/gregorian.hpp> | |
#include <boost/date_time/posix_time/posix_time.hpp> | |
//============================================================================== | |
//! Convert date part of Unix timestamp (time_t) to boost date | |
//! |
import org.apache.spark.rdd.NewHadoopRDD | |
import org.apache.hadoop.hbase.mapreduce.TableInputFormat | |
import org.apache.hadoop.hbase.HBaseConfiguration | |
import org.apache.hadoop.hbase.client.Result | |
import org.apache.hadoop.hbase.io.ImmutableBytesWritable | |
import scala.collection.JavaConversions._ | |
import scala.collection.JavaConverters._ | |
import org.apache.spark.mllib.recommendation.ALS | |
import org.apache.spark.mllib.recommendation.Rating | |
import scala.collection.mutable.ArrayBuffer |